Reimplemented tab page margins.

This commit is contained in:
Pietro Gagliardi 2015-05-31 10:53:20 -04:00
parent 8a84b9e062
commit f9f5abc802
3 changed files with 19 additions and 4 deletions

View File

@ -178,8 +178,7 @@ static int tabMargined(uiTab *tt, uintmax_t n)
uiControl *page;
page = ptrArrayIndex(t->pages, uiControl *, n);
//TODO return page->margined;
return 0;
return tabPageMargined(page);
}
static void tabSetMargined(uiTab *tt, uintmax_t n, int margined)
@ -188,8 +187,8 @@ static void tabSetMargined(uiTab *tt, uintmax_t n, int margined)
uiControl *page;
page = ptrArrayIndex(t->pages, uiControl *, n);
//TODO page->margined = margined;
//TODO uiControlQueueResize(page->control);
tabPageSetMargined(page, margined);
uiControlQueueResize(page);
}
uiTab *uiNewTab(void)

View File

@ -99,3 +99,17 @@ uiControl *newTabPage(uiControl *child)
return uiControl(t);
}
int tabPageMargined(uiControl *c)
{
struct tabPage *t = (struct tabPage *) c;
return t->margined;
}
void tabPageSetMargined(uiControl *c, int margined)
{
struct tabPage *t = (struct tabPage *) c;
t->margined = margined;
}

View File

@ -134,3 +134,5 @@ extern void setSingleHWNDFuncs(uiControl *);
// tabpage.c
extern uiControl *newTabPage(uiControl *);
extern int tabPageMargined(uiControl *);
extern void tabPageSetMargined(uiControl *, int);