static char* iScintillaGetFontSizeFracStyleAttrib(Ihandle* ih, int style) { int size; if(style == IUP_INVALID_ID) style = 0; /* Lexer style default */ size = (int)IupScintillaSendMessage(ih, SCI_STYLESETSIZEFRACTIONAL, style, 0); return iupStrReturnDouble((double)size / (double)SC_FONT_SIZE_MULTIPLIER); }
static char* iGLProgressBarGetMaxAttrib(Ihandle* ih) { iGLProgressBar* pb = (iGLProgressBar*)iupAttribGet(ih, "_IUP_GLPROGRESSBAR"); return iupStrReturnDouble(pb->vmax); }
static char* iGLValGetMaxAttrib(Ihandle* ih) { iGLVal* val = (iGLVal*)iupAttribGet(ih, "_IUP_GLVAL"); return iupStrReturnDouble(val->vmax); }
static char* iDialGetDensityAttrib(Ihandle* ih) { return iupStrReturnDouble(ih->data->density); }
char* IupGetGlobal(const char *name) { char* value; iupASSERT(name!=NULL); if (!name) return NULL; if (iupStrEqual(name, "DEFAULTFONTSIZE")) return iupGetDefaultFontSizeGlobalAttrib(); if (iupStrEqual(name, "DEFAULTFONTSTYLE")) return iupGetDefaultFontStyleGlobalAttrib(); if (iupStrEqual(name, "DEFAULTFONTFACE")) return iupGetDefaultFontFaceGlobalAttrib(); if (iupStrEqual(name, "CURSORPOS")) { int x, y; iupdrvGetCursorPos(&x, &y); return iupStrReturnIntInt(x, y, 'x'); } if (iupStrEqual(name, "SHIFTKEY")) { char key[5]; iupdrvGetKeyState(key); return iupStrReturnChecked(key[0] == 'S'); } if (iupStrEqual(name, "CONTROLKEY")) { char key[5]; iupdrvGetKeyState(key); return iupStrReturnChecked(key[1] == 'C'); } if (iupStrEqual(name, "MODKEYSTATE")) { char *str = iupStrGetMemory(5); iupdrvGetKeyState(str); return str; } if (iupStrEqual(name, "SCREENSIZE")) { int w, h; iupdrvGetScreenSize(&w, &h); return iupStrReturnIntInt(w, h, 'x'); } if (iupStrEqual(name, "FULLSIZE")) { int w, h; iupdrvGetFullSize(&w, &h); return iupStrReturnIntInt(w, h, 'x'); } if (iupStrEqual(name, "SCREENDEPTH")) { int bpp = iupdrvGetScreenDepth(); return iupStrReturnInt(bpp); } if (iupStrEqual(name, "SCREENDPI")) { double dpi = iupdrvGetScreenDpi(); return iupStrReturnDouble(dpi); } if (iupStrEqual(name, "SYSTEMLOCALE")) return iupdrvLocaleInfo(); if (iupStrEqual(name, "SCROLLBARSIZE")) return iupStrReturnInt(iupdrvGetScrollbarSize()); value = iupdrvGetGlobal(name); if (!value) value = (char*)iupTableGet(iglobal_table, name); return value; }
static char* iDialGetValueAttrib(Ihandle* ih) { return iupStrReturnDouble(ih->data->angle); }
static char* iValGetMinAttrib(Ihandle* ih) { return iupStrReturnDouble(ih->data->vmin); }
char* iupValGetPageStepAttrib(Ihandle* ih) { return iupStrReturnDouble(ih->data->pagestep); }
char* iupValGetValueAttrib(Ihandle* ih) { return iupStrReturnDouble(ih->data->val); }
char* iupValGetShowTicksAttrib(Ihandle* ih) { return iupStrReturnDouble(ih->data->show_ticks); }