#include <application.h>
This class initializes GTK+ library and starts event loop. Normally user overrides this class using his own application object. Application objects are responsible to manage also terminating and clean-up procedures.
| VDKApplication::VDKApplication | ( | int * | argc, | |
| char ** | argv, | |||
| char * | rcf = (char *) NULL, |
|||
| bool | have_locale = false | |||
| ) |
Constructor, receives main() arguments and pass them to GTK* library.
| rc | if isn't NULL <rc> resource file will be loaded and parsed. | |
| have_locale | if true let's VDK to invoke gtk_set_locale() and support any languages that GTK supports. |
| VDKApplication::~VDKApplication | ( | ) | [virtual] |
Destructor
| void VDKApplication::Run | ( | void | ) |
Initiates event loop
| void VDKApplication::Terminate | ( | void | ) |
Terminates event loop and quits GTK* library. This method is called after a destroy event on MainForm, user normally doesn't care of it.
| GtkWidget * VDKApplication::MainWindow | ( | ) |
Returns underlying gtk+ window of the application main form
| virtual void VDKApplication::Setup | ( | ) | [pure virtual] |
Initializes Main form, user must override this one in his own application object.
| gint VDKApplication::VDKMessageBox | ( | char * | caption, | |
| char * | text, | |||
| int | mode = VDK_OK, |
|||
| char * | oktext = (char *) NULL, |
|||
| char * | canceltext = (char *) NULL, |
|||
| unsigned int | wait = 0 | |||
| ) |
Provide a modal dialog window for messages to user.
| mode |
| |
| oktex | ||
| canceltext | Args not more used, mantained for compat with vdk series 1.x.y Both OK,YES and NO buttons captions can be customized using <oktext> and <canceltext> arguments. | |
| wait | if set other than 0 makes MessageBox automatically closed after <wait> msecs with IDCANCEL or IDNO result. Tip: MessageBox accepts CR as "yes/ok" and ESC as "no/cancel" default answers. |
| void VDKApplication::SetIdleCallback | ( | GtkFunction | idlecb = NULL, |
|
| gpointer | data = (gpointer) NULL | |||
| ) |
Sets idle callback function, if a previous idle callback was installed, uninstall it. /param /c idlecb idle callback function must be declared as: void idlecb(gpointer data); /param /c data will be passed to user defined function and must be a non NULL pointer otherwise SetIdleCallback won't work.
| void VDKApplication::SetGarbageCollection | ( | unsigned int | tick = 1000 |
) |
Set a timed garbage collection that will be invoked each <timing> msecs.
| void VDKApplication::RemoveGarbageCollection | ( | ) |
Remove timed garbage collection.
| void VDKApplication::SetResourceFile | ( | char * | rcf | ) |
Set a resource file. Tip: this should be done before Run()ning app.
| bool VDKApplication::HasResources | ( | ) | [inline] |
Indicates if the resource file was loaded and parsed
Must be initialized by the user otherwise an useless default main form will be created
1.5.1