core/vgui/vgui_window.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_window.h
00002 #ifndef vgui_window_h_
00003 #define vgui_window_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief  An abstract representation of a system window.
00010 // \author fsm
00011 //
00012 // \verbatim
00013 //  Modifications
00014 //   07-AUG-2002 K.Y.McGaul - Changed to and added Doxygen style comments.
00015 //   23-DEC-2002 J.L. Mundy - added set methods for scroll bars
00016 // \endverbatim
00017 
00018 class vgui_menu;
00019 class vgui_adaptor;
00020 class vgui_statusbar;
00021 #include <vcl_string.h>
00022 
00023 //: An abstract representation of a system window.
00024 //
00025 //  It is not necessarily the application's top level window, but
00026 //  it may have a menubar, or the concept of an application menubar,
00027 //  which is accessed using set_menubar.
00028 //
00029 //  Possibly not all GUI toolkits using this representation will have
00030 //  menus, statusbars, scrollbars or titles, though there wouldn't be much
00031 //  point in implementing this if you couldn't at least display an OpenGL
00032 //  area (vgui_adaptor) in your window.
00033 class vgui_window
00034 {
00035  public:
00036   //: Default constructor.
00037   vgui_window() {}
00038 
00039   //: Destructor.
00040   virtual ~vgui_window() {}
00041 
00042   //: Put the given menu in the menubar (if it exists).
00043   virtual void set_menubar(vgui_menu const &);
00044 
00045   //: If true, activate the statusbar (if it exists).
00046   virtual void set_statusbar(bool) {}
00047 
00048   //: Set the default adaptor (if it exists) to the given vgui_adaptor.
00049   //  These refer to the default/current adaptor, if that makes
00050   //  sense. It is not a requirement that it should make sense.
00051   virtual void set_adaptor(vgui_adaptor *);
00052 
00053   //: Get the default adaptor (if it exists).
00054   virtual vgui_adaptor *get_adaptor();
00055 
00056   //: Get the status bar (if it exists).
00057   virtual vgui_statusbar *get_statusbar();
00058 
00059   //: Display the window.
00060   virtual void show();
00061 
00062   //: Hide the window from view.
00063   virtual void hide();
00064 
00065   //: Turn the window into an icon.
00066   virtual void iconify();
00067 
00068   //: If true, activate horizontal scrollbar (if it exists).
00069   virtual void enable_hscrollbar(bool);
00070 
00071   //: If true, activate vertical scrollbar (if it exists).
00072   virtual void enable_vscrollbar(bool);
00073 
00074   //: Change window shape to new given width and height.
00075   virtual void reshape(unsigned, unsigned);
00076 
00077   //: Move the window to the new given x,y position.
00078   virtual void reposition(int, int);
00079 
00080   //: Use the given text as the window title (if the window has a title).
00081   virtual void set_title(vcl_string const &);
00082 
00083   //: Set the position of the horizontal scrollbar, returns old position
00084   virtual int set_hscrollbar(int pos);
00085 
00086   //: Set the position of the vertical scrollbar, returns old position
00087   virtual int set_vscrollbar(int pos);
00088 };
00089 
00090 #endif // vgui_window_h_