gwenhywfar  4.99.8beta
widget.c
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Wed Jan 20 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU Lesser General Public *
10  * License as published by the Free Software Foundation; either *
11  * version 2.1 of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Lesser General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Lesser General Public *
19  * License along with this library; if not, write to the Free Software *
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21  * MA 02111-1307 USA *
22  * *
23  ***************************************************************************/
24 
25 
26 #ifdef HAVE_CONFIG_H
27 # include <config.h>
28 #endif
29 
30 #define DISABLE_DEBUGLOG
31 
32 
33 #include "widget_p.h"
34 
35 #include <gwenhywfar/text.h>
36 #include <gwenhywfar/debug.h>
37 #include <gwenhywfar/dialog_be.h>
38 
39 #include <assert.h>
40 #include <ctype.h>
41 
42 
43 
44 GWEN_TREE_FUNCTIONS(GWEN_WIDGET, GWEN_Widget)
46 
47 
48 
49 
51  GWEN_WIDGET *w;
52 
54  w->refCount=1;
57 
58  w->dialog=dlg;
59 
60  return w;
61 }
62 
63 
64 
66  if (w) {
67  assert(w->refCount);
68  if (w->refCount>1) {
69  w->refCount--;
70  }
71  else {
72  int i;
73 
76  free(w->name);
77  for (i=0; i<GWEN_WIDGET_TEXTCOUNT; i++)
78  free(w->text[i]);
79  free(w->iconFile);
80  free(w->imageFile);
81  w->refCount=0;
83  }
84  }
85 }
86 
87 
88 
89 
91  assert(w);
92  assert(w->refCount);
93 
94  return w->dialog;
95 }
96 
97 
98 
100  GWEN_DIALOG *dlg;
101  GWEN_DIALOG *pdlg;
102 
103  assert(w);
104  assert(w->refCount);
105 
106  dlg=w->dialog;
107  if (dlg) {
108  while( (pdlg=GWEN_Dialog_GetParentDialog(dlg)) )
109  dlg=pdlg;
110 
111  return w->dialog;
112  }
113  return NULL;
114 }
115 
116 
117 
118 void *GWEN_Widget_GetImplData(const GWEN_WIDGET *w, int index) {
119  assert(w);
120  assert(w->refCount);
121  if (index<GWEN_WIDGET_IMPLDATACOUNT)
122  return w->impl_data[index];
123  else {
124  DBG_ERROR(GWEN_LOGDOMAIN, "Index out of range");
125  return NULL;
126  }
127 }
128 
129 
130 
131 void GWEN_Widget_SetImplData(GWEN_WIDGET *w, int index, void *ptr) {
132  assert(w);
133  assert(w->refCount);
134  if (index<GWEN_WIDGET_IMPLDATACOUNT)
135  w->impl_data[index]=ptr;
136  else {
137  DBG_ERROR(GWEN_LOGDOMAIN, "Index out of range");
138  }
139 }
140 
141 
142 
143 uint32_t GWEN_Widget_GetFlags(const GWEN_WIDGET *w) {
144  assert(w);
145  assert(w->refCount);
146  return w->flags;
147 }
148 
149 
150 
151 void GWEN_Widget_SetFlags(GWEN_WIDGET *w, uint32_t fl) {
152  assert(w);
153  assert(w->refCount);
154  w->flags=fl;
155 }
156 
157 
158 
159 void GWEN_Widget_AddFlags(GWEN_WIDGET *w, uint32_t fl) {
160  assert(w);
161  assert(w->refCount);
162  w->flags|=fl;
163 }
164 
165 
166 
167 void GWEN_Widget_SubFlags(GWEN_WIDGET *w, uint32_t fl) {
168  assert(w);
169  assert(w->refCount);
170  w->flags&=~fl;
171 }
172 
173 
174 
176  assert(w);
177  assert(w->refCount);
178  return w->wtype;
179 }
180 
181 
182 
184  assert(w);
185  assert(w->refCount);
186  w->wtype=t;
187 }
188 
189 
190 
192  assert(w);
193  assert(w->refCount);
194  return w->columns;
195 }
196 
197 
198 
200  assert(w);
201  assert(w->refCount);
202  w->columns=i;
203 }
204 
205 
206 
208  assert(w);
209  assert(w->refCount);
210  return w->rows;
211 }
212 
213 
214 
216  assert(w);
217  assert(w->refCount);
218  w->rows=i;
219 }
220 
221 
222 
224  assert(w);
225  assert(w->refCount);
226  return w->groupId;
227 }
228 
229 
230 
232  assert(w);
233  assert(w->refCount);
234  w->groupId=i;
235 }
236 
237 
238 
240  assert(w);
241  assert(w->refCount);
242  return w->width;
243 }
244 
245 
246 
248  assert(w);
249  assert(w->refCount);
250  w->width=i;
251 }
252 
253 
254 
256  assert(w);
257  assert(w->refCount);
258  return w->height;
259 }
260 
261 
262 
264  assert(w);
265  assert(w->refCount);
266  w->height=i;
267 }
268 
269 
270 
271 const char *GWEN_Widget_GetText(const GWEN_WIDGET *w, int idx) {
272  assert(w);
273  assert(w->refCount);
274  if (idx<0 || idx>=GWEN_WIDGET_TEXTCOUNT)
275  return NULL;
276  return w->text[idx];
277 }
278 
279 
280 
281 void GWEN_Widget_SetText(GWEN_WIDGET *w, int idx, const char *s) {
282  assert(w);
283  assert(w->refCount);
284 
285  if (idx>=0 && idx<GWEN_WIDGET_TEXTCOUNT) {
286  free(w->text[idx]);
287  if (s) w->text[idx]=strdup(s);
288  else w->text[idx]=NULL;
289  }
290 }
291 
292 
293 
294 const char *GWEN_Widget_GetName(const GWEN_WIDGET *w) {
295  assert(w);
296  assert(w->refCount);
297  return w->name;
298 }
299 
300 
301 
302 void GWEN_Widget_SetName(GWEN_WIDGET *w, const char *s) {
303  assert(w);
304  assert(w->refCount);
305  free(w->name);
306  if (s) w->name=strdup(s);
307  else w->name=NULL;
308 }
309 
310 
311 
313  assert(w);
314  assert(w->refCount);
315  return w->iconFile;
316 }
317 
318 
319 
320 void GWEN_Widget_SetIconFileName(GWEN_WIDGET *w, const char *s) {
321  assert(w);
322  assert(w->refCount);
323  free(w->iconFile);
324  if (s) w->iconFile=strdup(s);
325  else w->iconFile=NULL;
326 }
327 
328 
329 
331  assert(w);
332  assert(w->refCount);
333  return w->imageFile;
334 }
335 
336 
337 
338 void GWEN_Widget_SetImageFileName(GWEN_WIDGET *w, const char *s) {
339  assert(w);
340  assert(w->refCount);
341  free(w->imageFile);
342  if (s) w->imageFile=strdup(s);
343  else w->imageFile=NULL;
344 }
345 
346 
347 
348 
349 
351  if (s && *s) {
352  if (strcasecmp(s, "unknown")==0)
354  else if (strcasecmp(s, "none")==0)
355  return GWEN_Widget_TypeNone;
356  else if (strcasecmp(s, "label")==0)
357  return GWEN_Widget_TypeLabel;
358  else if (strcasecmp(s, "pushButton")==0)
360  else if (strcasecmp(s, "lineEdit")==0)
362  else if (strcasecmp(s, "textEdit")==0)
364  else if (strcasecmp(s, "comboBox")==0)
366  else if (strcasecmp(s, "radioButton")==0)
368  else if (strcasecmp(s, "progressBar")==0)
370  else if (strcasecmp(s, "groupBox")==0)
372  else if (strcasecmp(s, "hSpacer")==0)
374  else if (strcasecmp(s, "vSpacer")==0)
376  else if (strcasecmp(s, "hLayout")==0)
378  else if (strcasecmp(s, "vLayout")==0)
380  else if (strcasecmp(s, "gridLayout")==0)
382  else if (strcasecmp(s, "listBox")==0)
384  else if (strcasecmp(s, "dialog")==0)
385  return GWEN_Widget_TypeDialog;
386  else if (strcasecmp(s, "tabBook")==0)
388  else if (strcasecmp(s, "tabPage")==0)
390  else if (strcasecmp(s, "widgetStack")==0)
392  else if (strcasecmp(s, "checkBox")==0)
394  else if (strcasecmp(s, "scrollArea")==0)
396  else if (strcasecmp(s, "hLine")==0)
397  return GWEN_Widget_TypeHLine;
398  else if (strcasecmp(s, "vLine")==0)
399  return GWEN_Widget_TypeVLine;
400  else if (strcasecmp(s, "textBrowser")==0)
402  else if (strcasecmp(s, "spinBox")==0)
404  else {
405  DBG_ERROR(GWEN_LOGDOMAIN, "Unknown widget type [%s]", s);
406  }
407  }
409 }
410 
411 
412 
414  switch(t) {
416  return "none";
418  return "label";
420  return "pushButton";
422  return "lineEdit";
424  return "textEdit";
426  return "comboBox";
428  return "radioButton";
430  return "progressBar";
432  return "groupBox";
434  return "hSpacer";
436  return "vSpacer";
438  return "hLayout";
440  return "vLayout";
442  return "gridLayout";
444  return "listBox";
446  return "dialog";
448  return "tabBook";
450  return "tabPage";
452  return "widgetStack";
454  return "checkBox";
456  return "scrollArea";
458  return "hLine";
460  return "vLine";
462  return "textBrowser";
464  return "spinBox";
466  return "unknown";
467  }
468 
469  return "unknown";
470 }
471 
472 
473 
474 uint32_t GWEN_Widget_Flags_fromString(const char *s) {
475  uint32_t fl=0;
476 
477  if (s && *s) {
478  char *copy;
479  char *p;
480 
481  copy=strdup(s);
482  p=copy;
483 
484  while(*p) {
485  char *wstart;
486 
487  /* skip blanks */
488  while(*p && isspace(*p))
489  p++;
490  /* save start of word */
491  wstart=p;
492 
493  /* find end of word */
494  while(*p && !(isspace(*p) || *p==','))
495  p++;
496  if (*p)
497  /* set blank or comma to 0, advance pointer */
498  *(p++)=0;
499 
500  /* parse flags */
501  if (strcasecmp(wstart, "fillX")==0)
503  else if (strcasecmp(wstart, "fillY")==0)
505  else if (strcasecmp(wstart, "readOnly")==0)
507  else if (strcasecmp(wstart, "password")==0)
509  else if (strcasecmp(wstart, "default")==0)
511  else if (strcasecmp(wstart, "decorShrinkable")==0)
513  else if (strcasecmp(wstart, "decorStretchable")==0)
515  else if (strcasecmp(wstart, "decorMinimize")==0)
517  else if (strcasecmp(wstart, "decorMaximize")==0)
519  else if (strcasecmp(wstart, "decorClose")==0)
521  else if (strcasecmp(wstart, "decorMenu")==0)
523  else if (strcasecmp(wstart, "fixedWidth")==0)
525  else if (strcasecmp(wstart, "fixedHeight")==0)
527  else if (strcasecmp(wstart, "equalWidth")==0)
529  else if (strcasecmp(wstart, "equalHeight")==0)
531  else if (strcasecmp(wstart, "justifyLeft")==0)
533  else if (strcasecmp(wstart, "justifyRight")==0)
535  else if (strcasecmp(wstart, "justifyTop")==0)
537  else if (strcasecmp(wstart, "justifyBottom")==0)
539  else if (strcasecmp(wstart, "justifyCenterX")==0)
541  else if (strcasecmp(wstart, "justifyCenterY")==0)
543  else if (strcasecmp(wstart, "noWordWrap")==0)
545  }
546  }
547 
548  return fl;
549 }
550 
551 
552 
554  const char *s;
555 
556  s=GWEN_XMLNode_GetProperty(node, "name", NULL);
557  if (s && *s)
558  GWEN_Widget_SetName(w, s);
559 
560  s=GWEN_XMLNode_GetProperty(node, "type", "unknown");
561  if (s && *s) {
562  w->wtype=GWEN_Widget_Type_fromString(s);
563  if (w->wtype==GWEN_Widget_TypeUnknown) {
564  DBG_ERROR(GWEN_LOGDOMAIN, "unknown type in node");
565  GWEN_XMLNode_Dump(node, 2);
566  return GWEN_ERROR_BAD_DATA;
567  }
568  }
569  else {
570  DBG_ERROR(GWEN_LOGDOMAIN, "type property missing in node");
571  return GWEN_ERROR_BAD_DATA;
572  }
573 
574  s=GWEN_XMLNode_GetProperty(node, "flags", NULL);
575  if (s && *s)
576  w->flags=GWEN_Widget_Flags_fromString(s);
577 
578  s=GWEN_XMLNode_GetProperty(node, "columns", NULL);
579  if (s && *s) {
580  if (1!=sscanf(s, "%d", &(w->columns))) {
581  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
582  return GWEN_ERROR_BAD_DATA;
583  }
584  }
585 
586  s=GWEN_XMLNode_GetProperty(node, "rows", NULL);
587  if (s && *s) {
588  if (1!=sscanf(s, "%d", &(w->rows))) {
589  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
590  return GWEN_ERROR_BAD_DATA;
591  }
592  }
593 
594  s=GWEN_XMLNode_GetProperty(node, "width", NULL);
595  if (s && *s) {
596  if (1!=sscanf(s, "%d", &(w->width))) {
597  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
598  return GWEN_ERROR_BAD_DATA;
599  }
600  }
601 
602  s=GWEN_XMLNode_GetProperty(node, "height", NULL);
603  if (s && *s) {
604  if (1!=sscanf(s, "%d", &(w->height))) {
605  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
606  return GWEN_ERROR_BAD_DATA;
607  }
608  }
609 
610  s=GWEN_XMLNode_GetProperty(node, "text", NULL);
611  if (s && *s)
613 
614  s=GWEN_XMLNode_GetProperty(node, "icon", NULL);
615  if (s && *s)
617 
618  s=GWEN_XMLNode_GetProperty(node, "image", NULL);
619  if (s && *s)
621 
622  s=GWEN_XMLNode_GetProperty(node, "groupId", NULL);
623  if (s && *s) {
624  if (1!=sscanf(s, "%d", &(w->groupId))) {
625  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
626  return GWEN_ERROR_BAD_DATA;
627  }
628  }
629 
630  return 0;
631 }
632 
633 
634 
638 
639  assert(w);
640  assert(w->refCount);
641 
642  of=w->setIntPropertyFn;
643  w->setIntPropertyFn=fn;
644  return of;
645 }
646 
647 
648 
652 
653  assert(w);
654  assert(w->refCount);
655 
656  of=w->getIntPropertyFn;
657  w->getIntPropertyFn=fn;
658  return of;
659 }
660 
661 
662 
666 
667  assert(w);
668  assert(w->refCount);
669 
670  of=w->setCharPropertyFn;
671  w->setCharPropertyFn=fn;
672  return of;
673 }
674 
675 
676 
680 
681  assert(w);
682  assert(w->refCount);
683 
684  of=w->getCharPropertyFn;
685  w->getCharPropertyFn=fn;
686  return of;
687 }
688 
689 
690 
694 
695  assert(w);
696  assert(w->refCount);
697 
698  of=w->addChildGuiWidgetFn;
699  w->addChildGuiWidgetFn=fn;
700  return of;
701 }
702 
703 
704 
707  int index,
708  int value,
709  int doSignal) {
710  assert(w);
711  assert(w->refCount);
712 
713  if (w->setIntPropertyFn)
714  return w->setIntPropertyFn(w, prop, index, value, doSignal);
715  else
717 }
718 
719 
720 
723  int index,
724  int defaultValue) {
725  assert(w);
726  assert(w->refCount);
727 
728  if (w->getIntPropertyFn)
729  return w->getIntPropertyFn(w, prop, index, defaultValue);
730  else
731  return defaultValue;
732 }
733 
734 
735 
738  int index,
739  const char *value,
740  int doSignal) {
741  assert(w);
742  assert(w->refCount);
743 
744  if (w->setCharPropertyFn)
745  return w->setCharPropertyFn(w, prop, index, value, doSignal);
746  else
748 }
749 
750 
751 
754  int index,
755  const char *defaultValue) {
756  assert(w);
757  assert(w->refCount);
758 
759  if (w->getCharPropertyFn)
760  return w->getCharPropertyFn(w, prop, index, defaultValue);
761  else
762  return defaultValue;
763 }
764 
765 
766 
768  assert(w);
769  assert(w->refCount);
770 
771  if (w->addChildGuiWidgetFn)
772  return w->addChildGuiWidgetFn(w, wChild);
773  else
775 }
776 
777 
778 
779 
780 
GWEN_WIDGET_TYPE GWEN_Widget_GetType(const GWEN_WIDGET *w)
Definition: widget.c:175
#define GWEN_WIDGET_FLAGS_DECOR_MENU
Definition: dialog.h:72
void GWEN_Widget_SetWidth(GWEN_WIDGET *w, int i)
Definition: widget.c:247
const char * GWEN_Widget_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
Definition: widget.c:752
#define GWEN_WIDGET_FLAGS_DECOR_STRETCHABLE
Definition: dialog.h:68
void GWEN_Widget_SetText(GWEN_WIDGET *w, int idx, const char *s)
Definition: widget.c:281
#define GWEN_WIDGET_FLAGS_JUSTIFY_TOP
Definition: dialog.h:81
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
#define GWEN_INHERIT_FINI(t, element)
Definition: inherit.h:238
int GWEN_Widget_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
Definition: widget.c:736
const char * GWEN_XMLNode_GetProperty(const GWEN_XMLNODE *n, const char *name, const char *defaultValue)
Definition: xml.c:228
#define GWEN_WIDGET_FLAGS_EQUAL_WIDTH
Definition: dialog.h:76
#define GWEN_WIDGET_FLAGS_DECOR_MAXIMIZE
Definition: dialog.h:70
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
const char * GWEN_Widget_GetName(const GWEN_WIDGET *w)
Definition: widget.c:294
#define GWEN_WIDGET_FLAGS_FIXED_WIDTH
Definition: dialog.h:74
GWEN_WIDGET_SETCHARPROPERTY_FN GWEN_Widget_SetSetCharPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_SETCHARPROPERTY_FN fn)
Definition: widget.c:663
GWEN_WIDGET_GETCHARPROPERTY_FN GWEN_Widget_SetGetCharPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_GETCHARPROPERTY_FN fn)
Definition: widget.c:677
int GWENHYWFAR_CB(* GWEN_WIDGET_ADDCHILDGUIWIDGET_FN)(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition: widget_be.h:119
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERY
Definition: dialog.h:84
GWEN_DIALOG_PROPERTY
Definition: dialog.h:215
#define GWEN_FREE_OBJECT(varname)
Definition: memory.h:92
#define NULL
Definition: binreloc.c:290
#define GWEN_WIDGET_IMPLDATACOUNT
Definition: widget_be.h:46
void GWEN_Widget_SetIconFileName(GWEN_WIDGET *w, const char *s)
Definition: widget.c:320
void GWEN_Widget_SetFlags(GWEN_WIDGET *w, uint32_t fl)
Definition: widget.c:151
void GWEN_Widget_free(GWEN_WIDGET *w)
Definition: widget.c:65
void GWEN_Widget_SubFlags(GWEN_WIDGET *w, uint32_t fl)
Definition: widget.c:167
uint32_t GWEN_Widget_GetFlags(const GWEN_WIDGET *w)
Definition: widget.c:143
void GWEN_XMLNode_Dump(const GWEN_XMLNODE *n, int ind)
Definition: xml.c:443
const char * GWEN_Dialog_TranslateString(const GWEN_DIALOG *dlg, const char *s)
Definition: dialog.c:178
int GWEN_Widget_GetRows(const GWEN_WIDGET *w)
Definition: widget.c:207
#define GWEN_LOGDOMAIN
Definition: logger.h:35
int GWEN_Widget_GetHeight(const GWEN_WIDGET *w)
Definition: widget.c:255
#define GWEN_WIDGET_FLAGS_READONLY
Definition: dialog.h:63
void GWEN_Widget_SetImplData(GWEN_WIDGET *w, int index, void *ptr)
Store a pointer with the widget.
Definition: widget.c:131
struct GWEN_DIALOG GWEN_DIALOG
Definition: dialog.h:54
#define GWEN_WIDGET_FLAGS_JUSTIFY_RIGHT
Definition: dialog.h:80
GWEN_WIDGET_GETINTPROPERTY_FN GWEN_Widget_SetGetIntPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_GETINTPROPERTY_FN fn)
Definition: widget.c:649
#define GWEN_WIDGET_FLAGS_EQUAL_HEIGHT
Definition: dialog.h:77
#define GWEN_WIDGET_FLAGS_DEFAULT_WIDGET
Definition: dialog.h:65
int GWENHYWFAR_CB(* GWEN_WIDGET_GETINTPROPERTY_FN)(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: widget_be.h:103
#define GWEN_ERROR_BAD_DATA
Definition: error.h:121
#define GWEN_NEW_OBJECT(typ, varname)
Definition: memory.h:86
void * GWEN_Widget_GetImplData(const GWEN_WIDGET *w, int index)
Definition: widget.c:118
GWEN_DIALOG * GWEN_Widget_GetDialog(const GWEN_WIDGET *w)
Definition: widget.c:90
int GWEN_Widget_GetColumns(const GWEN_WIDGET *w)
Definition: widget.c:191
void GWEN_Widget_SetHeight(GWEN_WIDGET *w, int i)
Definition: widget.c:263
uint32_t GWEN_Widget_Flags_fromString(const char *s)
Definition: widget.c:474
GWEN_WIDGET_ADDCHILDGUIWIDGET_FN GWEN_Widget_SetAddChildGuiWidgetFn(GWEN_WIDGET *w, GWEN_WIDGET_ADDCHILDGUIWIDGET_FN fn)
Definition: widget.c:691
#define GWEN_WIDGET_FLAGS_PASSWORD
Definition: dialog.h:64
GWEN_WIDGET_SETINTPROPERTY_FN GWEN_Widget_SetSetIntPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_SETINTPROPERTY_FN fn)
Definition: widget.c:635
#define GWEN_WIDGET_TEXTCOUNT
Definition: widget_be.h:45
GWEN_DIALOG * GWEN_Widget_GetTopDialog(const GWEN_WIDGET *w)
Definition: widget.c:99
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
#define GWEN_WIDGET_FLAGS_DECOR_CLOSE
Definition: dialog.h:71
#define GWEN_TREE_FINI(t, element)
Definition: tree.h:554
const char * GWEN_Widget_GetIconFileName(const GWEN_WIDGET *w)
Definition: widget.c:312
void GWEN_Widget_SetRows(GWEN_WIDGET *w, int i)
Definition: widget.c:215
#define GWEN_WIDGET_FLAGS_JUSTIFY_BOTTOM
Definition: dialog.h:82
#define GWEN_WIDGET_FLAGS_NO_WORDWRAP
Definition: dialog.h:86
#define GWEN_INHERIT_INIT(t, element)
Definition: inherit.h:223
struct GWEN_WIDGET GWEN_WIDGET
Definition: widget_be.h:34
void GWEN_Widget_SetColumns(GWEN_WIDGET *w, int i)
Definition: widget.c:199
int GWEN_Widget_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition: widget.c:767
#define GWEN_WIDGET_FLAGS_FILLY
Definition: dialog.h:62
#define GWEN_WIDGET_FLAGS_FILLX
Definition: dialog.h:61
void GWEN_Widget_SetName(GWEN_WIDGET *w, const char *s)
Definition: widget.c:302
int GWEN_Widget_GetGroupId(const GWEN_WIDGET *w)
Definition: widget.c:223
int GWEN_Widget_GetWidth(const GWEN_WIDGET *w)
Definition: widget.c:239
GWEN_WIDGET_TYPE
Definition: widget_be.h:49
#define DBG_ERROR(dbg_logger, format, args...)
Definition: debug.h:97
void GWEN_Widget_SetType(GWEN_WIDGET *w, GWEN_WIDGET_TYPE t)
Definition: widget.c:183
int GWEN_Widget_ReadXml(GWEN_WIDGET *w, GWEN_XMLNODE *node)
Definition: widget.c:553
GWEN_WIDGET * GWEN_Widget_new(GWEN_DIALOG *dlg)
Definition: widget.c:50
#define GWEN_WIDGET_FLAGS_FIXED_HEIGHT
Definition: dialog.h:75
void GWEN_Widget_AddFlags(GWEN_WIDGET *w, uint32_t fl)
Definition: widget.c:159
int GWEN_Widget_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition: widget.c:705
GWEN_DIALOG * GWEN_Dialog_GetParentDialog(const GWEN_DIALOG *dlg)
Definition: dialog.c:122
void GWEN_Widget_SetImageFileName(GWEN_WIDGET *w, const char *s)
Definition: widget.c:338
int GWEN_Widget_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: widget.c:721
#define GWEN_TREE_INIT(t, element)
Definition: tree.h:545
#define GWEN_WIDGET_FLAGS_JUSTIFY_LEFT
Definition: dialog.h:79
GWEN_WIDGET_TYPE GWEN_Widget_Type_fromString(const char *s)
Definition: widget.c:350
const char * GWEN_Widget_GetImageFileName(const GWEN_WIDGET *w)
Definition: widget.c:330
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERX
Definition: dialog.h:83
const char * GWEN_Widget_Type_toString(GWEN_WIDGET_TYPE t)
Definition: widget.c:413
#define GWEN_WIDGET_FLAGS_DECOR_SHRINKABLE
Definition: dialog.h:67
#define GWEN_WIDGET_FLAGS_DECOR_MINIMIZE
Definition: dialog.h:69
const char * GWEN_Widget_GetText(const GWEN_WIDGET *w, int idx)
Definition: widget.c:271
#define GWEN_INHERIT_FUNCTIONS(t)
Definition: inherit.h:163
struct GWEN__XMLNODE GWEN_XMLNODE
Definition: xml.h:148
#define GWEN_TREE_FUNCTIONS(t, pr)
Definition: tree.h:393
void GWEN_Widget_SetGroupId(GWEN_WIDGET *w, int i)
Definition: widget.c:231
#define GWEN_ERROR_NOT_IMPLEMENTED
Definition: error.h:108