wApp

The wApp object represents the application itself. It allow only one instance for a thread. Because every wNim app needs to import this module. So wTypes, wColors, and wKeyCodes are exported by this module for convenience.

Consts

wEvent_AppQuit = 32769

Procs

proc App(): wApp {...}{.discardable, raises: [Exception], tags: [RootEffect].}
Constructor.
proc mainLoop(self: wApp): int {...}{.discardable, raises: [], tags: [].}
Execute the main GUI event loop. The loop will exit after all top-level windows is deleted.
proc setMessagePropagation(self: wApp; msg: UINT; flag = true) {...}{.raises: [], tags: [].}
Regist a message associated event to propagate upward by default. Control events (wEvent_Menu, wEvent_Button, etc) will always propagate by default. To overdie shouldPropagate() method is a more gentle way.
proc isMessagePropagation(self: wApp; msg: UINT): bool {...}{.raises: [], tags: [].}
Checks whether the msg is propagated by default.
proc broadcastTopLevelMessage(self: wApp; msg: UINT; wParam: wWparam; lParam: wLparam) {...}{.
    raises: [], tags: [].}
Broadcast a event to all toplevel windows.
proc broadcastMessage(self: wApp; msg: UINT; wParam: wWparam; lParam: wLparam) {...}{.
    raises: [], tags: [].}
Broadcast a event to all windows.

Templates

template wAppGetCurrentApp(): wApp
Gets the current wApp instance.