00001
00026 #ifndef _CGUIFORM_
00027 #define _CGUIFORM_
00028
00029 #include "GUIFrame.h"
00030
00031 template<class T>
00032 class CGUIForm: public CGUIFrame {
00033
00034 public:
00035
00036 CGUIForm(T* _instance);
00037
00038 protected:
00039
00040 void callOnConfirm();
00041
00042 T* m_instance;
00043 void (T::*m_funcOnConfirm)(void);
00044 };
00045
00046 template<class T>
00047 CGUIForm<T>::CGUIForm(T* _instance) {
00048 m_instance = _instance;
00049 m_funcOnConfirm = NULL;
00050 }
00051
00052 template<class T>
00053 void CGUIForm<T>::callOnConfirm() {
00054 if (m_instance != NULL && m_funcOnConfirm != NULL) {
00055 (this->m_instance->*m_funcOnConfirm)();
00056 }
00057 }
00058
00059 #endif