gwenhywfar  5.14.1
widget.c
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Wed Jan 20 2010
3  copyright : (C) 2025 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 if (strcasecmp(s, "hSplitter")==0)
445  else if (strcasecmp(s, "vSplitter")==0)
447  else {
448  DBG_ERROR(GWEN_LOGDOMAIN, "Unknown widget type [%s]", s);
449  }
450  }
452 }
453 
454 
455 
457 {
458  switch (t) {
460  return "none";
462  return "label";
464  return "pushButton";
466  return "lineEdit";
468  return "textEdit";
470  return "comboBox";
472  return "radioButton";
474  return "progressBar";
476  return "groupBox";
478  return "hSpacer";
480  return "vSpacer";
482  return "hLayout";
484  return "vLayout";
486  return "gridLayout";
488  return "listBox";
490  return "dialog";
492  return "tabBook";
494  return "tabPage";
496  return "widgetStack";
498  return "checkBox";
500  return "scrollArea";
502  return "hLine";
504  return "vLine";
506  return "textBrowser";
508  return "spinBox";
510  return "hSplitter";
512  return "vSplitter";
514  return "unknown";
515  }
516 
517  return "unknown";
518 }
519 
520 
521 
522 uint32_t GWEN_Widget_Flags_fromString(const char *s)
523 {
524  uint32_t fl=0;
525 
526  if (s && *s) {
527  char *copy;
528  char *p;
529 
530  copy=strdup(s);
531  p=copy;
532 
533  while (*p) {
534  char *wstart;
535 
536  /* skip blanks */
537  while (*p && isspace(*p))
538  p++;
539  /* save start of word */
540  wstart=p;
541 
542  /* find end of word */
543  while (*p && !(isspace(*p) || *p==','))
544  p++;
545  if (*p)
546  /* set blank or comma to 0, advance pointer */
547  *(p++)=0;
548 
549  /* parse flags */
550  if (strcasecmp(wstart, "fillX")==0)
552  else if (strcasecmp(wstart, "fillY")==0)
554  else if (strcasecmp(wstart, "readOnly")==0)
556  else if (strcasecmp(wstart, "password")==0)
558  else if (strcasecmp(wstart, "default")==0)
560  else if (strcasecmp(wstart, "decorShrinkable")==0)
562  else if (strcasecmp(wstart, "decorStretchable")==0)
564  else if (strcasecmp(wstart, "decorMinimize")==0)
566  else if (strcasecmp(wstart, "decorMaximize")==0)
568  else if (strcasecmp(wstart, "decorClose")==0)
570  else if (strcasecmp(wstart, "decorMenu")==0)
572  else if (strcasecmp(wstart, "fixedWidth")==0)
574  else if (strcasecmp(wstart, "fixedHeight")==0)
576  else if (strcasecmp(wstart, "equalWidth")==0)
578  else if (strcasecmp(wstart, "equalHeight")==0)
580  else if (strcasecmp(wstart, "justifyLeft")==0)
582  else if (strcasecmp(wstart, "justifyRight")==0)
584  else if (strcasecmp(wstart, "justifyTop")==0)
586  else if (strcasecmp(wstart, "justifyBottom")==0)
588  else if (strcasecmp(wstart, "justifyCenterX")==0)
590  else if (strcasecmp(wstart, "justifyCenterY")==0)
592  else if (strcasecmp(wstart, "noWordWrap")==0)
594  else if (strcasecmp(wstart, "frameSunken")==0)
596  else if (strcasecmp(wstart, "frameRaised")==0)
598  else if (strcasecmp(wstart, "frameThick")==0)
600  else if (strcasecmp(wstart, "frameGroove")==0)
602  }
603  if (copy)
604  free(copy);
605  }
606 
607  return fl;
608 }
609 
610 
611 
613 {
614  const char *s;
615 
616  s=GWEN_XMLNode_GetProperty(node, "name", NULL);
617  if (s && *s)
618  GWEN_Widget_SetName(w, s);
619 
620  s=GWEN_XMLNode_GetProperty(node, "type", "unknown");
621  if (s && *s) {
622  w->wtype=GWEN_Widget_Type_fromString(s);
623  if (w->wtype==GWEN_Widget_TypeUnknown) {
624  DBG_ERROR(GWEN_LOGDOMAIN, "unknown type in node");
625  GWEN_XMLNode_Dump(node, 2);
626  return GWEN_ERROR_BAD_DATA;
627  }
628  }
629  else {
630  DBG_ERROR(GWEN_LOGDOMAIN, "type property missing in node");
631  return GWEN_ERROR_BAD_DATA;
632  }
633 
634  s=GWEN_XMLNode_GetProperty(node, "flags", NULL);
635  if (s && *s)
636  w->flags=GWEN_Widget_Flags_fromString(s);
637 
638  s=GWEN_XMLNode_GetProperty(node, "columns", NULL);
639  if (s && *s) {
640  if (1!=sscanf(s, "%d", &(w->columns))) {
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, "rows", NULL);
647  if (s && *s) {
648  if (1!=sscanf(s, "%d", &(w->rows))) {
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, "width", NULL);
655  if (s && *s) {
656  if (1!=sscanf(s, "%d", &(w->width))) {
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, "height", NULL);
663  if (s && *s) {
664  if (1!=sscanf(s, "%d", &(w->height))) {
665  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
666  return GWEN_ERROR_BAD_DATA;
667  }
668  }
669 
670  s=GWEN_XMLNode_GetProperty(node, "text", NULL);
671  if (s && *s)
673 
674  s=GWEN_XMLNode_GetProperty(node, "icon", NULL);
675  if (s && *s)
677 
678  s=GWEN_XMLNode_GetProperty(node, "image", NULL);
679  if (s && *s)
681 
682  s=GWEN_XMLNode_GetProperty(node, "groupId", NULL);
683  if (s && *s) {
684  if (1!=sscanf(s, "%d", &(w->groupId))) {
685  DBG_ERROR(GWEN_LOGDOMAIN, "Value [%s] is not an integer", s);
686  return GWEN_ERROR_BAD_DATA;
687  }
688  }
689 
690  return 0;
691 }
692 
693 
694 
697 {
699 
700  assert(w);
701  assert(w->refCount);
702 
703  of=w->setIntPropertyFn;
704  w->setIntPropertyFn=fn;
705  return of;
706 }
707 
708 
709 
712 {
714 
715  assert(w);
716  assert(w->refCount);
717 
718  of=w->getIntPropertyFn;
719  w->getIntPropertyFn=fn;
720  return of;
721 }
722 
723 
724 
727 {
729 
730  assert(w);
731  assert(w->refCount);
732 
733  of=w->setCharPropertyFn;
734  w->setCharPropertyFn=fn;
735  return of;
736 }
737 
738 
739 
742 {
744 
745  assert(w);
746  assert(w->refCount);
747 
748  of=w->getCharPropertyFn;
749  w->getCharPropertyFn=fn;
750  return of;
751 }
752 
753 
754 
757 {
759 
760  assert(w);
761  assert(w->refCount);
762 
763  of=w->addChildGuiWidgetFn;
764  w->addChildGuiWidgetFn=fn;
765  return of;
766 }
767 
768 
769 
772  int index,
773  int value,
774  int doSignal)
775 {
776  assert(w);
777  assert(w->refCount);
778 
779  if (w->setIntPropertyFn)
780  return w->setIntPropertyFn(w, prop, index, value, doSignal);
781  else
783 }
784 
785 
786 
789  int index,
790  int defaultValue)
791 {
792  assert(w);
793  assert(w->refCount);
794 
795  if (w->getIntPropertyFn)
796  return w->getIntPropertyFn(w, prop, index, defaultValue);
797  else
798  return defaultValue;
799 }
800 
801 
802 
805  int index,
806  const char *value,
807  int doSignal)
808 {
809  assert(w);
810  assert(w->refCount);
811 
812  if (w->setCharPropertyFn)
813  return w->setCharPropertyFn(w, prop, index, value, doSignal);
814  else
816 }
817 
818 
819 
822  int index,
823  const char *defaultValue)
824 {
825  assert(w);
826  assert(w->refCount);
827 
828  if (w->getCharPropertyFn)
829  return w->getCharPropertyFn(w, prop, index, defaultValue);
830  else
831  return defaultValue;
832 }
833 
834 
835 
837 {
838  assert(w);
839  assert(w->refCount);
840 
841  if (w->addChildGuiWidgetFn)
842  return w->addChildGuiWidgetFn(w, wChild);
843  else
845 }
846 
847 
848 
849 
850 
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
#define DBG_ERROR(dbg_logger, format,...)
Definition: debug.h:97
const char * GWEN_Widget_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
Definition: widget.c:820
#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:803
#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:725
GWEN_WIDGET_GETCHARPROPERTY_FN GWEN_Widget_SetGetCharPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_GETCHARPROPERTY_FN fn)
Definition: widget.c:740
#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:121
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:32
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:710
#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:522
GWEN_WIDGET_ADDCHILDGUIWIDGET_FN GWEN_Widget_SetAddChildGuiWidgetFn(GWEN_WIDGET *w, GWEN_WIDGET_ADDCHILDGUIWIDGET_FN fn)
Definition: widget.c:755
#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:695
#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:836
#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:99
#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:105
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
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:612
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:770
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:787
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:110
#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:456
#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:116
#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