gwenhywfar  5.11.1beta
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 #include <gwen-gui-cpp/api.h>
21 
22 
32 class CPPGUI_API CppWidget {
33  friend class CppWidgetLinker;
34 
35 private:
36  GWEN_WIDGET_SETINTPROPERTY_FN _setIntPropertyFn;
37  GWEN_WIDGET_GETINTPROPERTY_FN _getIntPropertyFn;
38  GWEN_WIDGET_SETCHARPROPERTY_FN _setCharPropertyFn;
39  GWEN_WIDGET_GETCHARPROPERTY_FN _getCharPropertyFn;
40  GWEN_WIDGET_ADDCHILDGUIWIDGET_FN _addChildGuiWidgetFn;
41 
42 public:
44  virtual ~CppWidget();
45 
47  static CPPGUI_API CppWidget *getWidget(GWEN_WIDGET *w);
48 
50 
51  const char *getName();
53  int getColumns();
54  int getRows();
55  uint32_t getFlags();
56 
57  int getGroupId();
58  int getWidth();
59  int getHeight();
60  const char *getText(int idx);
61  const char *getIconFileName();
62  const char *getImageFileName();
63 
64 
65 protected:
67 
69 
71  int index,
72  int value,
73  int doSignal);
74 
76  int index,
77  int defaultValue);
78 
80  int index,
81  const char *value,
82  int doSignal);
83 
84  virtual const char *getCharProperty(GWEN_DIALOG_PROPERTY prop,
85  int index,
86  const char *defaultValue);
87 
88  virtual int addChildGuiWidget(GWEN_WIDGET *wChild);
89 
90 };
91 
92 
93 
94 
95 #endif /* CPPWIDGET_HPP */
96 
97 
A C++ binding for the C module GWEN_DIALOG.
Definition: cppdialog.hpp:32
A C++ binding for the C module GWEN_WIDGET.
Definition: cppwidget.hpp:32
int getHeight()
const char * getImageFileName()
virtual ~CppWidget()
GWEN_WIDGET_TYPE getType()
int getRows()
CppWidget(GWEN_WIDGET *w)
GWEN_WIDGET * _widget
Definition: cppwidget.hpp:66
GWEN_WIDGET * getCInterface()
const char * getIconFileName()
const char * getName()
virtual const char * getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
int getWidth()
CppDialog * getDialog()
int getColumns()
virtual int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
uint32_t getFlags()
virtual int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
int getGroupId()
virtual int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
static CPPGUI_API CppWidget * getWidget(GWEN_WIDGET *w)
virtual int addChildGuiWidget(GWEN_WIDGET *wChild)
const char * getText(int idx)
GWEN_DIALOG_PROPERTY
Definition: dialog.h:260
int GWENHYWFAR_CB(* GWEN_WIDGET_SETINTPROPERTY_FN)(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition: widget_be.h:97
struct GWEN_WIDGET GWEN_WIDGET
Definition: widget_be.h:34
int GWENHYWFAR_CB(* GWEN_WIDGET_SETCHARPROPERTY_FN)(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
Definition: widget_be.h:108
const char *GWENHYWFAR_CB(* GWEN_WIDGET_GETCHARPROPERTY_FN)(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
Definition: widget_be.h:114
GWEN_WIDGET_TYPE
Definition: widget_be.h:49
int GWENHYWFAR_CB(* GWEN_WIDGET_ADDCHILDGUIWIDGET_FN)(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition: widget_be.h:119
int GWENHYWFAR_CB(* GWEN_WIDGET_GETINTPROPERTY_FN)(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: widget_be.h:103