30#define DISABLE_DEBUGLOG
35#include <gwenhywfar/text.h>
36#include <gwenhywfar/debug.h>
37#include <gwenhywfar/dialog_be.h>
127 return w->impl_data[index];
141 w->impl_data[index]=ptr;
312 w->text[idx]=strdup(s);
357 w->iconFile=strdup(s);
379 w->imageFile=strdup(s);
391 if (strcasecmp(s,
"unknown")==0)
393 else if (strcasecmp(s,
"none")==0)
395 else if (strcasecmp(s,
"label")==0)
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)
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)
437 else if (strcasecmp(s,
"vLine")==0)
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)
472 return "radioButton";
474 return "progressBar";
496 return "widgetStack";
506 return "textBrowser";
537 while (*p && isspace(*p))
543 while (*p && !(isspace(*p) || *p==
','))
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)
640 if (1!=sscanf(s,
"%d", &(w->columns))) {
648 if (1!=sscanf(s,
"%d", &(w->rows))) {
656 if (1!=sscanf(s,
"%d", &(w->width))) {
664 if (1!=sscanf(s,
"%d", &(w->height))) {
684 if (1!=sscanf(s,
"%d", &(w->groupId))) {
703 of=w->setIntPropertyFn;
704 w->setIntPropertyFn=fn;
718 of=w->getIntPropertyFn;
719 w->getIntPropertyFn=fn;
733 of=w->setCharPropertyFn;
734 w->setCharPropertyFn=fn;
748 of=w->getCharPropertyFn;
749 w->getCharPropertyFn=fn;
763 of=w->addChildGuiWidgetFn;
764 w->addChildGuiWidgetFn=fn;
779 if (w->setIntPropertyFn)
780 return w->setIntPropertyFn(w, prop, index, value, doSignal);
795 if (w->getIntPropertyFn)
796 return w->getIntPropertyFn(w, prop, index, defaultValue);
812 if (w->setCharPropertyFn)
813 return w->setCharPropertyFn(w, prop, index, value, doSignal);
823 const char *defaultValue)
828 if (w->getCharPropertyFn)
829 return w->getCharPropertyFn(w, prop, index, defaultValue);
841 if (w->addChildGuiWidgetFn)
842 return w->addChildGuiWidgetFn(w, wChild);
#define DBG_ERROR(dbg_logger, format,...)
GWEN_DIALOG * GWEN_Dialog_GetParentDialog(const GWEN_DIALOG *dlg)
const char * GWEN_Dialog_TranslateString(const GWEN_DIALOG *dlg, const char *s)
#define GWEN_WIDGET_FLAGS_DECOR_MAXIMIZE
#define GWEN_WIDGET_FLAGS_JUSTIFY_RIGHT
#define GWEN_WIDGET_FLAGS_FRAME_RAISED
#define GWEN_WIDGET_FLAGS_FILLY
#define GWEN_WIDGET_FLAGS_PASSWORD
#define GWEN_WIDGET_FLAGS_FIXED_HEIGHT
#define GWEN_WIDGET_FLAGS_DECOR_CLOSE
#define GWEN_WIDGET_FLAGS_DECOR_SHRINKABLE
#define GWEN_WIDGET_FLAGS_DECOR_STRETCHABLE
#define GWEN_WIDGET_FLAGS_EQUAL_HEIGHT
#define GWEN_WIDGET_FLAGS_FILLX
struct GWEN_DIALOG GWEN_DIALOG
#define GWEN_WIDGET_FLAGS_JUSTIFY_TOP
#define GWEN_WIDGET_FLAGS_READONLY
#define GWEN_WIDGET_FLAGS_JUSTIFY_LEFT
#define GWEN_WIDGET_FLAGS_DECOR_MINIMIZE
#define GWEN_WIDGET_FLAGS_JUSTIFY_BOTTOM
#define GWEN_WIDGET_FLAGS_FIXED_WIDTH
#define GWEN_WIDGET_FLAGS_EQUAL_WIDTH
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERX
#define GWEN_WIDGET_FLAGS_FRAME_SUNKEN
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERY
#define GWEN_WIDGET_FLAGS_DEFAULT_WIDGET
#define GWEN_WIDGET_FLAGS_NO_WORDWRAP
#define GWEN_WIDGET_FLAGS_FRAME_GROOVE
#define GWEN_WIDGET_FLAGS_FRAME_THICK
#define GWEN_WIDGET_FLAGS_DECOR_MENU
#define GWEN_ERROR_NOT_IMPLEMENTED
#define GWEN_ERROR_BAD_DATA
#define GWEN_INHERIT_FUNCTIONS(t)
#define GWEN_INHERIT_INIT(t, element)
#define GWEN_INHERIT_FINI(t, element)
#define GWEN_FREE_OBJECT(varname)
#define GWEN_NEW_OBJECT(typ, varname)
#define GWEN_TREE_FINI(t, element)
#define GWEN_TREE_FUNCTIONS(t, pr)
#define GWEN_TREE_INIT(t, element)
const char * GWEN_XMLNode_GetProperty(const GWEN_XMLNODE *n, const char *name, const char *defaultValue)
void GWEN_XMLNode_Dump(const GWEN_XMLNODE *n, int ind)
struct GWEN__XMLNODE GWEN_XMLNODE