Class GTKApplication

The GTKApplication class controls the running application and exactly one instance of this class must be created when the program starts. This GTKApplication object is globally accessible through the variable GTKApp, so there is no need to pass it as an argument to method calls.

Most of the methods of GTKApplication are implemented in its superclass GTKMain, so look there for methods to control the event loop.


Class-Hierarchy:

    NSObject
	|
	+---GTKMain
		|
		+---GTKApplication

Class GTKApplication inherits from GTKMain


Last modified: 10.8.98 (./GTKApplication.m)

Instance Variables

protected id delegate
delegate of the application object

Method Index

- delegate
- initWithArgc:(int *) argc argv:(char ***) argv
- (void) run
- (void) setDelegate:delegate
- (void) terminate:sender

Methods

- initWithArgc:(int *) argc argv:(char ***) argv
Initialize a new GTKApplication object and store it in the global variable GTKApp. Note that you cannot create more than one application object in your program. This method will modify the program's command line arguments as given by argc and argv and remove any options related to GTK (such as --display or --class) from the argument list.

- (void) setDelegate:_delegate

Set the application object's delegate or unset it (if delegate is nil).

- delegate

Return the application object's delegate.

- (void) run

Start the application's main event loop.

- (void) terminate:sender

Tell the application's main event loop to finish. This will cause the -run method to return, which will normally end the program. The sender parameter is ignored.

If the delegate implements the method:

 - (BOOL) applicationShouldTerminate:(GTKApplication *) sender
this message is sent to the delegate to determine whether the application should actually terminate.


generated Mon Aug 10 22:08:13 1998 by Objcdoc