More fixes. It builds and runs now, but isn't quite perfect.

This commit is contained in:
Pietro Gagliardi 2015-05-30 11:44:37 -04:00
parent c1d2fcfb3f
commit c1773621ac
3 changed files with 7 additions and 6 deletions

View File

@ -203,6 +203,7 @@ static void boxResize(uiControl *c, intmax_t x, intmax_t y, intmax_t width, intm
uiFreeSizing(dchild);
}
// TODO this doesn't really work the way we want for Z-orders
static void boxSysFunc(uiControl *c, uiControlSysFuncParams *p)
{
struct box *b = (struct box *) c;
@ -263,8 +264,7 @@ uiBox *uiNewHorizontalBox(void)
{
struct box *b;
b = uiNew(struct box);
uiTyped(b)->Type = uiTypeBox();
b = (struct box *) uiNewControl(uiTypeBox());
b->handle = uiMakeContainer(uiControl(b));

View File

@ -148,8 +148,7 @@ uiRadioButtons *uiNewRadioButtons(void)
{
struct radiobuttons *r;
r = uiNew(struct radiobuttons);
uiTyped(r)->Type = uiTypeRadioButtons();
r = (struct radiobuttons *) uiNewControl(uiTypeRadioButtons());
r->hwnds = newPtrArray();

View File

@ -145,8 +145,8 @@ static uiSizing *windowSizing(uiControl *c)
static int windowContainerVisible(uiControl *c)
{
complain("attempt to get container visibility state of uiWindow %p", c);
return 0; // make compiler happy
// TODO
return 1;
}
static void windowShow(uiControl *c)
@ -358,6 +358,8 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
uiControl(w)->ContainerVisible = windowContainerVisible;
uiControl(w)->Show = windowShow;
uiControl(w)->Hide = windowHide;
// TODO
uiControl(w)->ContainerEnabled = windowContainerVisible;
uiControl(w)->Enable = windowEnable;
uiControl(w)->Disable = windowDisable;
uiControl(w)->SysFunc = windowSysFunc;