static int motDialogGetMenuSize(Ihandle* ih) { if (ih->data->menu) return iupdrvMenuGetMenuBarSize(ih->data->menu); else return 0; }
static int gtkDialogGetMenuSize(Ihandle* ih) { #ifdef HILDON return 0; #else if (ih->data->menu && !iupgtk_globalmenu) return iupdrvMenuGetMenuBarSize(ih->data->menu); else return 0; #endif }
static int gtkDialogGetMenuSize(Ihandle* ih) { #ifdef HILDON return 0; #else if (ih->data->menu && !iupStrBoolean(IupGetGlobal("GLOBALMENU"))) return iupdrvMenuGetMenuBarSize(ih->data->menu); else return 0; #endif }
void iupdrvDialogGetDecoration(Ihandle* ih, int *border, int *caption, int *menu) { if (ih->data->menu) *menu = iupdrvMenuGetMenuBarSize(ih->data->menu); else *menu = 0; if (ih->handle) { winDialogGetWindowDecor(ih, border, caption, *menu); } else { int padded_border = 0; int has_titlebar = iupAttribGetBoolean(ih, "MAXBOX") || iupAttribGetBoolean(ih, "MINBOX") || iupAttribGetBoolean(ih, "MENUBOX") || iupAttribGet(ih, "TITLE"); *caption = 0; if (has_titlebar) { if (iupAttribGetBoolean(ih, "TOOLBOX") && iupAttribGet(ih, "PARENTDIALOG")) *caption = GetSystemMetrics(SM_CYSMCAPTION); /* tool window */ else *caption = GetSystemMetrics(SM_CYCAPTION); /* normal window */ padded_border = GetSystemMetrics(SM_CXPADDEDBORDER); } *border = 0; if (iupAttribGetBoolean(ih, "RESIZE")) { /* has_border */ *border = GetSystemMetrics(SM_CXFRAME); /* Thickness of the sizing border around the perimeter of a window */ } /* that can be resized, in pixels. */ else if (has_titlebar) { /* has_border */ *border = GetSystemMetrics(SM_CXFIXEDFRAME); /* Thickness of the frame around the perimeter of a window */ } /* that has a caption but is not sizable, in pixels. */ else if (iupAttribGetBoolean(ih, "BORDER")) { /* has_border */ *border = GetSystemMetrics(SM_CXBORDER); } if (*border) *border += padded_border; } }
void iupdrvDialogGetDecoration(Ihandle* ih, int *border, int *caption, int *menu) { if (ih->data->menu) *menu = iupdrvMenuGetMenuBarSize(ih->data->menu); else *menu = 0; if (ih->handle) { iupdrvGetWindowDecor(ih->handle, border, caption); if (*menu) *caption -= *menu; } else { int has_titlebar = iupAttribGetInt(ih, "MAXBOX") || iupAttribGetInt(ih, "MINBOX") || iupAttribGetInt(ih, "MENUBOX") || IupGetAttribute(ih, "TITLE"); /* must use IupGetAttribute to check from the native implementation */ *caption = 0; if (has_titlebar) { if (iupAttribGetInt(ih, "TOOLBOX") && iupAttribGet(ih, "PARENTDIALOG")) *caption = GetSystemMetrics(SM_CYSMCAPTION); /* tool window */ else *caption = GetSystemMetrics(SM_CYCAPTION); /* normal window */ } *border = 0; if (iupAttribGetInt(ih, "RESIZE")) { *border = GetSystemMetrics(SM_CXFRAME); /* Thickness of the sizing border around the perimeter of a window */ } /* that can be resized, in pixels. */ else if (has_titlebar) { *border = GetSystemMetrics(SM_CXFIXEDFRAME); /* Thickness of the frame around the perimeter of a window */ } /* that has a caption but is not sizable, in pixels. */ else if (iupAttribGetInt(ih, "BORDER")) { *border = GetSystemMetrics(SM_CXBORDER); } } }