+public:
+ virtual void Notify();
+
+ static Widget help_popup;
+ static Widget buttonWidget;
+ static wxString helpString;
+};
+
+class wxToolBarTool : public wxToolBarToolBase
+{
+public:
+ wxToolBarTool(wxToolBar *tbar,
+ int id,
+ const wxString& label,
+ const wxBitmap& bmpNormal,
+ const wxBitmap& bmpToggled,
+ wxItemKind kind,
+ wxObject *clientData,
+ const wxString& shortHelp,
+ const wxString& longHelp)
+ : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpToggled, kind,
+ clientData, shortHelp, longHelp)
+ {
+ Init();
+ }
+
+ wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+ : wxToolBarToolBase(tbar, control, label)
+ {
+ Init();
+ }
+
+ virtual ~wxToolBarTool();
+
+ // accessors
+ void SetWidget(Widget widget) { m_widget = widget; }
+ Widget GetButtonWidget() const { return m_widget; }
+
+ Pixmap GetArmPixmap()
+ {
+ m_bitmapCache.SetBitmap( GetNormalBitmap() );
+ return (Pixmap)m_bitmapCache.GetArmPixmap( (WXWidget)m_widget );
+ }
+
+ Pixmap GetInsensPixmap()
+ {
+ m_bitmapCache.SetBitmap( GetNormalBitmap() );
+ return (Pixmap)m_bitmapCache.GetInsensPixmap( (WXWidget)m_widget );
+ }
+protected:
+ void Init();
+
+ Widget m_widget;
+ wxBitmapCache m_bitmapCache;
+};
+
+// ----------------------------------------------------------------------------
+// globals
+// ----------------------------------------------------------------------------
+
+static wxToolBarTimer* wxTheToolBarTimer = (wxToolBarTimer*) NULL;
+
+Widget wxToolBarTimer::help_popup = (Widget) 0;
+Widget wxToolBarTimer::buttonWidget = (Widget) 0;
+wxString wxToolBarTimer::helpString;
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxToolBarTool
+// ----------------------------------------------------------------------------
+
+wxToolBarToolBase *wxToolBar::CreateTool(int id,
+ const wxString& label,
+ const wxBitmap& bmpNormal,
+ const wxBitmap& bmpToggled,
+ wxItemKind kind,
+ wxObject *clientData,
+ const wxString& shortHelp,
+ const wxString& longHelp)
+{
+ return new wxToolBarTool(this, id, label, bmpNormal, bmpToggled, kind,
+ clientData, shortHelp, longHelp);