gwenhywfar  5.10.1
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 {
52  GWEN_WIDGET *w;
53 
55  w->refCount=1;
58 
59  w->dialog=dlg;
60 
61  return w;
62 }
63 
64 
65 
67 {
68  if (w) {
69  assert(w->refCount);
70  if (w->refCount>1) {
71  w->refCount--;
72  }
73  else {
74  int i;
75 
78  free(w->name);
79  for (i=0; i<GWEN_WIDGET_TEXTCOUNT; i++)
80  free(w->text[i]);
81  free(w->iconFile);
82  free(w->imageFile);
83  w->refCount=0;
85  }
86  }
87 }
88 
89 
90 
91 
93 {
94  assert(w);
95  assert(w->refCount);
96 
97  return w->dialog;
98 }
99 
100 
101 
103 {
104  GWEN_DIALOG *dlg;
105  GWEN_DIALOG *pdlg;
106 
107  assert(w);
108  assert(w->refCount);
109 
110  dlg=w->dialog;
111  if (dlg) {
112  while ((pdlg=GWEN_Dialog_GetParentDialog(dlg)))
113  dlg=pdlg;
114 
115  return w->dialog;
116  }
117  return NULL;
118 }
119 
120 
121 
122 void *GWEN_Widget_GetImplData(const GWEN_WIDGET *w, int index)
123 {
124  assert(w);
125  assert(w->refCount);
126  if (index<GWEN_WIDGET_IMPLDATACOUNT)
127  return w->impl_data[index];
128  else {
129  DBG_ERROR(GWEN_LOGDOMAIN, "Index out of range");
130  return NULL;
131  }
132 }
133 
134 
135 
136 void GWEN_Widget_SetImplData(GWEN_WIDGET *w, int index, void *ptr)
137 {
138  assert(w);
139  assert(w->refCount);
140  if (index<GWEN_WIDGET_IMPLDATACOUNT)
141  w->impl_data[index]=ptr;
142  else {
143  DBG_ERROR(GWEN_LOGDOMAIN, "Index out of range");
144  }
145 }
146 
147 
148 
150 {
151  assert(w);
152  assert(w->refCount);
153  return w->flags;
154 }
155 
156 
157 
158 void GWEN_Widget_SetFlags(GWEN_WIDGET *w, uint32_t fl)
159 {
160  assert(w);
161  assert(w->refCount);
162  w->flags=fl;
163 }
164 
165 
166 
167 void GWEN_Widget_AddFlags(GWEN_WIDGET *w, uint32_t fl)
168 {
169  assert(w);
170  assert(w->refCount);
171  w->flags|=fl;
172 }
173 
174 
175 
176 void GWEN_Widget_SubFlags(GWEN_WIDGET *w, uint32_t fl)
177 {
178  assert(w);
179  assert(w->refCount);
180  w->flags&=~fl;
181 }
182 
183 
184 
186 {
187  assert(w);
188  assert(w->refCount);
189  return w->wtype;
190 }
191 
192 
193 
195 {
196  assert(w);
197  assert(w->refCount);
198  w->wtype=t;
199 }
200 
201 
202 
204 {
205  assert(w);
206  assert(w->refCount);
207  return w->columns;
208 }
209 
210 
211 
213 {
214  assert(w);
215  assert(w->refCount);
216  w->columns=i;
217 }
218 
219 
220 
222 {
223  assert(w);
224  assert(w->refCount);
225  return w->rows;
226 }
227 
228 
229 
231 {
232  assert(w);
233  assert(w->refCount);
234  w->rows=i;
235 }
236 
237 
238 
240 {
241  assert(w);
242  assert(w->refCount);
243  return w->groupId;
244 }
245 
246 
247 
249 {
250  assert(w);
251  assert(w->refCount);
252  w->groupId=i;
253 }
254 
255 
256 
258 {
259  assert(w);
260  assert(w->refCount);
261  return w->width;
262 }
263 
264 
265 
267 {
268  assert(w);
269  assert(w->refCount);
270  w->width=i;
271 }
272 
273 
274 
276 {
277  assert(w);
278  assert(w->refCount);
279  return w->height;
280 }
281 
282 
283 
285 {
286  assert(w);
287  assert(w->refCount);
288  w->height=i;
289 }
290 
291 
292 
293 const char *GWEN_Widget_GetText(const GWEN_WIDGET *w, int idx)
294 {
295  assert(w);
296  assert(w->refCount);
297  if (idx<0 || idx>=GWEN_WIDGET_TEXTCOUNT)
298  return NULL;
299  return w->text[idx];
300 }
301 
302 
303 
304 void GWEN_Widget_SetText(GWEN_WIDGET *w, int idx, const char *s)
305 {
306  assert(w);
307  assert(w->refCount);
308 
309  if (idx>=0 && idx<GWEN_WIDGET_TEXTCOUNT) {
310  free(w->text[idx]);
311  if (s)
312  w->text[idx]=strdup(s);
313  else
314  w->text[idx]=NULL;
315  }
316 }
317 
318 
319 
320 const char *GWEN_Widget_GetName(const GWEN_WIDGET *w)
321 {
322  assert(w);
323  assert(w->refCount);
324  return w->name;
325 }
326 
327 
328 
329 void GWEN_Widget_SetName(GWEN_WIDGET *w, const char *s)
330 {
331  assert(w);
332  assert(w->refCount);
333  free(w->name);
334  if (s)
335  w->name=strdup(s);
336  else
337  w->name=NULL;
338 }
339 
340 
341 
343 {
344  assert(w);
345  assert(w->refCount);
346  return w->iconFile;
347 }
348 
349 
350 
352 {
353  assert(w);
354  assert(w->refCount);
355  free(w->iconFile);
356  if (s)
357  w->iconFile=strdup(s);
358  else
359  w->iconFile=NULL;
360 }
361 
362 
363 
365 {
366  assert(w);
367  assert(w->refCount);
368  return w->imageFile;
369 }
370 
371 
372 
374 {
375  assert(w);
376  assert(w->refCount);
377  free(w->imageFile);
378  if (s)
379  w->imageFile=strdup(s);
380  else
381  w->imageFile=NULL;
382 }
383 
384 
385 
386 
387 
389 {
390  if (s && *s) {
391  if (strcasecmp(s, "unknown")==0)
393  else if (strcasecmp(s, "none")==0)
394  return GWEN_Widget_TypeNone;
395  else if (strcasecmp(s, "label")==0)
396  return GWEN_Widget_TypeLabel;
397  else if (strcasecmp(s, "pushButton")==0)
399  else if (strcasecmp(s, "lineEdit")==0)
401  else if (strcasecmp(s, "textEdit")==0)
403  else if (strcasecmp(s, "comboBox")==0)
405  else if (strcasecmp(s, "radioButton")==0)
407  else if (strcasecmp(s, "progressBar")==0)
409  else if (strcasecmp(s, "groupBox")==0)
411  else if (strcasecmp(s, "hSpacer")==0)
413  else if (strcasecmp(s, "vSpacer")==0)
415  else if (strcasecmp(s, "hLayout")==0)
417  else if (strcasecmp(s, "vLayout")==0)
419  else if (strcasecmp(s, "gridLayout")==0)
421  else if (strcasecmp(s, "listBox")==0)
423  else if (strcasecmp(s, "dialog")==0)
424  return GWEN_Widget_TypeDialog;
425  else if (strcasecmp(s, "tabBook")==0)
427  else if (strcasecmp(s, "tabPage")==0)
429  else if (strcasecmp(s, "widgetStack")==0)
431  else if (strcasecmp(s, "checkBox")==0)
433  else if (strcasecmp(s, "scrollArea")==0)
435  else if (strcasecmp(s, "hLine")==0)
436  return GWEN_Widget_TypeHLine;
437  else if (strcasecmp(s, "vLine")==0)
438  return GWEN_Widget_TypeVLine;
439  else if (strcasecmp(s, "textBrowser")==0)
441  else if (strcasecmp(s, "spinBox")==0)
443  else {
444  DBG_ERROR(GWEN_LOGDOMAIN, "Unknown widget type [%s]", s);
445  }
446  }
448 }
449 
450 
451 
453 {
454  switch (t) {
456  return "none";
458  return "label";
460  return "pushButton";
462  return "lineEdit";
464  return "textEdit";
466  return "comboBox";
468  return "radioButton";
470  return "progressBar";
472  return "groupBox";
474  return "hSpacer";
476  return "vSpacer";
478  return "hLayout";
480  return "vLayout";
482  return "gridLayout";
484  return "listBox";
486  return "dialog";
488  return "tabBook";
490  return "tabPage";
492  return "widgetStack";
494  return "checkBox";
496  return "scrollArea";
498  return "hLine";
500  return "vLine";
502  return "textBrowser";
504  return "spinBox";
506  return "unknown";
507  }
508 
509  return "unknown";
510 }
511 
512 
513 
514 uint32_t GWEN_Widget_Flags_fromString(const char *s)
515 {
516  uint32_t fl=0;
517 
518  if (s && *s) {
519  char *copy;
520  char *p;
521 
522  copy=strdup(s);
523  p=copy;
524 
525  while (*p) {
526  char *wstart;
527 
528  /* skip blanks */
529  while (*p && isspace(*p))
530  p++;
531  /* save start of word */
532  wstart=p;
533 
534  /* find end of word */
535  while (*p && !(isspace(*p) || *p==','))
536  p++;
537  if (*p)
538  /* set blank or comma to 0, advance pointer */
539  *(p++)=0;
540 
541  /* parse flags */
542  if (strcasecmp(wstart, "fillX")==0)
544  else if (strcasecmp(wstart, "fillY")==0)
546  else if (strcasecmp(wstart, "readOnly")==0)
548  else if (strcasecmp(wstart, "password")==0)
550  else if (strcasecmp(wstart, "default")==0)
552  else if (strcasecmp(wstart, "decorShrinkable")==0)
554  else if (strcasecmp(wstart, "decorStretchable")==0)
556  else if (strcasecmp(wstart, "decorMinimize")==0)
558  else if (strcasecmp(wstart, "decorMaximize")==0)
560  else if (strcasecmp(wstart, "decorClose")==0)
562  else if (strcasecmp(wstart, "decorMenu")==0)
564  else if (strcasecmp(wstart, "fixedWidth")==0)
566  else if (strcasecmp(wstart, "fixedHeight")==0)
568  else if (strcasecmp(wstart, "equalWidth")==0)
570  else if (strcasecmp(wstart, "equalHeight")==0)
572  else if (strcasecmp(wstart, "justifyLeft")==0)
574  else if (strcasecmp(wstart, "justifyRight")==0)
576  else if (strcasecmp(wstart, "justifyTop")==0)
578  else if (strcasecmp(wstart, "justifyBottom")==0)
580  else if (strcasecmp(wstart, "justifyCenterX")==0)
582  else if (strcasecmp(wstart, "justifyCenterY")==0)
584  else if (strcasecmp(wstart, "noWordWrap")==0)
586  else if (strcasecmp(wstart, "frameSunken")==0)
588  else if (strcasecmp(wstart, "frameRaised")==0)
590  else if (strcasecmp(wstart, "frameThick")==0)
592  else if (strcasecmp(wstart, "frameGroove")==0)
594  }
595  if (copy)
596  free(copy);
597  }
598 
599  return fl;
600 }
601 
602 
603 
605 {
606  const char *s;
607 
608  s=GWEN_XMLNode_GetProperty(node, "name", NULL);
609  if (s && *s)
610  GWEN_Widget_SetName(w, s);
611 
612  s=GWEN_XMLNode_GetProperty(node, "type", "unknown");
613  if (s && *s) {
614  w->wtype=GWEN_Widget_Type_fromString(s);
615  if (w->wtype==GWEN_Widget_TypeUnknown) {
616  DBG_ERROR(GWEN_LOGDOMAIN, "unknown type in node");
617  GWEN_XMLNode_Dump(node, 2);
618  return GWEN_ERROR_BAD_DATA;
619  }
620  }
621  else {
622  DBG_ERROR(GWEN_LOGDOMAIN, "type property missing in node");
623  return GWEN_ERROR_BAD_DATA;
624  }
625 
626  s=GWEN_XMLNode_GetProperty(node, "flags", NULL);
627  if (s && *s)
628  w->flags=GWEN_Widget_Flags_fromString(s);
629 
630  s=GWEN_XMLNode_GetProperty(node, "columns", NULL);
631  if (s && *s) {
632  if (1!=sscanf(s, "%d", &(w->columns))) {
633  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
634  return GWEN_ERROR_BAD_DATA;
635  }
636  }
637 
638  s=GWEN_XMLNode_GetProperty(node, "rows", NULL);
639  if (s && *s) {
640  if (1!=sscanf(s, "%d", &(w->rows))) {
641  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
642  return GWEN_ERROR_BAD_DATA;
643  }
644  }
645 
646  s=GWEN_XMLNode_GetProperty(node, "width", NULL);
647  if (s && *s) {
648  if (1!=sscanf(s, "%d", &(w->width))) {
649  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
650  return GWEN_ERROR_BAD_DATA;
651  }
652  }
653 
654  s=GWEN_XMLNode_GetProperty(node, "height", NULL);
655  if (s && *s) {
656  if (1!=sscanf(s, "%d", &(w->height))) {
657  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
658  return GWEN_ERROR_BAD_DATA;
659  }
660  }
661 
662  s=GWEN_XMLNode_GetProperty(node, "text", NULL);
663  if (s && *s)
665 
666  s=GWEN_XMLNode_GetProperty(node, "icon", NULL);
667  if (s && *s)
669 
670  s=GWEN_XMLNode_GetProperty(node, "image", NULL);
671  if (s && *s)
673 
674  s=GWEN_XMLNode_GetProperty(node, "groupId", NULL);
675  if (s && *s) {
676  if (1!=sscanf(s, "%d", &(w->groupId))) {
677  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
678  return GWEN_ERROR_BAD_DATA;
679  }
680  }
681 
682  return 0;
683 }
684 
685 
686 
689 {
691 
692  assert(w);
693  assert(w->refCount);
694 
695  of=w->setIntPropertyFn;
696  w->setIntPropertyFn=fn;
697  return of;
698 }
699 
700 
701 
704 {
706 
707  assert(w);
708  assert(w->refCount);
709 
710  of=w->getIntPropertyFn;
711  w->getIntPropertyFn=fn;
712  return of;
713 }
714 
715 
716 
719 {
721 
722  assert(w);
723  assert(w->refCount);
724 
725  of=w->setCharPropertyFn;
726  w->setCharPropertyFn=fn;
727  return of;
728 }
729 
730 
731 
734 {
736 
737  assert(w);
738  assert(w->refCount);
739 
740  of=w->getCharPropertyFn;
741  w->getCharPropertyFn=fn;
742  return of;
743 }
744 
745 
746 
749 {
751 
752  assert(w);
753  assert(w->refCount);
754 
755  of=w->addChildGuiWidgetFn;
756  w->addChildGuiWidgetFn=fn;
757  return of;
758 }
759 
760 
761 
764  int index,
765  int value,
766  int doSignal)
767 {
768  assert(w);
769  assert(w->refCount);
770 
771  if (w->setIntPropertyFn)
772  return w->setIntPropertyFn(w, prop, index, value, doSignal);
773  else
775 }
776 
777 
778 
781  int index,
782  int defaultValue)
783 {
784  assert(w);
785  assert(w->refCount);
786 
787  if (w->getIntPropertyFn)
788  return w->getIntPropertyFn(w, prop, index, defaultValue);
789  else
790  return defaultValue;
791 }
792 
793 
794 
797  int index,
798  const char *value,
799  int doSignal)
800 {
801  assert(w);
802  assert(w->refCount);
803 
804  if (w->setCharPropertyFn)
805  return w->setCharPropertyFn(w, prop, index, value, doSignal);
806  else
808 }
809 
810 
811 
814  int index,
815  const char *defaultValue)
816 {
817  assert(w);
818  assert(w->refCount);
819 
820  if (w->getCharPropertyFn)
821  return w->getCharPropertyFn(w, prop, index, defaultValue);
822  else
823  return defaultValue;
824 }
825 
826 
827 
829 {
830  assert(w);
831  assert(w->refCount);
832 
833  if (w->addChildGuiWidgetFn)
834  return w->addChildGuiWidgetFn(w, wChild);
835  else
837 }
838 
839 
840 
841 
842 
GWEN_WIDGET_TYPE GWEN_Widget_GetType(const GWEN_WIDGET *w)
Definition: widget.c:185
#define GWEN_WIDGET_FLAGS_DECOR_MENU
Definition: dialog.h:72
void GWEN_Widget_SetWidth(GWEN_WIDGET *w, int i)
Definition: widget.c:266
const char * GWEN_Widget_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
Definition: widget.c:812
#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:304
#define GWEN_WIDGET_FLAGS_JUSTIFY_TOP
Definition: dialog.h:81
#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:795
#define GWEN_WIDGET_FLAGS_FRAME_RAISED
Definition: dialog.h:91
const char * GWEN_XMLNode_GetProperty(const GWEN_XMLNODE *n, const char *name, const char *defaultValue)
Definition: xml.c:239
#define GWEN_WIDGET_FLAGS_EQUAL_WIDTH
Definition: dialog.h:76
#define GWEN_WIDGET_FLAGS_DECOR_MAXIMIZE
Definition: dialog.h:70
const char * GWEN_Widget_GetName(const GWEN_WIDGET *w)
Definition: widget.c:320
#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:717
GWEN_WIDGET_GETCHARPROPERTY_FN GWEN_Widget_SetGetCharPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_GETCHARPROPERTY_FN fn)
Definition: widget.c:732
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERY
Definition: dialog.h:84
GWEN_DIALOG_PROPERTY
Definition: dialog.h:260
#define GWEN_FREE_OBJECT(varname)
Definition: memory.h:61
#define NULL
Definition: binreloc.c:300
#define GWEN_WIDGET_IMPLDATACOUNT
Definition: widget_be.h:46
void GWEN_Widget_SetIconFileName(GWEN_WIDGET *w, const char *s)
Definition: widget.c:351
int GWENHYWFAR_CB(* GWEN_WIDGET_ADDCHILDGUIWIDGET_FN)(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition: widget_be.h:119
void GWEN_Widget_SetFlags(GWEN_WIDGET *w, uint32_t fl)
Definition: widget.c:158
void GWEN_Widget_free(GWEN_WIDGET *w)
Definition: widget.c:66
void GWEN_Widget_SubFlags(GWEN_WIDGET *w, uint32_t fl)
Definition: widget.c:176
uint32_t GWEN_Widget_GetFlags(const GWEN_WIDGET *w)
Definition: widget.c:149
void GWEN_XMLNode_Dump(const GWEN_XMLNODE *n, int ind)
Definition: xml.c:472
const char * GWEN_Dialog_TranslateString(const GWEN_DIALOG *dlg, const char *s)
Definition: dialog.c:236
int GWEN_Widget_GetRows(const GWEN_WIDGET *w)
Definition: widget.c:221
#define GWEN_LOGDOMAIN
Definition: logger.h:35
int GWEN_Widget_GetHeight(const GWEN_WIDGET *w)
Definition: widget.c:275
#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:136
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:702
#define GWEN_WIDGET_FLAGS_EQUAL_HEIGHT
Definition: dialog.h:77
#define GWEN_WIDGET_FLAGS_DEFAULT_WIDGET
Definition: dialog.h:65
#define GWEN_ERROR_BAD_DATA
Definition: error.h:121
#define GWEN_NEW_OBJECT(typ, varname)
Definition: memory.h:55
void * GWEN_Widget_GetImplData(const GWEN_WIDGET *w, int index)
Definition: widget.c:122
GWEN_DIALOG * GWEN_Widget_GetDialog(const GWEN_WIDGET *w)
Definition: widget.c:92
int GWEN_Widget_GetColumns(const GWEN_WIDGET *w)
Definition: widget.c:203
void GWEN_Widget_SetHeight(GWEN_WIDGET *w, int i)
Definition: widget.c:284
#define GWEN_WIDGET_FLAGS_FRAME_GROOVE
Definition: dialog.h:93
uint32_t GWEN_Widget_Flags_fromString(const char *s)
Definition: widget.c:514
GWEN_WIDGET_ADDCHILDGUIWIDGET_FN GWEN_Widget_SetAddChildGuiWidgetFn(GWEN_WIDGET *w, GWEN_WIDGET_ADDCHILDGUIWIDGET_FN fn)
Definition: widget.c:747
#define GWEN_WIDGET_FLAGS_FRAME_SUNKEN
Definition: dialog.h:90
#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:687
#define GWEN_WIDGET_TEXTCOUNT
Definition: widget_be.h:45
GWEN_DIALOG * GWEN_Widget_GetTopDialog(const GWEN_WIDGET *w)
Definition: widget.c:102
#define GWEN_WIDGET_FLAGS_DECOR_CLOSE
Definition: dialog.h:71
#define GWEN_TREE_FINI(t, element)
Definition: tree.h:571
const char * GWEN_Widget_GetIconFileName(const GWEN_WIDGET *w)
Definition: widget.c:342
void GWEN_Widget_SetRows(GWEN_WIDGET *w, int i)
Definition: widget.c:230
#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:212
int GWEN_Widget_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition: widget.c:828
#define GWEN_WIDGET_FLAGS_FILLY
Definition: dialog.h:62
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
#define GWEN_WIDGET_FLAGS_FILLX
Definition: dialog.h:61
void GWEN_Widget_SetName(GWEN_WIDGET *w, const char *s)
Definition: widget.c:329
int GWENHYWFAR_CB(* GWEN_WIDGET_GETINTPROPERTY_FN)(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: widget_be.h:103
int GWEN_Widget_GetGroupId(const GWEN_WIDGET *w)
Definition: widget.c:239
int GWEN_Widget_GetWidth(const GWEN_WIDGET *w)
Definition: widget.c:257
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:194
int GWEN_Widget_ReadXml(GWEN_WIDGET *w, GWEN_XMLNODE *node)
Definition: widget.c:604
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:167
int GWEN_Widget_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition: widget.c:762
GWEN_DIALOG * GWEN_Dialog_GetParentDialog(const GWEN_DIALOG *dlg)
Definition: dialog.c:172
void GWEN_Widget_SetImageFileName(GWEN_WIDGET *w, const char *s)
Definition: widget.c:373
int GWEN_Widget_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: widget.c:779
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_TREE_INIT(t, element)
Definition: tree.h:562
#define GWEN_WIDGET_FLAGS_FRAME_THICK
Definition: dialog.h:92
#define GWEN_WIDGET_FLAGS_JUSTIFY_LEFT
Definition: dialog.h:79
GWEN_WIDGET_TYPE GWEN_Widget_Type_fromString(const char *s)
Definition: widget.c:388
const char * GWEN_Widget_GetImageFileName(const GWEN_WIDGET *w)
Definition: widget.c:364
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERX
Definition: dialog.h:83
const char * GWEN_Widget_Type_toString(GWEN_WIDGET_TYPE t)
Definition: widget.c:452
#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:293
#define GWEN_INHERIT_FUNCTIONS(t)
Definition: inherit.h:163
struct GWEN__XMLNODE GWEN_XMLNODE
Definition: xml.h:156
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_TREE_FUNCTIONS(t, pr)
Definition: tree.h:402
void GWEN_Widget_SetGroupId(GWEN_WIDGET *w, int i)
Definition: widget.c:248
#define GWEN_ERROR_NOT_IMPLEMENTED
Definition: error.h:108