core/vgui/vgui_quit_tableau.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_quit_tableau.h
00002 #ifndef vgui_quit_tableau_h_
00003 #define vgui_quit_tableau_h_
00004 //:
00005 // \file
00006 // \brief  A tableau which quits the application on receiving 'q' or ESC
00007 // \author fsm
00008 //
00009 //  Contains classes  vgui_quit_tableau  vgui_quit_tableau_new
00010 //
00011 // \verbatim
00012 //  Modifications
00013 //   08-Aug-2002 K.Y.McGaul - Changed to Doxygen style comments.
00014 // \endverbatim
00015 
00016 #include "vgui_quit_tableau_sptr.h"
00017 #include <vgui/vgui_tableau.h>
00018 
00019 //: A tableau which quits the application on receiving 'q' or ESC
00020 //
00021 //  This is provided by default if you use a vgui_shell_tableau.
00022 class vgui_quit_tableau : public vgui_tableau
00023 {
00024  public:
00025 
00026   //: Handle all events used by this tableau.
00027   //  In particular, this is interested in 'q' and ESC key-presses.
00028   bool handle(vgui_event const &);
00029 
00030   //: Return the type of this tableau ('vgui_quit_tableau').
00031   vcl_string type_name() const;
00032 
00033  protected:
00034   //: Destructor - called by vgui_quit_tableau_sptr.
00035   ~vgui_quit_tableau() { }
00036 };
00037 
00038 //: Create a smart-pointer to a vgui_quit_tableau.
00039 struct vgui_quit_tableau_new : public vgui_quit_tableau_sptr {
00040   typedef vgui_quit_tableau_sptr base;
00041 };
00042 
00043 #endif // vgui_quit_tableau_h_