Definition: |
include pGUI.e
IupMainLoop() |
Description: |
Executes the user interaction until a callback returns IUP_CLOSE,
IupExitLoop is called, or hiding the last visible dialog.
Should you forget to call IupMainLoop, in most cases the application will simply and immediately terminate (without error). |
Notes: |
When this function is called, it will interrupt the program execution until a callback returns IUP_CLOSE,
IupExitLoop is called, or there are no visible dialogs.
If you cascade many calls to IupMainLoop there must be a "return IUP_CLOSE" or IupExitLoop call for each cascade level, hiding all dialogs will close only one level. Call IupMainLoopLevel to obtain the current level. If IupMainLoop is called without any visible dialogs and no active timers, the application will hang and it will not be possible to close the main loop. The process will have to be interrupted by the system. When the last visible dialog is hidden the IupExitLoop function is automatically called, causing the IupMainLoop to return. To avoid that set LOCKLOOP=YES before hiding the last dialog. |
Example: |
include pGUI.e IupOpen() Ihandle main_dialog = IupDialog(IupLabel("Hello","PADDING=80x10"),"TITLE=test") IupShow(main_dialog) IupMainLoop() IupClose() |
See Also: | IupLoopStep, IupExitLoop, IupMainLoopLevel, Guide/System Control, IDLE_ACTION, LOCKLOOP |