Finished the control stubbing. Everything (that is expected to work) works (so far)!
This commit is contained in:
parent
7cafbd223a
commit
2ca99e3ffe
|
@ -4,6 +4,8 @@
|
|||
struct combobox {
|
||||
uiCombobox c;
|
||||
GtkWidget *widget;
|
||||
GtkComboBox *combobox;
|
||||
GtkComboBoxText *comboboxText;
|
||||
};
|
||||
|
||||
uiDefineControlType(uiCombobox, uiTypeCombobox, struct combobox)
|
||||
|
@ -22,13 +24,16 @@ static void comboboxAppend(uiCombobox *cc, const char *text)
|
|||
PUT_CODE_HERE;
|
||||
}
|
||||
|
||||
static uiCombobox *finishNewCombobox(GtkWidget (*newfunc)(void))
|
||||
static uiCombobox *finishNewCombobox(GtkWidget *(*newfunc)(void))
|
||||
{
|
||||
struct combobox *c;
|
||||
|
||||
c = (struct combobox *) uiNewControl(uiTypeCombobox());
|
||||
|
||||
PUT_CODE_HERE;
|
||||
c->widget = (*newfunc)();
|
||||
c->combobox = GTK_COMBO_BOX(c->widget);
|
||||
c->comboboxText = GTK_COMBO_BOX_TEXT(c->widget);
|
||||
uiUnixMakeSingleWidgetControl(uiControl(c), c->widget);
|
||||
|
||||
uiControl(c)->Handle = comboboxHandle;
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ uiDateTimePicker *finishNewDateTimePicker(OSTHING OSARG)
|
|||
|
||||
d = (struct datetimepicker *) uiNewControl(uiTypeDateTimePicker());
|
||||
|
||||
PUT_CODE_HERE;
|
||||
d->widget = gtk_label_new("TODO uiDateTimePicker not implemented");
|
||||
uiUnixMakeSingleWidgetControl(uiControl(d), d->widget);
|
||||
|
||||
uiControl(d)->Handle = datetimepickerHandle;
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
// 11 june 2015
|
||||
#include "uipriv_unix.h"
|
||||
|
||||
// on GTK+ a uiRadioButtons is a GtkBox with each of the GtkRadioButtons as children
|
||||
|
||||
struct radiobuttons {
|
||||
uiRadioButtons r;
|
||||
GtkWidget *boxWidget;
|
||||
GtkBox *box;
|
||||
};
|
||||
|
||||
uiDefineControlType(uiRadioButtons, uiTypeRadioButtons, struct radiobuttons)
|
||||
|
@ -26,7 +30,9 @@ uiRadioButtons *uiNewRadioButtons(void)
|
|||
|
||||
r = (struct radiobuttons *) uiNewControl(uiTypeRadioButtons());
|
||||
|
||||
PUT_CODE_HERE;
|
||||
r->boxWidget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
||||
r->box = GTK_BOX(r->boxWidget);
|
||||
uiUnixMakeSingleWidgetControl(uiControl(r), r->boxWidget);
|
||||
|
||||
uiControl(r)->Handle = radiobuttonsHandle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue