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

pandatool/src/gtkbase/basicGtkWindow.h

Go to the documentation of this file.
00001 // Filename: basicGtkWindow.h
00002 // Created by:  drose (14Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef BASICGTKWINDOW_H
00020 #define BASICGTKWINDOW_H
00021 
00022 #include <gtk--.h>
00023 
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : BasicGtkWindow
00027 // Description : This is just a handy wrapper around Gtk::Window that
00028 //               provides some convenient setup functions.
00029 ////////////////////////////////////////////////////////////////////
00030 class BasicGtkWindow : public Gtk::Window {
00031 public:
00032   BasicGtkWindow(bool free_store = true);
00033   virtual ~BasicGtkWindow();
00034   void setup();
00035   virtual bool destruct();
00036 
00037 protected:
00038   void delete_self();
00039   static gint static_delete(BasicGtkWindow *window);
00040 
00041 private:
00042   void window_destroyed();
00043   gint idle_event();
00044 
00045   enum State {
00046     S_virgin,
00047     S_setup,
00048     S_ready,
00049     S_gone,
00050   };
00051 
00052   bool _destroyed;
00053   bool _free_store;
00054   State _state;
00055   SigC::Connection _destroy_connection;
00056 };
00057 
00058 
00059 #endif
00060 

Generated on Fri May 2 03:20:05 2003 for Panda-Tool by doxygen1.3