libui/redo/windows/group.c

65 lines
1.1 KiB
C
Raw Normal View History

// 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)
{
// TODO
2015-05-16 19:31:56 -05:00
}
static void groupPreferredSize(uiControl *c, uiSizing *d, intmax_t *width, intmax_t *height)
{
// TODO
2015-05-16 19:31:56 -05:00
}
static void groupSetChild(uiGroup *gg, uiControl *c)
{
// 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);
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);
}