IUP/Dialogs/IupPopup
From Vendetta Lua
Jump to navigationJump to search
IupPopup
- Shows a dialog or menu and restricts user interaction only to the specified element. This function will only return the control to the application after a callback returns IUP_CLOSE or when the popup dialog is hidden, for exemple using IupHide.
Parameters/Return
- iup.Popup(element: ihandle, x, y: number) -> (ret: number)
- element: Identifier of a dialog or a menu.
- x: x coordinate of the left corner of the interface element. The following macros are valid:
- IUP_LEFT: Positions the element on the left corner of the screen
- IUP_CENTER: Centers the element on the screen
- IUP_RIGHT: Positions the element on the right corner of the screen
- y: y coordinate of the upper part of the interface element. The following macros are valid:
- IUP_TOP: Positions the element on the top of the screen
- IUP_CENTER: Vertically centers the element on the screen
- IUP_BOTTOM: Positions the element on the base of the screen
- This function returns IUP_ERROR if the element could not be created.
Notes
- When a popup dialog is interacting with the user, another dialog can only be opened by means of the IupPopup function – never with IupShow or IupShowXY.
- This function can be executed more than once for the same dialog. In fact, it works just like functions IupShow and IupShowXY, but it inhibits interaction with other dialogs. Therefore, it does not destroy the dialog’s elements when it ends. To destroy the elements, function IupDestroy must be called.