Updates for tooltip support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2002-07-09 05:03:04 +00:00
parent 536a020f8a
commit 6c0fdfbb42
3 changed files with 26 additions and 7 deletions

View File

@@ -61,11 +61,16 @@ public:
virtual void SetValue(bool bVal); virtual void SetValue(bool bVal);
virtual bool GetValue(void) const ; virtual bool GetValue(void) const ;
bool OS2Command( WXUINT wParam bool OS2Command( WXUINT wParam
,WXWORD wId ,WXWORD wId
); );
void Command(wxCommandEvent& rEvent); void Command(wxCommandEvent& rEvent);
virtual void SetFocus(void); virtual MRESULT OS2WindowProc( WXUINT uMsg
,WXWPARAM wParam
,WXLPARAM lParam
);
virtual void SetFocus(void);
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;

View File

@@ -29,6 +29,7 @@ public:
{ Init(); } { Init(); }
~wxTimer(); ~wxTimer();
virtual void Notify(void);
virtual bool Start( int nMilliseconds = -1 virtual bool Start( int nMilliseconds = -1
,bool bOneShot = FALSE ,bool bOneShot = FALSE
); );

View File

@@ -15,6 +15,9 @@
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
#include "wx/tbarbase.h" #include "wx/tbarbase.h"
#define ID_TOOLTIMER 100
#define ID_TOOLEXPTIMER 101
class WXDLLEXPORT wxToolBar: public wxToolBarBase class WXDLLEXPORT wxToolBar: public wxToolBarBase
{ {
public: public:
@@ -22,7 +25,10 @@ public:
* Public interface * Public interface
*/ */
wxToolBar() { Init(); } wxToolBar()
: m_vToolTimer(this, ID_TOOLTIMER)
, m_vToolExpTimer(this, ID_TOOLEXPTIMER)
{ Init(); }
inline wxToolBar( wxWindow* pParent inline wxToolBar( wxWindow* pParent
,wxWindowID vId ,wxWindowID vId
@@ -30,7 +36,8 @@ public:
,const wxSize& rSize = wxDefaultSize ,const wxSize& rSize = wxDefaultSize
,long lStyle = wxNO_BORDER | wxTB_HORIZONTAL ,long lStyle = wxNO_BORDER | wxTB_HORIZONTAL
,const wxString& rName = wxToolBarNameStr ,const wxString& rName = wxToolBarNameStr
) ) : m_vToolTimer(this, ID_TOOLTIMER)
, m_vToolExpTimer(this, ID_TOOLEXPTIMER)
{ {
Init(); Init();
Create( pParent Create( pParent
@@ -187,9 +194,15 @@ private:
void RaiseTool( wxToolBarToolBase* pTool void RaiseTool( wxToolBarToolBase* pTool
,bool bRaise = TRUE ,bool bRaise = TRUE
); );
void OnTimer(wxTimerEvent& rEvent);
static bool m_bInitialized; static bool m_bInitialized;
wxTimer m_vToolTimer;
wxTimer m_vToolExpTimer;
ULONG m_ulToolTimer;
ULONG m_ulToolExpTimer;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxToolBar) DECLARE_DYNAMIC_CLASS(wxToolBar)
}; };