IupGetGlobal
| Definition: |
include pGUI.e
string res = IupGetGlobal(string name) |
| Description: |
Returns an attribute value from the global environment. The value can be returned from the driver or from the internal storage.
name: name of the attribute. Returns: the attribute value. If the attribute does not exist, "" is returned. |
| pwa/p2js: | Supported. However since pGUI.js is a manually hand-crafted replacement and does not use any form of IUP dll/so/code at all, IupVersion[Date|Number|Show]() are not relevant and not supported, use a plain version() instead (if platform()=JS, that is). Likewise many global attributes may be unsupported or just completely inappropriate under pwa/p2js. |
| Notes: |
This function’s return value is not necessarily the same one used by the application to set the attribute’s value.
The returned value is not necessarily the same pointer used by the application to define the attribute value. The pointers of internal IUP attributes returned by IupGetGlobal should never be freed or changed, except when it is a custom application pointer that was stored using IupSetGlobal() and allocated by the application. The returned pointer can be used safely even if IupGetGlobal() or IupGetAttribute() are called several times. But not too many times, because it is an internal buffer and IUP may reuse it after around 50 calls. IupGetAttribute() can also be used to get global attributes, just set the element to NULL. The function atom res = IupGetGlobalInt(string name) is a simple wrapper to IupGetInt(NULL,name) mainly for consistency with IupSetGlobalInt() and to help make code more self-documenting. Likewise atom {a1,a2} = IupGetGlobalIntInt(string name) is a simple wrapper to IupGetIntInt(NULL,name), not that there is (yet) any such thing as an IupSetGlobalIntInt function. The function IupVersion() is equivalent to Also, IupVersionDate() returns eg "2015/09/15" and IupVersionNumber() returns eg 316000 (an integer). IupVersionShow() shows a popup dialog with IUP version information and more. This is a debug dialog with lots of information of additional libraries too. (since 3.28) |
| See Also: | IupSetGlobal, Global Attributes |