00001
00004 #ifndef _MethodPanelFactory_h
00005 #define _MethodPanelFactory_h
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "../Method.h"
00016
00017 #include "MethodPanelInfo.h"
00018
00019
00020
00021
00022
00023 class MethodPanelFactory
00024 {
00025 public:
00028 typedef wxPanel*(*PanelCreator)(MethodPanelInfo);
00029
00030
00031
00034 ~MethodPanelFactory(void);
00035
00036
00037
00038
00039
00045 void* Register(MethodIdType id, PanelCreator function);
00046
00049 wxPanel* CreatePanel(MethodPanelInfo panelInfo) const;
00050
00053 wxSize MinSize();
00054
00055
00056
00059 static MethodPanelFactory& GetInstance();
00060
00061
00062
00063 protected:
00064 private:
00067 MethodPanelFactory(void);
00068
00069 map<MethodIdType, PanelCreator> mFactories;
00070 };
00071
00072
00073
00074
00075
00076
00077
00078 #endif // _MethodPanelFactory_h