core/vgui/impl/gtk2/vgui_gtk2_window.h

Go to the documentation of this file.
00001 // This is core/vgui/impl/gtk2/vgui_gtk2_window.h
00002 #ifndef vgui_gtk2_window_h_
00003 #define vgui_gtk2_window_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author  Robotics Research Group, University of Oxford
00010 // \date    18 Dec 99
00011 // \brief   The GTK implementation of vgui_window.
00012 //
00013 //  Contains classes: vgui_gtk2_window
00014 //
00015 // \verbatim
00016 //  Modifications
00017 //   13-JUL-00   Marko Bacic, Oxford RRG -- Added support for menu shortcuts
00018 //   21-SEP-00   capes@robots -- Changed destructor to actually destroy the widgets
00019 //                              Facilitates the post_destroy() adaptor method.
00020 //   13-SEP-2002 K.Y.McGaul - Changed to Doxygen style comments.
00021 // \endverbatim
00022 
00023 
00024 #ifdef __SUNPRO_CC
00025 // <string> breaks if NULL is defined to "(void*)0".
00026 # include <vcl_string.h>
00027 #endif
00028 
00029 #include <vgui/vgui_window.h>
00030 #include <vgui/vgui_menu.h>
00031 
00032 #include <gtk/gtk.h>
00033 
00034 //: The GTK implementation of vgui_window.
00035 //  Provides functions for manipulating a window.
00036 class vgui_gtk2_window : public vgui_window
00037 {
00038  public:
00039 
00040   vgui_gtk2_window(int w, int h, const vgui_menu& menu, const char* title);
00041   vgui_gtk2_window(int w, int h, const char* title);
00042  ~vgui_gtk2_window();
00043 
00044   bool use_menubar;
00045   bool use_statusbar;
00046 
00047   void init();
00048 
00049   void show();
00050   void hide();
00051   void reshape(unsigned, unsigned);
00052   void set_title(vcl_string const &);
00053 
00054   void set_menubar(const vgui_menu &menu);
00055 
00056   //: Returns the current adaptor (OpenGL widget holder).
00057   vgui_adaptor* get_adaptor() { return adaptor; }
00058   void set_adaptor(vgui_adaptor* a) { adaptor=a; }
00059 
00060   vgui_statusbar* get_statusbar() { return statusbar; }
00061   void set_statusbar(bool) {}
00062 
00063   // gtk specific
00064   vgui_adaptor *adaptor;
00065   vgui_statusbar *statusbar;
00066 
00067   GtkWidget *window;
00068   GtkWidget *box;
00069   GtkWidget *menubar;
00070 
00071  private:
00072   // This is a place to store any menu passed in, so that it doesn't go out
00073   // of scope while the popup is on screen.
00074   vgui_menu* last_menubar; // <-- ask fsm about this.
00075 };
00076 
00077 #endif // vgui_gtk2_window_h_

Generated on Mon Mar 8 05:12:25 2010 for core/vgui by  doxygen 1.5.1