#include <LgiClasses.h>
Public Member Functions | |
bool | IsOk () |
Returns true if the GApp object initialized correctly. | |
OsProcessId | GetProcessId () |
Returns this processes ID. | |
OsThreadId | GetGuiThread () |
Returns the thread currently running the active message loop. | |
GApp (char *MimeType, OsAppArguments &AppArgs) | |
Construct the object. | |
virtual | ~GApp () |
Destroys the object. | |
virtual void | SetAppArgs (OsAppArguments &AppArgs) |
Resets the arguments. | |
virtual OsAppArguments * | GetAppArgs () |
Returns the arguemnts. | |
virtual char * | GetArgumentAt (int n) |
Returns the n'th argument as a heap string. Free with DeleteArray(...). | |
virtual bool | Run (bool Loop=true) |
Enters the message loop. | |
virtual void | OnCommandLine () |
Event called to process the command line. | |
virtual void | OnReceiveFiles (List< char > &Files) |
Event called to process files dropped on the application. | |
virtual void | Exit (int Code=0) |
Exits the event loop with the code specified. | |
bool | GetOption (char *Option, GArray< char > &Buf) |
Parses the command line for a switch. | |
bool | GetOption (char *Option, char *Dst=0, int DstSize=0) |
Parses the command line for a switch. | |
XmlTag * | GetConfig (char *Tag) |
Gets the application conf stored in lgi.conf. | |
void | SetConfig (XmlTag *Tag) |
Sets a single tag in the config. (Not written to disk). | |
GView * | GetFocus () |
Gets the control with the keyboard focus. | |
bool | GetFileMimeType (char *File, char *Mime, int BufLen) |
Gets the MIME type of a file. | |
int32 | GetMetric (int Metric) |
Get a system metric. | |
GMouseHook * | GetMouseHook () |
Get the mouse hook instance. | |
Static Public Member Functions | |
static GApp * | ObjInstance () |
Use 'LgiApp' to return a pointer to the GApp object. | |
Public Attributes | |
GFont * | SystemNormal |
The system font. | |
GFont * | SystemBold |
The system font in bold. | |
GWindow * | AppWnd |
Pointer to the applications main window. | |
Friends | |
class | GView |
class | GMouseHook |
This should be the first class you create, passing in the arguments from the operating system. And once your initialization is complete the 'Run' method is called to enter the main application loop that processes messages for the life time of the application.
|
Construct the object.
|
|
Exits the event loop with the code specified.
|
|
Gets the MIME type of a file.
|
|
Get a system metric.
|
|
Parses the command line for a switch.
|
|
Parses the command line for a switch.
|
|
Enters the message loop.
|