Download Project Management:

Transcript
Returns the element that received the focus or NULL if failed.
See Also
IupPreviousField.
IupPreviousField
Shifts the focus to the previous element that can have the focus. It is relative to the given element and does not depend on the element currently with the focus.
Parameters/Return
Ihandle* IupPreviousField(Ihandle* ih); [in C]
iup.PreviousField(ih: ihandle) -> (ih: ihandle) [in Lua]
ih: identifier of the interface element.
Returns the element that received the focus or NULL if failed.
See Also
IupNextField.
IupGetFocus
Verifies the interface element with keyboard focus, that is, the element that receives keyboard events.
Parameters/Return
Ihandle* IupGetFocus(void); [in C]
iup.GetFocus() -> elem: ihandle [in Lua]
This function returns the identifier of the interface element which at the moment is receiving keyboard events.
See Also
IupSetFocus.
IupSetFocus
Defines the interface element that will receive the keyboard focus, i.e., the element that will receive keyboard events.
Parameters/Return
Ihandle *IupSetFocus (Ihandle *ih); [in C]
iup.SetFocus(ih: ihandle) -> ih: ihandle [in Lua]
ih: identifier of the interface element that will receive the keyboard focus. Only elements that can have the keyboard focus, are mapped, active and visible can be used,
other elements are ignored.
Returns the identifier of the interface element that previously had the keyboard focus.
See Also
IupGetFocus.
Resources
Resources are several auxiliary tools including menus, images, fonts and global names.
Some objects like menus and images, that are not inserted in a dialog children tree, are in fact "associated" with dialogs or controls.
Menus can be associated with dialogs only. Images can be associated with labels, buttons, toggles and menu items (this last in Windows only).
Both images and menus to be associated use a global table of names. This exist because of the LED scripts. First you associate the image or menu Ihandle to a name,
then you associated the MENU or IMAGE attribute to the respective name.
For example, in C:
Ihandle* img = IupImage (11, 11, pixmap) ;
IupSetHandle("myImg", img);
IupSetAttribute(myButton, "IMAGE", "myImg") ;
or in LED:
myImg = image[...] (
...
)
myButton = button[IMAGE = myImg]("")
or in Lua:
myImg = iupimage {
...