gwenhywfar 4.0.3
|
00001 /*************************************************************************** 00002 begin : Fri Jan 22 2010 00003 copyright : (C) 2010 by Martin Preuss 00004 email : martin@libchipcard.de 00005 00006 *************************************************************************** 00007 * Please see toplevel file COPYING for license details * 00008 ***************************************************************************/ 00009 00010 #ifndef CPPDIALOG_HPP 00011 #define CPPDIALOG_HPP 00012 00013 #include <gwenhywfar/dialog_be.h> 00014 #include <list> 00015 #include <string> 00016 00017 class CppDialog; 00018 00019 00029 class CppDialog { 00030 friend class CppDialogLinker; 00031 00032 private: 00033 GWEN_DIALOG_SETINTPROPERTY_FN _setIntPropertyFn; 00034 GWEN_DIALOG_GETINTPROPERTY_FN _getIntPropertyFn; 00035 GWEN_DIALOG_SETCHARPROPERTY_FN _setCharPropertyFn; 00036 GWEN_DIALOG_GETCHARPROPERTY_FN _getCharPropertyFn; 00037 00038 public: 00039 CppDialog(GWEN_DIALOG *dlg); 00040 virtual ~CppDialog(); 00041 00042 GWEN_DIALOG *getCInterface(); 00043 00044 static CppDialog *getDialog(GWEN_DIALOG *dlg); 00045 00046 protected: 00047 GWEN_DIALOG *_dialog; 00048 00049 CppDialog(); 00050 00051 int emitSignal(GWEN_DIALOG_EVENTTYPE t, const char *sender); 00052 00053 GWEN_WIDGET_TREE *getWidgets() const; 00054 00055 GWEN_WIDGET *findWidgetByName(const char *name); 00056 00057 GWEN_WIDGET *findWidgetByImplData(int index, void *ptr); 00058 00059 00060 virtual int setIntProperty(GWEN_WIDGET *w, 00061 GWEN_DIALOG_PROPERTY prop, 00062 int index, 00063 int value, 00064 int doSignal); 00065 00066 virtual int getIntProperty(GWEN_WIDGET *w, 00067 GWEN_DIALOG_PROPERTY prop, 00068 int index, 00069 int defaultValue); 00070 00071 virtual int setCharProperty(GWEN_WIDGET *w, 00072 GWEN_DIALOG_PROPERTY prop, 00073 int index, 00074 const char *value, 00075 int doSignal); 00076 00077 virtual const char *getCharProperty(GWEN_WIDGET *w, 00078 GWEN_DIALOG_PROPERTY prop, 00079 int index, 00080 const char *defaultValue); 00081 00082 }; 00083 00084 00085 00086 00087 #endif /* CPPDIALOG_HPP */ 00088 00089