back to gui 

wxApp

generated from ../src/gui/misc/app.cpp

wxApp represents the GUI application. wxJS instantiates an object of this type and stores it in the global variable wxTheApp. The script is responsible for calling mainLoop. Before the main loop is entered, the function that is put in onInit is called. This function must create a top-level window, make it visible and return true. Otherwise the main loop is immediately ended.

Remark:When the application is dialog based and the dialog is a modal dialog, the onInit function must return false.

Constants

Properties

Name Type Description
appName String Get/Set the application name
className String Get/Set the classname
topWindow wxWindow Get/Set the top window of your application.
vendorName String Get/Set the vendor name

Methods

mainLoop

mainLoop()
 

Enters the main loop (meaning it starts your application). Before the application is started it will call the function you've set in the onInit event. You don't have to use mainLoop for executing a script. You only need this function when you want to block the execution of the script (i.e. when not using modal dialogs).

Events

onInit Called when the application needs to be initialized. Set a function that returns a boolean. When it returns false the application will stop (onExit isn't called!). Remark:When your application is dialog based and the dialog is modal, you must return false, otherwise the application keeps running.
onExit This function is executed when the application exits. The function doesn't get any parameters and must return an Integer.
SourceForge.net Logo Support This Project

Table of Contents

Properties

appName
className
topWindow
vendorName

Methods

mainLoop

Events

onInit
onExit


Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.