diff --git a/test/page2.c b/test/page2.c index 71575c28..9ed96efd 100644 --- a/test/page2.c +++ b/test/page2.c @@ -25,7 +25,9 @@ static int moveBack; static void movePage1(uiButton *b, void *data) { if (moveBack) { - // TODO + uiBoxDelete(mainBox, 1); + uiTabInsertPageBefore(mainTab, 0, uiControl(page1)); + uiButtonSetText(b, moveOutText); return; } uiTabDeletePage(mainTab, 0); diff --git a/ui.idl b/ui.idl index 75cfc735..205c19ab 100644 --- a/ui.idl +++ b/ui.idl @@ -103,6 +103,7 @@ func NewLabel(text *const char) *Label; interface Tab from Control { func AppendPage(name *const char, c *Control); + func InsertPageBefore(name *const char, before uintmax_t, c *Control); func DeletePage(index uintmax_t); func NumPages(void) uintmax_t; func Margined(page uintmax_t) int;