00001 // This is core/vgui/internals/vgui_adaptor_tableau.cxx 00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00003 #pragma implementation 00004 #endif 00005 //: 00006 // \file 00007 // \author fsm 00008 // \brief See vgui_adaptor_tableau.h for a description of this file. 00009 00010 #include "vgui_adaptor_tableau.h" 00011 #include <vcl_iostream.h> 00012 #include <vgui/vgui_adaptor.h> 00013 00014 //: 00015 // The sole raison d'etre of the adaptor_tableau is to propagate 00016 // tableau posts onto an adaptor. It is constructed only 00017 // by the adaptor, under which it is directly placed. 00018 vgui_adaptor_tableau::vgui_adaptor_tableau(vgui_adaptor *a) 00019 : adaptor(a) 00020 , slot(this) 00021 { 00022 #ifdef DEBUG 00023 vcl_cerr << "vgui_adaptor_tableau::slot = " << slot << '\n'; 00024 #endif 00025 } 00026 00027 vgui_adaptor_tableau::~vgui_adaptor_tableau() 00028 { 00029 vcl_cerr << "~vgui_adaptor_tableau(this = " << (void*)this << ")\n"; 00030 } 00031 00032 //: Take a message (which is invariably being sent from a child tableau), and call the adaptor's post_message(...) method. 00033 void vgui_adaptor_tableau::post_message(char const *msg, void const *data) 00034 { 00035 if (adaptor) 00036 adaptor->post_message(msg, data); 00037 } 00038 00039 //: Take a redraw message (which is invariably being sent from a child tableau), and call the adaptor's post_redraw() method. 00040 void vgui_adaptor_tableau::post_redraw() 00041 { 00042 if (adaptor) 00043 adaptor->post_redraw(); 00044 } 00045 00046 //: Take an overlay_redraw message (which is invariably being sent from a child tableau) & call the adaptor's post_redraw() method. 00047 void vgui_adaptor_tableau::post_overlay_redraw() 00048 { 00049 if (adaptor) 00050 adaptor->post_overlay_redraw(); 00051 } 00052 00053 void vgui_adaptor_tableau::post_idle_request() 00054 { 00055 if (adaptor) 00056 adaptor->post_idle_request(); 00057 }