gui_component.h

00001 
00002 #ifndef GUI_COMPONENT_H
00003 #define GUI_COMPONENT_H
00004 
00005 #include "common.h"
00006 #include "filter.h"
00007 #include "guiengine.h"
00008 
00009 #ifdef SLIM_MINIGUI_ENGINE
00010 
00011 namespace SMP{
00012 
00013 
00014 #define FROM_WIDGET(WIDGET_NAME, MSG)   ((MSG) == (get_widget_id(WIDGET_NAME)))
00015 
00016 class SLIMUIRenderer;
00017 
00019 class SLIMGUIComponent : public SMPFilter
00020 {
00021     friend class SLIMUIRenderer;
00022 private:
00024     SLIMUIRenderer *renderer;
00025 
00027     HWND dialog_handle;
00028 
00029     
00030 protected:
00031 
00032 public:
00033     
00035     SLIMGUIComponent();
00036     
00038     virtual ~SLIMGUIComponent();
00039 
00040     //========= create and start GUI ============
00041     
00043     void prepare_GUI(void);
00044 
00046     void create_GUI(void);
00047 
00049     void start_GUI(void);
00050 
00051     //========= GUI Utilities ============
00052 
00054     int get_widget_id(char *widget_name);
00055     
00057     bool check_event_GUI(long msg, char *widget_name);
00058     
00064     void set_callback_GUI(char *widget_name, TFunctor *functor); 
00065 
00066     //void send_message_GUI(char *widget_name, int message, WPARAM wParam, LPARAM lParam);
00067     int send_message_GUI(char *widget_name, int message, unsigned wParam, unsigned long lParam);
00068     
00069 
00070     //========== Subclass should overwrite these functions ==============//
00071 
00073     virtual void GUI_initialize();
00074 
00076     virtual void GUI_finalize();
00077     
00079     //virtual void GUI_always();
00080 
00082     virtual void GUI_event_handler(void*) = 0;
00083 
00084 };
00085 
00086 
00087 
00088 } //end namespace
00089 
00090 #endif
00091 #endif

Generated on Fri Aug 31 15:41:42 2007 for SCREAMLinuxMiddleware(SLIM) by  doxygen 1.5.1