gwenhywfar  4.3.3
fox16/cppdialog.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Fri Jan 22 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 #ifndef CPPDIALOG_HPP
11 #define CPPDIALOG_HPP
12 
13 #include <gwenhywfar/dialog_be.h>
14 
15 #include <list>
16 #include <string>
17 
18 class CppDialog;
19 
20 
30 class CppDialog {
31  friend class CppDialogLinker;
32 
33 private:
34  GWEN_DIALOG_SETINTPROPERTY_FN _setIntPropertyFn;
35  GWEN_DIALOG_GETINTPROPERTY_FN _getIntPropertyFn;
36  GWEN_DIALOG_SETCHARPROPERTY_FN _setCharPropertyFn;
37  GWEN_DIALOG_GETCHARPROPERTY_FN _getCharPropertyFn;
38 
39 public:
40  CppDialog(GWEN_DIALOG *dlg);
41  virtual ~CppDialog();
42 
44 
45  static CppDialog *getDialog(GWEN_DIALOG *dlg);
46 
47 protected:
49 
50  CppDialog();
51 
52  int emitSignal(GWEN_DIALOG_EVENTTYPE t, const char *sender);
53 
54  GWEN_WIDGET_TREE *getWidgets() const;
55 
56  GWEN_WIDGET *findWidgetByName(const char *name);
57 
58  GWEN_WIDGET *findWidgetByImplData(int index, void *ptr);
59 
60 
61  virtual int setIntProperty(GWEN_WIDGET *w,
63  int index,
64  int value,
65  int doSignal);
66 
67  virtual int getIntProperty(GWEN_WIDGET *w,
69  int index,
70  int defaultValue);
71 
72  virtual int setCharProperty(GWEN_WIDGET *w,
74  int index,
75  const char *value,
76  int doSignal);
77 
78  virtual const char *getCharProperty(GWEN_WIDGET *w,
80  int index,
81  const char *defaultValue);
82 
83 };
84 
85 
86 
87 
88 #endif /* CPPDIALOG_HPP */
89 
90