]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/os2/toolbar.h
Richtext interface fixes and additions for Phoenix
[wxWidgets.git] / include / wx / os2 / toolbar.h
index 8cad6a95c793f9f91f45f7b7862a910da335b6ff..acb2ec8fbdab951c17189fdc6275ee68c6a27a8f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        toolbar.h
+// Name:        wx/os2/toolbar.h
 // Purpose:     wxToolBar class
 // Author:      David Webster
 // Modified by:
 #define _WX_TOOLBAR_H_
 
 #if wxUSE_TOOLBAR
+#include "wx/timer.h"
 #include "wx/tbarbase.h"
 
-class WXDLLEXPORT wxToolBar: public wxToolBarBase
+#define ID_TOOLTIMER                100
+#define ID_TOOLEXPTIMER             101
+
+class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase
 {
 public:
     /*
      * Public interface
      */
 
-    wxToolBar() { Init(); }
+    wxToolBar()
+    : m_vToolTimer(this, ID_TOOLTIMER)
+    , m_vToolExpTimer(this, ID_TOOLEXPTIMER)
+    { Init(); }
 
     inline wxToolBar( wxWindow*       pParent
                      ,wxWindowID      vId
                      ,const wxPoint&  rPos = wxDefaultPosition
                      ,const wxSize&   rSize = wxDefaultSize
-                     ,long            lStyle = wxNO_BORDER | wxTB_HORIZONTAL
+                     ,long            lStyle = wxTB_HORIZONTAL
                      ,const wxString& rName = wxToolBarNameStr
-                    )
+                    ) : m_vToolTimer(this, ID_TOOLTIMER)
+                      , m_vToolExpTimer(this, ID_TOOLEXPTIMER)
     {
         Init();
         Create( pParent
@@ -47,7 +55,7 @@ public:
                 ,wxWindowID      vId
                 ,const wxPoint&  rPos = wxDefaultPosition
                 ,const wxSize&   rSize = wxDefaultSize
-                ,long            lStyle = wxNO_BORDER | wxTB_HORIZONTAL
+                ,long            lStyle = wxTB_HORIZONTAL
                 ,const wxString& rName = wxToolBarNameStr
                );
 
@@ -157,7 +165,8 @@ protected:
                                           ,const wxString& rsShortHelp
                                           ,const wxString& rsLongHelp
                                          );
-    virtual wxToolBarToolBase* CreateTool(wxControl* pControl);
+    virtual wxToolBarToolBase* CreateTool(wxControl* pControl,
+                                          const wxString& label);
 
     //
     // Helpers
@@ -187,9 +196,25 @@ private:
     void RaiseTool( wxToolBarToolBase* pTool
                    ,bool               bRaise = TRUE
                   );
+    void OnTimer(wxTimerEvent& rEvent);
 
     static bool                     m_bInitialized;
 
+    wxTimer                         m_vToolTimer;
+    wxTimer                         m_vToolExpTimer;
+    wxToolTip*                      m_pToolTip;
+    wxCoord                         m_vXMouse;
+    wxCoord                         m_vYMouse;
+
+    //
+    // Virtual function hiding supression
+    virtual wxToolBarToolBase *InsertTool (size_t nPos, wxToolBarToolBase* pTool)
+    {
+        return( wxToolBarBase::InsertTool( nPos
+                                          ,pTool
+                                         ));
+    }
+
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxToolBar)
 };