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)
462 while(*p && isspace(*p))
468 while(*p && !(isspace(*p) || *p==
','))
475 if (strcasecmp(wstart,
"fillX")==0)
477 else if (strcasecmp(wstart,
"fillY")==0)
479 else if (strcasecmp(wstart,
"readOnly")==0)
481 else if (strcasecmp(wstart,
"password")==0)
483 else if (strcasecmp(wstart,
"default")==0)
485 else if (strcasecmp(wstart,
"decorShrinkable")==0)
487 else if (strcasecmp(wstart,
"decorStretchable")==0)
489 else if (strcasecmp(wstart,
"decorMinimize")==0)
491 else if (strcasecmp(wstart,
"decorMaximize")==0)
493 else if (strcasecmp(wstart,
"decorClose")==0)
495 else if (strcasecmp(wstart,
"decorMenu")==0)
497 else if (strcasecmp(wstart,
"fixedWidth")==0)
499 else if (strcasecmp(wstart,
"fixedHeight")==0)
501 else if (strcasecmp(wstart,
"equalWidth")==0)
503 else if (strcasecmp(wstart,
"equalHeight")==0)
505 else if (strcasecmp(wstart,
"justifyLeft")==0)
507 else if (strcasecmp(wstart,
"justifyRight")==0)
509 else if (strcasecmp(wstart,
"justifyTop")==0)
511 else if (strcasecmp(wstart,
"justifyBottom")==0)
513 else if (strcasecmp(wstart,
"justifyCenterX")==0)
515 else if (strcasecmp(wstart,
"justifyCenterY")==0)
517 else if (strcasecmp(wstart,
"noWordWrap")==0)
554 if (1!=sscanf(s,
"%d", &(w->columns))) {
562 if (1!=sscanf(s,
"%d", &(w->rows))) {
570 if (1!=sscanf(s,
"%d", &(w->width))) {
578 if (1!=sscanf(s,
"%d", &(w->height))) {
598 if (1!=sscanf(s,
"%d", &(w->groupId))) {
616 of=w->setIntPropertyFn;
617 w->setIntPropertyFn=fn;
630 of=w->getIntPropertyFn;
631 w->getIntPropertyFn=fn;
644 of=w->setCharPropertyFn;
645 w->setCharPropertyFn=fn;
658 of=w->getCharPropertyFn;
659 w->getCharPropertyFn=fn;
672 of=w->addChildGuiWidgetFn;
673 w->addChildGuiWidgetFn=fn;
687 if (w->setIntPropertyFn)
688 return w->setIntPropertyFn(w, prop, index, value, doSignal);
702 if (w->getIntPropertyFn)
703 return w->getIntPropertyFn(w, prop, index, defaultValue);
718 if (w->setCharPropertyFn)
719 return w->setCharPropertyFn(w, prop, index, value, doSignal);
729 const char *defaultValue) {
733 if (w->getCharPropertyFn)
734 return w->getCharPropertyFn(w, prop, index, defaultValue);
745 if (w->addChildGuiWidgetFn)
746 return w->addChildGuiWidgetFn(w, wChild);