core/vgui/internals/vgui_adaptor_tableau.h
Go to the documentation of this file.
00001 // This is core/vgui/internals/vgui_adaptor_tableau.h
00002 #ifndef vgui_adaptor_tableau_h_
00003 #define vgui_adaptor_tableau_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author fsm
00010 // \brief  Propagates tableau posts to an adaptor.
00011 
00012 #include <vgui/vgui_tableau.h>
00013 #include <vgui/vgui_parent_child_link.h>
00014 class vgui_adaptor;
00015 
00016 //: Propagates tableau posts to an adaptor.
00017 // This is a special tableau which is always the top
00018 // of the tableau graph under each adaptor.  (Top means
00019 // it has no parents and every tableau under the adaptor
00020 // is a child of one of these).  Its main purpose
00021 // is to catch messages "up" the tableau hierarchy
00022 // like "post_redraw", and pass them on to the
00023 // adaptor.
00024 class vgui_adaptor_tableau : private vgui_tableau
00025 {
00026   friend class vgui_adaptor;
00027 
00028   vgui_adaptor_tableau(vgui_adaptor *a);
00029   ~vgui_adaptor_tableau();
00030 
00031   void set_child(vgui_tableau_sptr const& t) { slot.assign(t); }
00032   vgui_parent_child_link get_child() const { return slot; }
00033   bool handle(vgui_event const &e) { return slot.handle(e); }
00034   vcl_string type_name() const { return "vgui_adaptor_tableau"; }
00035 
00036 //even more private:
00037   vgui_adaptor *adaptor;
00038   vgui_parent_child_link slot;
00039   void post_message(char const *, void const *);
00040   void post_redraw();
00041   void post_overlay_redraw();
00042   void post_idle_request();
00043 };
00044 
00045 #endif // vgui_adaptor_tableau_h_