Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

application.h

00001 /* 00002 * =========================== 00003 * VDK Visual Develeopment Kit 00004 * Version 0.4 00005 * October 1998 00006 * =========================== 00007 * 00008 * Copyright (C) 1998, Mario Motta 00009 * Developed by Mario Motta <mmotta@guest.net> 00010 * 00011 * This library is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU Library General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2 of the License, or (at your option) any later version. 00015 * 00016 * This library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Library General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Library General Public 00022 * License along with this library; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00024 * 02111-1307, USA. 00025 \latexonly 00026 <image latex vdklogo.eps 00027 \endlatexonly 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 \internal 00137 garbage collection callback, 00138 invoked from a gtk_timeout established by the user with 00139 SetGarbageCollection() 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

Generated on Tue Aug 17 12:39:50 2004 for vdk 2.4.0 by doxygen 1.3.7