core/vgui/vgui_tview_launcher_tableau.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_tview_launcher_tableau.h
00002 #ifndef vgui_tview_launcher_tableau_h_
00003 #define vgui_tview_launcher_tableau_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief  Tableau which pops up tableau tree (tview) on Shift-G
00010 // \author Philip C. Pritchett, Robotics Research Group, University of Oxford
00011 // \date   21 Oct 99
00012 //
00013 // Contains classes  vgui_tview_launcher_tableau  vgui_tview_launcher_tableau_new
00014 //
00015 // \verbatim
00016 //  Modifications
00017 //   21-OCT-1999 P.Pritchett - Initial version.
00018 //   10-AUG-2002 K.Y.McGaul - Converted to Doxygen style comments.
00019 //   01-OCT-2002 K.Y.McGaul - Moved tview_launcher to tview_launcher_tableau.
00020 // \endverbatim
00021 
00022 
00023 #include "vgui_tview_launcher_tableau_sptr.h"
00024 #include <vgui/vgui_tableau.h>
00025 #include <vgui/vgui_event_condition.h>
00026 
00027 
00028 //: Tableau which pops up tableau tree (tview) on Shift-G
00029 //
00030 // vgui_tview_launcher_tableau responds to the keypress "Shift-G", and pops up a picture
00031 // of the tableau graph of the adaptor under the mouse pointer.  It is generally
00032 // placed in a composite to provide debugging facilities, and is provided by
00033 // default if you use the vgui_shell_tableau.
00034 class vgui_tview_launcher_tableau : public vgui_tableau
00035 {
00036  public:
00037   //: Constructor - don't use this, use vgui_tview_launcher_tableau_new.
00038   vgui_tview_launcher_tableau();
00039 
00040   //: Handle all events sent to this tableau.
00041   //  In particular, use Shift-G events to pop up a tableau tree.
00042   bool handle(const vgui_event&);
00043 
00044   //: Returns the type of this tableau ('vgui_tview_launcher_tableau').
00045   vcl_string type_name() const;
00046 
00047   //:
00048   void get_popup(const vgui_popup_params&, vgui_menu& menu);
00049 
00050   //:
00051   void go(vgui_adaptor*);
00052 
00053   //:
00054   vgui_event_condition c_graph;
00055 
00056  protected:
00057   //: Destructor - called by vgui_tview_launcher_tableau_sptr.
00058   ~vgui_tview_launcher_tableau() { }
00059 };
00060 
00061 //: Creates a smart-pointer to a vgui_tview_launcher_tableau tableau.
00062 struct vgui_tview_launcher_tableau_new : public vgui_tview_launcher_tableau_sptr
00063 {
00064   typedef vgui_tview_launcher_tableau_sptr base;
00065 
00066   //: Constructor - creates a vgui_tview_launcher_tableau.
00067   vgui_tview_launcher_tableau_new() : base(new vgui_tview_launcher_tableau) { }
00068 };
00069 
00070 #endif // vgui_tview_launcher_tableau_h_