IupShowXY

IUP - Portable User Interface

IupShowXY

Displays a dialog in a given position on the screen.

Parameters/Return

int IupShowXY(Ihandle *ih, int x, int y); [in C]
iup.ShowXY(ih: ihandle[, x, y: number]) -> (ret: number) [in Lua]
or ih:showxy([x, y: number]) -> (ret: number) [in Lua]

ih: identifier of the dialog.
x: x coordinate of the dialog’s left corner. The following macros are valid:

  • IUP_LEFT: Positions the dialog on the left corner of the screen
  • IUP_CENTER: Horizontally centralizes the dialog on the screen
  • IUP_RIGHT: Positions the dialog on the right corner of the screen
  • IUP_MOUSEPOS: Positions the dialog on the mouse position
  • IUP_CENTERPARENT: Horizontally centralizes the dialog relative to its parent (Since 3.0)
  • IUP_CURRENT: use the current position of the dialog (if used at the first time the dialog is shown, then it is replaced by IUP_CENTERPARENT if PARENTDIALOG is defined or simply by IUP_CENTER). This is the default value in Lua if the parameter is not defined or nil. (Since 3.0)

y: y coordinate of the dialog’s upper part. The following macros are valid:

  • IUP_TOP: Positions the dialog on the top of the screen
  • IUP_CENTER: Vertically centralizes the dialog on the screen
  • IUP_BOTTOM: Positions the dialog on the base of the screen
  • IUP_MOUSEPOS: Positions the dialog on the mouse position
  • IUP_CENTERPARENT: Vertically centralizes the dialog relative to its parent (Since 3.0)
  • IUP_CURRENT: use the current position of the dialog (if used at the first time the dialog is shown, then it is replaced by IUP_CENTERPARENT if PARENTDIALOG is defined or simply by IUP_CENTER). This is the default value in Lua if the parameter is not defined or nil.(Since 3.0)

This function returns IUP_NOERROR if sucessful. Returns IUP_INVALID if not a dialog.  If there was an error returns IUP_ERROR.

Notes

Will call IupMap for the element.

See the PLACEMENT attribute for other position and show options.

This function can be executed more than once for the same dialog. This will make the dialog be placed above all other dialogs in the application, changing its Z-order, and update its position and/or size on screen. IMPORTANT: Calling IupShow for a visible dialog shown with IupPopup does nothing.

See Also

IupShow, IupHide, IupPopup, IupMap