static int GetBrother(lua_State *L) { Ihandle * ih = iuplua_checkihandle(L,1); Ihandle * brother = IupGetBrother(ih); iuplua_pushihandle(L, brother); return 1; }
int item_statusbar_action_cb(Ihandle* item_statusbar) { Ihandle* multitext = IupGetDialogChild(item_statusbar, "MULTITEXT"); Ihandle* statusbar = IupGetBrother(multitext); Ihandle* config = (Ihandle*)IupGetAttribute(multitext, "CONFIG"); toggle_visibility(item_statusbar, statusbar); IupConfigSetVariableStr(config, "MainWindow", "Statusbar", IupGetAttribute(item_statusbar, "VALUE")); return IUP_DEFAULT; }
static void boxsetcurrentsize (Ihandle * self, int w, int h) { Ihandle *box = (Ihandle*)iupGetEnv(self, "__cbox_box"); Ihandle *child = IupGetNextChild(box, NULL); iupSetCurrentWidth(self, iupGetNaturalWidth(self)); iupSetCurrentHeight(self, iupGetNaturalHeight(self)); while(child != NULL) { iupCpiSetCurrentSize(child, iupGetNaturalWidth(child), iupGetNaturalHeight(child)); child = IupGetBrother(child); } }
static void boxsetposition (Ihandle * self, int x, int y) { Ihandle *box = (Ihandle*)iupGetEnv(self, "__cbox_box"); Ihandle *child = NULL; int cx = 0, cy = 0; iupSetPosX (self, x); iupSetPosY (self, y); child = IupGetNextChild(box, NULL); while(child != NULL) { cx = IupGetInt(child, "CX"); cy = IupGetInt(child, "CY"); iupCpiSetPosition(child, cx, cy); iupdrvResizeObjects (child); child = IupGetBrother(child); } }
static void GetBrother(void) { iuplua_pushihandle(IupGetBrother(iuplua_checkihandle(1))); }