Go to the documentation of this file.00001
00002
00003 #ifndef vgui_win32_h_
00004 #define vgui_win32_h_
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00020
00021 #include <vgui/vgui_toolkit.h>
00022 #include <windows.h>
00023
00024
00025
00026
00027
00028
00029
00030
00031 class vgui_win32 : public vgui_toolkit
00032 {
00033 public:
00034 ~vgui_win32();
00035
00036
00037 vgui_window* get_current_window() { return current_window; }
00038 void set_current_window(HWND);
00039 void remove_current_window();
00040 int find_window(HWND);
00041 void dump_window_stack();
00042
00043
00044 vgui_dialog_impl* get_current_dialog() { return current_dialog; }
00045 void remove_current_dialog();
00046
00047
00048 static vgui_win32* instance();
00049
00050 virtual void init(int &, char **);
00051 virtual void uninit();
00052
00053
00054 virtual vcl_string name() const { return "win32"; }
00055
00056 virtual vgui_window* produce_window(int width, int height,
00057 vgui_menu const &menubar,
00058 char const *title);
00059
00060 virtual vgui_window* produce_window(int width, int height,
00061 char const *title);
00062
00063 virtual vgui_dialog_impl* produce_dialog(char const *name);
00064
00065 virtual vgui_dialog_extensions_impl* produce_dialog_extension(char const *name);
00066
00067 virtual void run();
00068 virtual void run_one_event();
00069 virtual void run_till_idle();
00070 virtual void flush();
00071 virtual void add_event(vgui_event const &);
00072 virtual void quit();
00073
00074 protected:
00075 vgui_win32();
00076
00077
00078 BOOL ProcessShellCommand(int argc, char **argv);
00079
00080
00081 BOOL PumpMessage();
00082
00083 static vgui_win32 *instance_;
00084
00085
00086 HINSTANCE hInstance_;
00087 HINSTANCE hPrevInstance_;
00088 PSTR szCmdLine_;
00089 int iCmdShow_;
00090 char *szAppName_;
00091
00092
00093 vcl_vector<vgui_window*> windows_to_delete;
00094 vgui_window* current_window;
00095
00096
00097 vcl_vector<vgui_dialog_impl*> dialogs_to_delete;
00098 vgui_dialog_impl* current_dialog;
00099 };
00100
00101
00102 LRESULT CALLBACK globalWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
00103 LRESULT CALLBACK globalDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
00104 LRESULT CALLBACK globalTableauProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
00105
00106 #endif // vgui_win32_h_