core/vgui/vgui_debug_tableau.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_debug_tableau.h
00002 #ifndef vgui_debug_tableau_h_
00003 #define vgui_debug_tableau_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief  Event-printing "tee" tableau.
00010 // \author awf@robots.ox.ac.uk
00011 // \date   08-Nov-1999
00012 //
00013 //  Contains classes  vgui_debug_tableau  vgui_debug_tableau_new
00014 //
00015 // \verbatim
00016 //  Modifications
00017 //   1999-10-08 AWF Initial version.
00018 //   26-APR-2002 K.Y.McGaul - Converted to doxygen style comments.
00019 // \endverbatim
00020 
00021 #include "vgui_debug_tableau_sptr.h"
00022 #include <vgui/vgui_wrapper_tableau.h>
00023 
00024 //: Event-printing "tee" tableau.
00025 //
00026 //  A vgui_tableau that prints events and then forwards them to a child.
00027 class vgui_debug_tableau : public vgui_wrapper_tableau
00028 {
00029  public:
00030   //: Constructor - don't use this, use vgui_debug_tableau_new.
00031   //  Takes the one and only child of this tableau.
00032   vgui_debug_tableau(vgui_tableau_sptr const& child);
00033 
00034   //: Returns the type of this tableau ('vgui_debug_tableau').
00035   vcl_string type_name() const { return "vgui_debug_tableau"; }
00036 
00037  protected:
00038   //: Destructor - called by vgui_debug_tableau_sptr.
00039   ~vgui_debug_tableau();
00040 
00041   //: Handle events by printing them and then forwarding to the child tableau.
00042   bool handle(const vgui_event& e);
00043   int verbosity;
00044 };
00045 
00046 //: Creates a smart-pointer to a vgui_debug_tableau.
00047 struct vgui_debug_tableau_new : public vgui_debug_tableau_sptr
00048 {
00049   typedef vgui_debug_tableau_sptr base;
00050   vgui_debug_tableau_new(vgui_tableau_sptr const& child) : base(new vgui_debug_tableau(child)) { }
00051 };
00052 
00053 #endif // vgui_debug_tableau_h_