Started integrating tab stops and control IDs. Single-control situations handled.
This commit is contained in:
parent
42f6d0f974
commit
6be1cabf22
|
@ -123,6 +123,11 @@ void childUpdateState(struct child *c)
|
|||
controlUpdateState(c->c);
|
||||
}
|
||||
|
||||
void childSetSoleControlID(struct child *c)
|
||||
{
|
||||
uiWindowsEnsureAssignControlIDZOrder(c->hwnd, 100, NULL);
|
||||
}
|
||||
|
||||
HWND childTabPage(struct child *c)
|
||||
{
|
||||
return c->tabpage;
|
||||
|
|
|
@ -102,8 +102,10 @@ void uiGroupSetChild(uiGroup *g, uiControl *child)
|
|||
if (g->child != NULL)
|
||||
childRemove(g->child);
|
||||
g->child = newChild(child, uiControl(g), g->hwnd);
|
||||
if (g->child != NULL)
|
||||
if (g->child != NULL) {
|
||||
childSetSoleControlID(g->child);
|
||||
uiWindowsControlQueueRelayout(uiWindowsControl(g));
|
||||
}
|
||||
}
|
||||
|
||||
int uiGroupMargined(uiGroup *g)
|
||||
|
|
|
@ -160,6 +160,7 @@ void uiTabInsertAt(uiTab *t, const char *name, uintmax_t n, uiControl *child)
|
|||
// this is the only real way to do proper tab stops
|
||||
// it's how tabs are /supposed to/ be done, anyway
|
||||
page = newChildWithTabPage(child, uiControl(t), t->hwnd);
|
||||
childSetSoleControlID(page);
|
||||
ptrArrayInsertAt(t->pages, n, page);
|
||||
|
||||
ZeroMemory(&item, sizeof (TCITEMW));
|
||||
|
|
|
@ -106,6 +106,7 @@ extern void childRelayout(struct child *c, intmax_t x, intmax_t y, intmax_t widt
|
|||
extern void childQueueRelayout(struct child *c);
|
||||
extern int childVisible(struct child *c);
|
||||
extern void childUpdateState(struct child *c);
|
||||
extern void childSetSoleControlID(struct child *c);
|
||||
extern HWND childTabPage(struct child *c);
|
||||
extern int childMargined(struct child *c);
|
||||
extern void childSetMargined(struct child *c, int margined);
|
||||
|
|
|
@ -190,8 +190,10 @@ void uiWindowSetChild(uiWindow *w, uiControl *child)
|
|||
if (w->child != NULL)
|
||||
childRemove(w->child);
|
||||
w->child = newChild(child, uiControl(w), w->hwnd);
|
||||
if (w->child != NULL)
|
||||
if (w->child != NULL) {
|
||||
childSetSoleControlID(w->child);
|
||||
childQueueRelayout(w->child);
|
||||
}
|
||||
}
|
||||
|
||||
int uiWindowMargined(uiWindow *w)
|
||||
|
|
Loading…
Reference in New Issue