00001 #if !defined( __ARSTOOLTIP_H__ ) 00002 #define __ARSTOOLTIP_H__ 00003 00004 namespace Ars 00005 { 00008 00009 class XToolTip : public XLabel { 00010 private: 00011 00012 Timer *timer; 00013 XPoint lastMousePosition; 00014 Window *target; 00015 const int nrMSec; 00016 00017 public: 00018 00021 XToolTip( Window *pToolWindow , const int aNrMSec = 1000 ); 00022 00024 virtual ~XToolTip( void ); 00025 00026 virtual const bool SetupWindow( const Message &msg ); 00027 00028 // Windfow overrides 00031 virtual void SetWndText( const std::string &sText ); 00032 00035 void ShowTip( const XPoint &DrawPoint ); 00036 00038 void HideTip( void ); 00039 00040 virtual const bool SetParent( Window *pNewParent ) { target = pNewParent; return true; } 00041 virtual Window *GetParent( void ) const { return target; } 00042 00043 protected: 00044 00045 virtual const bool evMouseMove( const MouseMessage &msg ); 00046 virtual const bool evTimer( const CtrlMessage &msg ); 00047 }; 00048 00049 } 00050 00051 #endif