2015-11-26 17:27:23 -06:00
|
|
|
// 18 november 2015
|
|
|
|
#include "uipriv_wpf.hpp"
|
|
|
|
|
|
|
|
struct uiGroup {
|
|
|
|
uiWindowsControl c;
|
2015-11-26 18:11:55 -06:00
|
|
|
gcroot<GroupBox ^> *groupbox;
|
|
|
|
int margined;
|
2015-11-26 17:27:23 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
uiWindowsDefineControl(
|
|
|
|
uiGroup, // type name
|
|
|
|
uiGroupType, // type function
|
2015-11-26 18:11:55 -06:00
|
|
|
groupbox // handle
|
2015-11-26 17:27:23 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
char *uiGroupTitle(uiGroup *g)
|
|
|
|
{
|
2015-11-26 18:11:55 -06:00
|
|
|
String ^text;
|
|
|
|
|
|
|
|
// TOOD bad cast?
|
|
|
|
text = (String ^) ((*(g->groupbox))->Header);
|
|
|
|
return uiWindowsCLRStringToText(text);
|
2015-11-26 17:27:23 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void uiGroupSetTitle(uiGroup *g, const char *title)
|
|
|
|
{
|
2015-11-26 18:11:55 -06:00
|
|
|
(*(g->groupbox))->Header = fromUTF8(title);
|
|
|
|
// TODO layout
|
2015-11-26 17:27:23 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void uiGroupSetChild(uiGroup *g, uiControl *c)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
int uiGroupMargined(uiGroup *g)
|
|
|
|
{
|
2015-11-26 18:11:55 -06:00
|
|
|
return g->margined;
|
2015-11-26 17:27:23 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void uiGroupSetMargined(uiGroup *g, int margined)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
uiGroup *uiNewGroup(const char *title)
|
|
|
|
{
|
|
|
|
uiGroup *g;
|
|
|
|
|
|
|
|
g = (uiGroup *) uiNewControl(uiGroupType());
|
|
|
|
|
2015-11-26 18:11:55 -06:00
|
|
|
g->groupbox = new gcroot<GroupBox ^>();
|
|
|
|
*(g->groupbox) = gcnew GroupBox();
|
|
|
|
(*(g->groupbox))->Header = fromUTF8(title);
|
2015-11-26 17:27:23 -06:00
|
|
|
|
2015-11-26 18:11:55 -06:00
|
|
|
uiWindowsFinishNewControl(g, uiGroup, groupbox);
|
2015-11-26 17:27:23 -06:00
|
|
|
|
|
|
|
return g;
|
|
|
|
}
|