gwenhywfar  4.3.3
cppwidget.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Tue Jul 13 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 CPPWIDGET_HPP
11 #define CPPWIDGET_HPP
12 
13 #include <gwenhywfar/dialog_be.h>
14 #include <list>
15 #include <string>
16 
17 class CppWidget;
18 class CppDialog;
19 
20 
30 class CppWidget {
31  friend class CppWidgetLinker;
32 
33 private:
34  GWEN_WIDGET_SETINTPROPERTY_FN _setIntPropertyFn;
35  GWEN_WIDGET_GETINTPROPERTY_FN _getIntPropertyFn;
36  GWEN_WIDGET_SETCHARPROPERTY_FN _setCharPropertyFn;
37  GWEN_WIDGET_GETCHARPROPERTY_FN _getCharPropertyFn;
38  GWEN_WIDGET_ADDCHILDGUIWIDGET_FN _addChildGuiWidgetFn;
39 
40 public:
42  virtual ~CppWidget();
43 
45  static CppWidget *getWidget(GWEN_WIDGET *w);
46 
48 
49  const char *getName();
51  int getColumns();
52  int getRows();
53  uint32_t getFlags();
54 
55  int getGroupId();
56  int getWidth();
57  int getHeight();
58  const char *getText(int idx);
59  const char *getIconFileName();
60  const char *getImageFileName();
61 
62 
63 protected:
65 
66  CppWidget();
67 
68  virtual int setIntProperty(GWEN_DIALOG_PROPERTY prop,
69  int index,
70  int value,
71  int doSignal);
72 
73  virtual int getIntProperty(GWEN_DIALOG_PROPERTY prop,
74  int index,
75  int defaultValue);
76 
77  virtual int setCharProperty(GWEN_DIALOG_PROPERTY prop,
78  int index,
79  const char *value,
80  int doSignal);
81 
82  virtual const char *getCharProperty(GWEN_DIALOG_PROPERTY prop,
83  int index,
84  const char *defaultValue);
85 
86  virtual int addChildGuiWidget(GWEN_WIDGET *wChild);
87 
88 };
89 
90 
91 
92 
93 #endif /* CPPWIDGET_HPP */
94 
95