25 #ifndef GCHEMPAINT_APPLICATION_H
26 #define GCHEMPAINT_APPLICATION_H
30 #include <libxml/parser.h>
102 friend class ApplicationPrivate;
124 void ActivateTool (
const std::string& toolname,
bool activate);
182 void SetTool (
const std::string& toolname,
Tool* tool) {m_Tools[toolname] = tool;}
187 GtkWidget*
GetToolItem(
const std::string& name) {
return ToolItems[name];}
195 void SetToolItem (
const std::string& name, GtkWidget* w) {ToolItems[name] = w;}
221 bool FileProcess (
const gchar* filename,
const gchar* mime_type,
bool bSave, GtkWindow *window,
gcu::Document *pDoc = NULL);
258 void Zoom (
double zoom);
304 void AddActions (GtkRadioActionEntry
const *entries,
int nb,
char const *ui_description,
IconDesc const *icons);
368 std::list<std::string> &
GetExtensions(std::string &mime_type);
417 bool Have3DSupport () {
return m_HaveGhemical | m_HaveGChem3D | m_HaveAvogadro;}
432 void ReceiveTargets (GtkClipboard *clipboard, GtkSelectionData *selection_data);
444 void BuildTools () throw (std::runtime_error);
453 void TestSupportedType (
char const *mime_type,
char const* babel_type = NULL,
bool writeable = false);
454 void AddMimeType (std::list<std::
string> &l, std::
string const& mime_type);
455 void UpdateAllTargets ();
473 std::map <std::
string, GtkWidget*> ToolItems;
474 std::map <std::
string, GtkWidget*> Toolbars;
475 std::map <std::
string,
Tool*> m_Tools;
478 static
bool m_Have_InChI;
480 GtkIconFactory *IconFactory;
481 std::list<
char const*> UiDescs;
482 GtkRadioActionEntry* RadioActions;
484 std::map<
int, std::
string> ToolbarNames;
486 std::set<
Target*> m_Targets;
488 std::list<std::
string> m_SupportedMimeTypes;
489 std::list<std::
string> m_WriteableMimeTypes;
490 GOConfNode *m_ConfNode;
491 guint m_NotificationId;
492 gcu::Object *m_Dummy;
495 std::map < std::
string, gccv::Canvas * >m_ToolCanvases;
517 #endif //GCHEMPAINT_APPLICATION_H
bool(* BuildMenuCb)(Object *target, UIManager *uim, Object *object, double x, double y)
A Gtk+ using gcu::CmdContext implementation.
GdkCursor * GetCursor(CursorId id)
#define GCU_RO_PROP(type, member)
void ActivateWindowsActionWidget(const char *path, bool activate)
std::set< Document * > m_Docs
void SetActiveDocument(gcp::Document *pDoc)
void BuildMenu(gcu::UIManager *manager)
unsigned char const * data_24
gcp::Document * m_pActiveDoc
void AddCanvas(char const *path, gccv::Canvas *canvas)
virtual void ClearStatus()
void NotifyFocus(bool has_focus, Target *target=NULL)
std::list< std::string > & GetSupportedMimeTypes()
std::list< std::string > & GetExtensions(std::string &mime_type)
void AddTarget(Target *target)
void SaveGcp(std::string const &filename, gcp::Document *pDoc)
gcu::Document * CreateNewDocument()
void OpenGcp(std::string const &filename, gcp::Document *pDoc)
void DeleteTarget(Target *target)
base class for a user interface manager
void AddMenuCallback(BuildMenuCb cb)
virtual GtkWindow * GetWindow()=0
gcp::Document * GetActiveDocument()
#define GCU_RO_STATIC_PROP(type, member)
void OnConfigChanged(GOConfNode *node, gchar const *name)
void ActivateTool(const std::string &toolname, bool activate)
void SetToolItem(const std::string &name, GtkWidget *w)
void SetTool(const std::string &toolname, Tool *tool)
Application(gcugtk::CmdContextGtk *cc=NULL)
void OnThemeNamesChanged()
virtual void SetStatusText(const char *text)
void NotifyIconification(bool iconified)
void ReceiveTargets(GtkClipboard *clipboard, GtkSelectionData *selection_data)
void ShowTools(bool visible)
void AddActions(GtkRadioActionEntry const *entries, int nb, char const *ui_description, IconDesc const *icons)
GChemPaint application base class.
bool FileProcess(const gchar *filename, const gchar *mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc=NULL)
void OnToolChanged(GtkAction *current)
GtkWidget * GetToolItem(const std::string &name)
void RegisterToolbar(char const *name, int index)
Tool * GetTool(const std::string &name)
virtual void OnFileNew(char const *Theme=NULL)=0