2015-05-17 12:01:42 -05:00
|
|
|
// 16 may 2015
|
2015-05-16 19:31:56 -05:00
|
|
|
#include "uipriv_windows.h"
|
|
|
|
|
|
|
|
struct group {
|
|
|
|
uiGroup g;
|
|
|
|
HWND hwnd;
|
|
|
|
};
|
|
|
|
|
|
|
|
static BOOL onWM_COMMAND(uiControl *c, WORD code, LRESULT *lResult)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL onWM_NOTIFY(uiControl *c, NMHDR *nm, LRESULT *lResult)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void onDestroy(void *data)
|
|
|
|
{
|
2015-05-17 12:01:42 -05:00
|
|
|
// TODO
|
2015-05-16 19:31:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static void groupPreferredSize(uiControl *c, uiSizing *d, intmax_t *width, intmax_t *height)
|
|
|
|
{
|
2015-05-17 12:01:42 -05:00
|
|
|
// TODO
|
2015-05-18 14:00:12 -05:00
|
|
|
*width = 0;
|
|
|
|
*height = 0;
|
2015-05-16 19:31:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static void groupSetChild(uiGroup *gg, uiControl *c)
|
|
|
|
{
|
2015-05-17 12:01:42 -05:00
|
|
|
// TODO
|
2015-05-16 19:31:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
uiGroup *uiNewGroup(const char *text)
|
|
|
|
{
|
|
|
|
struct group *g;
|
|
|
|
uiWindowsMakeControlParams p;
|
|
|
|
WCHAR *wtext;
|
|
|
|
|
|
|
|
g = uiNew(struct group);
|
2015-05-17 18:07:07 -05:00
|
|
|
uiTyped(g)->Type = uiTypeGroup();
|
2015-05-16 19:31:56 -05:00
|
|
|
|
|
|
|
p.dwExStyle = WS_EX_CONTROLPARENT;
|
|
|
|
p.lpClassName = L"button";
|
|
|
|
wtext = toUTF16(text);
|
|
|
|
p.lpWindowName = wtext;
|
|
|
|
p.dwStyle = BS_GROUPBOX;
|
|
|
|
p.hInstance = hInstance;
|
|
|
|
p.lpParam = NULL;
|
|
|
|
p.useStandardControlFont = TRUE;
|
|
|
|
p.onWM_COMMAND = onWM_COMMAND;
|
|
|
|
p.onWM_NOTIFY = onWM_NOTIFY;
|
|
|
|
p.onDestroy = onDestroy;
|
|
|
|
p.onDestroyData = g;
|
|
|
|
uiWindowsMakeControl(uiControl(g), &p);
|
|
|
|
uiFree(wtext);
|
|
|
|
|
|
|
|
g->hwnd = (HWND) uiControlHandle(uiControl(g));
|
|
|
|
|
|
|
|
uiControl(g)->PreferredSize = groupPreferredSize;
|
|
|
|
|
|
|
|
uiGroup(g)->SetChild = groupSetChild;
|
|
|
|
|
|
|
|
return uiGroup(g);
|
|
|
|
}
|