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)
468 return "radioButton";
470 return "progressBar";
492 return "widgetStack";
502 return "textBrowser";
529 while (*p && isspace(*p))
535 while (*p && !(isspace(*p) || *p==
','))
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)
632 if (1!=sscanf(s,
"%d", &(w->columns))) {
640 if (1!=sscanf(s,
"%d", &(w->rows))) {
648 if (1!=sscanf(s,
"%d", &(w->width))) {
656 if (1!=sscanf(s,
"%d", &(w->height))) {
676 if (1!=sscanf(s,
"%d", &(w->groupId))) {
695 of=w->setIntPropertyFn;
696 w->setIntPropertyFn=fn;
710 of=w->getIntPropertyFn;
711 w->getIntPropertyFn=fn;
725 of=w->setCharPropertyFn;
726 w->setCharPropertyFn=fn;
740 of=w->getCharPropertyFn;
741 w->getCharPropertyFn=fn;
755 of=w->addChildGuiWidgetFn;
756 w->addChildGuiWidgetFn=fn;
771 if (w->setIntPropertyFn)
772 return w->setIntPropertyFn(w, prop, index, value, doSignal);
787 if (w->getIntPropertyFn)
788 return w->getIntPropertyFn(w, prop, index, defaultValue);
804 if (w->setCharPropertyFn)
805 return w->setCharPropertyFn(w, prop, index, value, doSignal);
815 const char *defaultValue)
820 if (w->getCharPropertyFn)
821 return w->getCharPropertyFn(w, prop, index, defaultValue);
833 if (w->addChildGuiWidgetFn)
834 return w->addChildGuiWidgetFn(w, wChild);
#define GWEN_WIDGET_FLAGS_DECOR_MENU
#define GWEN_WIDGET_FLAGS_DECOR_STRETCHABLE
#define GWEN_WIDGET_FLAGS_JUSTIFY_TOP
#define GWEN_INHERIT_FINI(t, element)
#define GWEN_WIDGET_FLAGS_FRAME_RAISED
const char * GWEN_XMLNode_GetProperty(const GWEN_XMLNODE *n, const char *name, const char *defaultValue)
#define GWEN_WIDGET_FLAGS_EQUAL_WIDTH
#define GWEN_WIDGET_FLAGS_DECOR_MAXIMIZE
#define GWEN_WIDGET_FLAGS_FIXED_WIDTH
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERY
#define GWEN_FREE_OBJECT(varname)
void GWEN_XMLNode_Dump(const GWEN_XMLNODE *n, int ind)
const char * GWEN_Dialog_TranslateString(const GWEN_DIALOG *dlg, const char *s)
#define GWEN_WIDGET_FLAGS_READONLY
struct GWEN_DIALOG GWEN_DIALOG
#define GWEN_WIDGET_FLAGS_JUSTIFY_RIGHT
#define GWEN_WIDGET_FLAGS_EQUAL_HEIGHT
#define GWEN_WIDGET_FLAGS_DEFAULT_WIDGET
#define GWEN_ERROR_BAD_DATA
#define GWEN_NEW_OBJECT(typ, varname)
#define GWEN_WIDGET_FLAGS_FRAME_GROOVE
#define GWEN_WIDGET_FLAGS_FRAME_SUNKEN
#define GWEN_WIDGET_FLAGS_PASSWORD
#define GWEN_WIDGET_FLAGS_DECOR_CLOSE
#define GWEN_TREE_FINI(t, element)
#define GWEN_WIDGET_FLAGS_JUSTIFY_BOTTOM
#define GWEN_WIDGET_FLAGS_NO_WORDWRAP
#define GWEN_INHERIT_INIT(t, element)
#define GWEN_WIDGET_FLAGS_FILLY
#define GWEN_WIDGET_FLAGS_FILLX
#define DBG_ERROR(dbg_logger, format, args...)
#define GWEN_WIDGET_FLAGS_FIXED_HEIGHT
GWEN_DIALOG * GWEN_Dialog_GetParentDialog(const GWEN_DIALOG *dlg)
#define GWEN_TREE_INIT(t, element)
#define GWEN_WIDGET_FLAGS_FRAME_THICK
#define GWEN_WIDGET_FLAGS_JUSTIFY_LEFT
#define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERX
#define GWEN_WIDGET_FLAGS_DECOR_SHRINKABLE
#define GWEN_WIDGET_FLAGS_DECOR_MINIMIZE
#define GWEN_INHERIT_FUNCTIONS(t)
struct GWEN__XMLNODE GWEN_XMLNODE
#define GWEN_TREE_FUNCTIONS(t, pr)
#define GWEN_ERROR_NOT_IMPLEMENTED