libui/redo/darwin/combobox.m

49 lines
866 B
Mathematica
Raw Normal View History

// 11 june 2015
2015-07-11 16:02:01 -05:00
#include "uipriv_darwin.h"
struct combobox {
uiCombobox c;
2015-07-11 16:02:01 -05:00
OSTYPE *OSHANDLE;
};
uiDefineControlType(uiCombobox, uiTypeCombobox, struct combobox)
static uintptr_t comboboxHandle(uiControl *cc)
{
struct combobox *c = (struct combobox *) cc;
return (uintptr_t) (c->OSHANDLE);
}
static void comboboxAppend(uiCombobox *cc, const char *text)
{
struct combobox *c = (struct combobox *) cc;
PUT_CODE_HERE;
}
static uiCombobox *finishNewCombobox(OSTHING OSARG)
{
struct combobox *c;
c = (struct combobox *) MAKE_CONTROL_INSTANCE(uiTypeCombobox());
PUT_CODE_HERE;
uiControl(c)->Handle = comboboxHandle;
uiCombobox(c)->Append = comboboxAppend;
return uiCombobox(c);
}
uiCombobox *uiNewCombobox(void)
{
return finishNewCombobox(OSARGNONEDITABLE);
}
uiCombobox *uiNewEditableCombobox(void)
{
return finishNewCombobox(OSARGEDITABLE);
}