30 #define DISABLE_DEBUGLOG
35 #include <gwenhywfar/text.h>
36 #include <gwenhywfar/debug.h>
37 #include <gwenhywfar/dialog_be.h>
122 return w->impl_data[index];
135 w->impl_data[index]=ptr;
287 if (s) w->text[idx]=strdup(s);
288 else w->text[idx]=
NULL;
306 if (s) w->name=strdup(s);
324 if (s) w->iconFile=strdup(s);
325 else w->iconFile=
NULL;
342 if (s) w->imageFile=strdup(s);
343 else w->imageFile=
NULL;
352 if (strcasecmp(s,
"unknown")==0)
354 else if (strcasecmp(s,
"none")==0)
356 else if (strcasecmp(s,
"label")==0)
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)
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)
398 else if (strcasecmp(s,
"vLine")==0)
400 else if (strcasecmp(s,
"textBrowser")==0)
402 else if (strcasecmp(s,
"spinBox")==0)
428 return "radioButton";
430 return "progressBar";
452 return "widgetStack";
462 return "textBrowser";
488 while(*p && isspace(*p))
494 while(*p && !(isspace(*p) || *p==
','))
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)
580 if (1!=sscanf(s,
"%d", &(w->columns))) {
588 if (1!=sscanf(s,
"%d", &(w->rows))) {
596 if (1!=sscanf(s,
"%d", &(w->width))) {
604 if (1!=sscanf(s,
"%d", &(w->height))) {
624 if (1!=sscanf(s,
"%d", &(w->groupId))) {
642 of=w->setIntPropertyFn;
643 w->setIntPropertyFn=fn;
656 of=w->getIntPropertyFn;
657 w->getIntPropertyFn=fn;
670 of=w->setCharPropertyFn;
671 w->setCharPropertyFn=fn;
684 of=w->getCharPropertyFn;
685 w->getCharPropertyFn=fn;
698 of=w->addChildGuiWidgetFn;
699 w->addChildGuiWidgetFn=fn;
713 if (w->setIntPropertyFn)
714 return w->setIntPropertyFn(w, prop, index, value, doSignal);
728 if (w->getIntPropertyFn)
729 return w->getIntPropertyFn(w, prop, index, defaultValue);
744 if (w->setCharPropertyFn)
745 return w->setCharPropertyFn(w, prop, index, value, doSignal);
755 const char *defaultValue) {
759 if (w->getCharPropertyFn)
760 return w->getCharPropertyFn(w, prop, index, defaultValue);
771 if (w->addChildGuiWidgetFn)
772 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)
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_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_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