]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxToolBar class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_TOOLBAR_H_
13 #define _WX_TOOLBAR_H_
16 #include "wx/tbarbase.h"
18 WXDLLEXPORT_DATA(extern const wxChar
*) wxToolBarNameStr
;
20 class WXDLLEXPORT wxToolBar
: public wxToolBarBase
27 wxToolBar() { Init(); }
29 inline wxToolBar( wxWindow
* pParent
31 ,const wxPoint
& rPos
= wxDefaultPosition
32 ,const wxSize
& rSize
= wxDefaultSize
33 ,long lStyle
= wxNO_BORDER
|wxTB_HORIZONTAL
34 ,const wxString
& rName
= wxToolBarNameStr
45 bool Create( wxWindow
* pParent
47 ,const wxPoint
& rPos
= wxDefaultPosition
48 ,const wxSize
& rSize
= wxDefaultSize
49 ,long lStyle
= wxNO_BORDER
|wxTB_HORIZONTAL
50 ,const wxString
& rName
= wxToolBarNameStr
55 // override/implement base class virtuals
56 virtual wxToolBarToolBase
* FindToolForPosition( wxCoord x
60 // The post-tool-addition call
61 virtual bool Realize(void);
63 virtual void SetToolBitmapSize(const wxSize
& rSize
);
64 virtual wxSize
GetToolSize(void) const;
66 virtual void SetRows(int nRows
);
69 virtual bool OS2Command( WXUINT uParam
72 virtual bool OS2OnNotify( int nCtrl
76 void OnMouseEvent(wxMouseEvent
& rEvent
);
77 void OnSysColourChanged(wxSysColourChangedEvent
& rEvent
);
81 // implement base class pure virtuals
82 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
83 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
85 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
86 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
87 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
89 virtual wxToolBarToolBase
* CreateTool( int vId
90 ,const wxBitmap
& rBitmap1
91 ,const wxBitmap
& rBitmap2
93 ,wxObject
* pClientData
94 ,const wxString
& rShortHelpString
95 ,const wxString
& rLongHelpString
97 virtual wxToolBarToolBase
* CreateTool(wxControl
* pControl
);
99 // should be called whenever the toolbar size changes
100 void UpdateSize(void);
102 // override WndProc to process WM_SIZE
103 virtual MRESULT
OS2WindowProc( HWND hWnd
109 // the big bitmap containing all bitmaps of the toolbar buttons
112 // the total number of toolbar elements
116 DECLARE_EVENT_TABLE()
117 DECLARE_DYNAMIC_CLASS(wxToolBar
)
120 #endif // wxUSE_TOOLBAR