Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

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 MessageBox(char* caption,
00207                   char* text,
00208                   int mode = MB_OK,
00209                   char *oktext = (char*) NULL,
00210                   char *canceltext = (char*) NULL,
00211                   unsigned int wait = 0);
00220   void SetIdleCallback(GtkFunction idlecb = NULL ,
00221                        gpointer data = (gpointer) NULL);
00225   void SetGarbageCollection(unsigned int tick = 1000);
00229   void RemoveGarbageCollection();
00234   void SetResourceFile(char* rcf);
00238   bool HasResources() { return ! rcfile.isNull(); }
00239 };
00240 
00241 #endif
00242 
00243 
00244 
00245 
00246 
00247 
00248 

Generated on Sat May 4 21:58:25 2002 for vdk 2.0.1 by doxygen1.2.15