00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00113 #ifndef APPLICATION_H
00114 #define APPLICATION_H
00115
00116 #include <gtk/gtk.h>
00117 #include <vdk/vdktypes.h>
00118 #include <vdk/vdkstring.h>
00119
00120
00121 class VDKForm;
00130 class VDKApplication
00131 {
00132 int gcTag,idleTag;
00133 VDKString rcfile;
00134 protected:
00135
00136
00137
00138
00139
00140
00141 static int GcCallback(gpointer app);
00142 public:
00147 VDKForm* MainForm;
00156 VDKApplication(int* argc, char** argv, char* rcf = (char*) NULL,
00157 bool have_locale = false);
00161 virtual ~VDKApplication();
00165 void Run(void);
00171 void Terminate(void);
00175 GtkWidget* MainWindow();
00180 virtual void Setup() = 0;
00206 gint VDKMessageBox(char* caption,
00207 char* text,
00208 int mode = VDK_OK,
00209 char *oktext = (char*) NULL,
00210 char *canceltext = (char*) NULL,
00211 unsigned int wait = 0);
00212
00213
00214 gint VDKFileChooser(char* caption);
00223 void SetIdleCallback(GtkFunction idlecb = NULL ,
00224 gpointer data = (gpointer) NULL);
00228 void SetGarbageCollection(unsigned int tick = 1000);
00232 void RemoveGarbageCollection();
00237 void SetResourceFile(char* rcf);
00241 bool HasResources() { return ! rcfile.isNull(); }
00242 };
00243
00244 #endif
00245
00246
00247
00248
00249
00250
00251