25 #ifndef GCHEMPAINT_APPLICATION_H
26 #define GCHEMPAINT_APPLICATION_H
30 #include <libxml/parser.h>
146 friend class ApplicationPrivate;
168 void ActivateTool (
const std::string& toolname,
bool activate);
226 void SetTool (
const std::string& toolname,
Tool* tool) {m_Tools[toolname] = tool;}
231 GtkWidget*
GetToolItem(
const std::string& name) {
return ToolItems[name];}
239 void SetToolItem (
const std::string& name, GtkWidget* w) {ToolItems[name] = w;}
265 bool FileProcess (
const gchar* filename,
const gchar* mime_type,
bool bSave, GtkWindow *window,
gcu::Document *pDoc = NULL);
302 void Zoom (
double zoom);
348 void AddActions (GtkRadioActionEntry
const *entries,
int nb,
char const *ui_description,
IconDesc const *icons);
349 void AddTools (
ToolDesc const *tools);
414 std::list<std::string> &
GetExtensions(std::string &mime_type);
463 bool Have3DSupport () {
return m_HaveGhemical | m_HaveGChem3D | m_HaveAvogadro;}
478 void ReceiveTargets (GtkClipboard *clipboard, GtkSelectionData *selection_data);
479 std::list < ToolDesc const * >
const &GetToolDescriptions ()
const {
return m_ToolDescriptions;}
491 void BuildTools () throw (std::runtime_error);
500 void TestSupportedType (
char const *mime_type,
char const* babel_type = NULL,
bool writeable = false);
501 void AddMimeType (std::list<std::
string> &l, std::
string const& mime_type);
502 void UpdateAllTargets ();
520 std::map <std::
string, GtkWidget*> ToolItems;
521 std::map <std::
string, GtkWidget*> Toolbars;
522 std::map <std::
string,
Tool*> m_Tools;
525 static
bool m_Have_InChI;
527 GtkIconFactory *IconFactory;
528 std::list<
char const*> UiDescs;
529 GtkRadioActionEntry* RadioActions;
531 std::map<
int, std::
string> ToolbarNames;
533 std::set<
Target*> m_Targets;
535 std::list<std::
string> m_SupportedMimeTypes;
536 std::list<std::
string> m_WriteableMimeTypes;
537 GOConfNode *m_ConfNode;
538 guint m_NotificationId;
539 gcu::Object *m_Dummy;
540 std::list<BuildMenuCb> m_MenuCbs;
542 std::map < std::
string, gccv::Canvas * > m_ToolCanvases;
543 std::list <
ToolDesc const * > m_ToolDescriptions;
565 #endif //GCHEMPAINT_APPLICATION_H
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