Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

vflow.h

00001 // Copyright (C) 2001 Jean-Marc Valin & Dominic Letourneau
00002 // main interface re-written / cleaned.
00003 // Dominic Letourneau (20/08/2001)
00004 
00005 #ifndef VFLOW_H
00006 #define VFLOW_H
00007 
00008 #ifdef HAVE_CONFIG_H
00009 #  include <config.h>
00010 #endif
00011 
00012 #include <locale.h>
00013 #include <gnome.h>
00014 #include "UIDocument.h"
00015 #include "GUIDocument.h"
00016 #include "GUINetwork.h"
00017 #include "BaseException.h"
00018 #include "path.h"
00019 #include <signal.h>
00020 #include <stdlib.h>
00021 #include <sstream>
00022 #include <map>
00023 
00024 #include "ExternalApp.h"
00025 
00026 namespace FD {
00027 
00028 class vflowGUI {
00029 
00030   //callbacks
00031   friend void doc_prop_event(GtkWidget *widget, vflowGUI *vflow);
00032   friend void new_doc_event  (GtkMenuItem *menuitem, vflowGUI *vflow);
00033   friend void file_open_ok_sel(GtkWidget *w, vflowGUI *vflow);
00034   friend void open_doc_event (GtkMenuItem *menuitem, vflowGUI *vflow);
00035   friend gint close_doc_event (GtkMenuItem *menuitem, vflowGUI *vflow);
00036   friend void file_saveas_ok_sel (GtkWidget *w, vflowGUI *vflow);
00037   friend void saveas_doc_event (GtkWidget *widget, vflowGUI *vflow);
00038   friend void save_doc_event (GtkWidget *widget, vflowGUI *vflow);
00039   friend void export_doc_event (GtkWidget *widget, vflowGUI *vflow);
00040   friend void run_doc_event (GtkWidget *widget, vflowGUI *vflow);
00041   friend void stop_doc_event (GtkWidget *widget, vflowGUI *vflow);
00042   friend void build_event (GtkMenuItem *menuitem, vflowGUI *vflow);
00043   friend void exit_event  (GtkMenuItem  *menuitem, vflowGUI *vflow);
00044   friend gint remove_doc_cb (GnomeMDI *mdi, GnomeMDIChild *child);
00045   friend void overflow_doc_event(GtkMenuItem *menuitem, vflowGUI *vflow);
00046   friend void overflow_noderef_event(GtkMenuItem *menuitem, vflowGUI *vflow);
00047   friend void about_event  (GtkMenuItem *menuitem, vflowGUI *vflow);
00048 
00049   //notebook events
00050   friend void vflow_change_current_page_event(GtkNotebook *notebook, gint arg1, vflowGUI *vflow);
00051   friend gboolean vflow_focus_tab_event(GtkNotebook *notebook, GtkNotebookTab arg1, vflowGUI *vflow);
00052   friend gboolean vflow_select_page_event(GtkNotebook *notebook, gboolean arg1, vflowGUI *vflow);
00053   
00054 
00055 
00056  public:
00057 
00058   //singleton
00059   static vflowGUI* instance();
00060 
00061   void set_run_mode (bool isRuning);
00062 
00063   void load_document (const std::string fname);
00064 
00065   void create_empty_document();
00066 
00067   void add_notebook_document(GUIDocument *doc, GtkWidget *child);
00068   
00069   void remove_notebook_document(GUIDocument *doc, GtkWidget *child);
00070 
00071   void display_statusbar_text(const std::string &text);
00072 
00073   void copy(GUIDocument *doc);
00074 
00075   void paste (GUIDocument *doc);
00076 
00077   void cut(GUIDocument *doc);
00078 
00079   void clear(GUIDocument *doc);
00080 
00081   ~vflowGUI();
00082 
00083   GtkWidget* get_mdi() {return mdi;}
00084  
00085   GUIDocument *getCurrentDoc();
00086 
00087   static const int CLIPBOARD_COPY_MODE;
00088   static const int CLIPBOARD_CUT_MODE;
00089   static const int CLIPBOARD_NONE_MODE;
00090 
00091  private:
00092 
00093   GtkWidget *mdi;
00094   GtkWidget *notebook1;
00095   GtkWidget *button5;
00096   GtkWidget *button6;
00097  
00098 
00099   vflowGUI();
00100 
00101   static vflowGUI* vflowApp;
00102 
00103   void create_mdi();
00104 
00105   std::list<GUINode*> clipboard;
00106 
00107   int clipboardMode;
00108 
00109   GtkWidget* get_notebook() {return notebook1;}
00110 };
00111 
00112 }//namespace FD
00113 
00114 #endif

Generated on Wed Oct 5 14:28:56 2005 for FlowDesigner by  doxygen 1.4.4