00001 // This is core/vgui/impl/mfc/vgui_mfc.h 00002 #ifndef vgui_mfc_h_ 00003 #define vgui_mfc_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \brief MFC (Microsoft Foundation Classes) implementation of vgui_toolkit. 00010 // \author awf@robots.ox.ac.uk 00011 // \date July 2000 00012 // 00013 // \verbatim 00014 // Modifications 00015 // July 2000 Marko Bacic, Oxford RRG -- Implemented support for MFC 00016 // 15-AUG-2000 Marko Bacic, Oxford RRG -- Implemented run_one_event. 00017 // 29-AUG-2001 K.Y.McGaul - Added destructor to remove Purify mem leak. 00018 // 23-DEC-2002 J.L. Mundy - Set window on adaptor for convenient access 00019 // 16-NOV-2007 Gamze Tunali - added produce_dialog_extension() 00020 // \endverbatim 00021 00022 #include <vcl_vector.h> 00023 #include <vgui/vgui_toolkit.h> 00024 class vgui_mfc_adaptor; 00025 class vgui_mfc_window; 00026 class vgui_mfc_utils; 00027 class vgui_mfc_app; 00028 00029 //: The MFC (Microsoft Foundation Classes) implementation of vgui_toolkit. 00030 // 00031 // Provides functions for controlling the event loop. 00032 // Based upon vgui_gtk. 00033 class vgui_mfc : public vgui_toolkit 00034 { 00035 public: 00036 // singleton method 00037 static vgui_mfc* instance(); 00038 00039 virtual vcl_string name() const; 00040 00041 virtual void run(); 00042 virtual void run_one_event(); 00043 virtual void run_till_idle(); 00044 virtual void flush(); 00045 virtual void quit(); 00046 virtual void add_event(const vgui_event&); 00047 00048 virtual vgui_window* produce_window(int width, int height, const vgui_menu& menubar, 00049 const char* title="vgui mfc window"); 00050 00051 virtual vgui_window* produce_window(int width, int height, 00052 const char* title="vgui mfc popup"); 00053 00054 virtual vgui_dialog_impl* produce_dialog(const char* name); 00055 00056 virtual vgui_dialog_extensions_impl* produce_dialog_extension(const char* name); 00057 00058 vgui_mfc_utils *utils; 00059 protected: 00060 vgui_mfc(); 00061 ~vgui_mfc(); 00062 void init(int &, char **); 00063 void uninit(); 00064 vgui_mfc_app* theApp_; 00065 vcl_vector<vgui_window*> windows_to_delete; 00066 }; 00067 00068 #endif // vgui_mfc_h_