Application Commands
From Leadwerks Developer Wiki
Contents |
Introduction
These commands are used to get/set different application states, such as setting the window title and checking if the close button was hit. The commands to start the engine are also listed here.
Commands
Initialize
- C: int Initialize(void)
- Initializes the engine and loads the dll and all the commands. Returns 1 if succeeded.
- [Examples]
Terminate
- C: int Terminate(void)
- Shuts down the engine and unloads the dll. Returns 0 when succeeded.
- [Examples]
SetAppTitle
- C: void SetAppTitle( str title )
- C++: void Engine::SetTitle( const string& title )
- BlitzMax: AppTitle = title:String
- Pascal: procedure SetAppTitle ( title:PAnsiChar );
- Sets the application title that will appear on a graphics window. This command must be called before the graphics window is created.
- [Examples]
AppTerminate
- C: int AppTerminate( void )
- C++: bool Engine::IsTerminated( void ) const
- BlitzMax: AppTerminate:Int()
- Pascal: function AppTerminate: Integer;
- Returns 1 if the user has pressed the close button at the top-right of a graphics window. It is recommended that this function be called once per program loop.
- [Examples]
AppLog
- C: void AppLog( str text, int options=APPLOG_NORMAL )
- C++: void Engine::SetAppLog( const_str text, int flags=APPLOG_NORMAL)
- BlitzMax: AppLog( text$ [, options:Int=0 ] )
- Pascal: procedure AppLog ( text:PAnsiChar; flags:Integer=APPLOG_NORMAL );
- Writes text to the application log. The options parameter can be used to specify bitwise flags:
- 1 - the text "Error: " is added to the beginning of the line.
- 2 - a notification box containing the text is displayed.
- [Examples]
AppLogMode
- C: void AppLogMode( int mode=1 )
- C++: void Engine::AppLogMode( int mode=1 )
- BlitzMax: AppLogMode( mode:Int, callback:Byte Ptr )
- Pascal: procedure AppLogMode ( mode:Integer=1 );
- If mode is set to 1 application logging is enabled, otherwise it is disabled. If application logging is disabled, calls to AppLog as well as internal log data will not be writted to the log file or printed to the console.
- [Examples]
