]>
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 class WXDLLEXPORT wxToolBar
: public wxToolBarBase
25 wxToolBar() { Init(); }
27 inline wxToolBar( wxWindow
* pParent
29 ,const wxPoint
& rPos
= wxDefaultPosition
30 ,const wxSize
& rSize
= wxDefaultSize
31 ,long lStyle
= wxNO_BORDER
|wxTB_HORIZONTAL
32 ,const wxString
& rName
= wxToolBarNameStr
43 bool Create( wxWindow
* pParent
45 ,const wxPoint
& rPos
= wxDefaultPosition
46 ,const wxSize
& rSize
= wxDefaultSize
47 ,long lStyle
= wxNO_BORDER
|wxTB_HORIZONTAL
48 ,const wxString
& rName
= wxToolBarNameStr
53 // override/implement base class virtuals
54 virtual wxToolBarToolBase
* FindToolForPosition( wxCoord x
58 // The post-tool-addition call
59 virtual bool Realize(void);
61 virtual void SetToolBitmapSize(const wxSize
& rSize
);
62 virtual wxSize
GetToolSize(void) const;
64 virtual void SetRows(int nRows
);
67 virtual bool OS2Command( WXUINT uParam
70 virtual bool OS2OnNotify( int nCtrl
74 void OnMouseEvent(wxMouseEvent
& rEvent
);
75 void OnSysColourChanged(wxSysColourChangedEvent
& rEvent
);
79 // implement base class pure virtuals
80 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
81 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
83 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
84 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
85 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
87 virtual wxToolBarToolBase
* CreateTool( int vId
88 ,const wxString
& rsLabel
89 ,const wxBitmap
& rBitmapNormal
90 ,const wxBitmap
& rBitmapDisabled
92 ,wxObject
* pClientData
93 ,const wxString
& rShortHelpString
94 ,const wxString
& rLongHelpString
96 virtual wxToolBarToolBase
* CreateTool(wxControl
* pControl
);
98 // should be called whenever the toolbar size changes
99 void UpdateSize(void);
101 // override WndProc to process WM_SIZE
102 virtual MRESULT
OS2WindowProc( WXUINT ulMsg
107 // the big bitmap containing all bitmaps of the toolbar buttons
110 // the total number of toolbar elements
114 DECLARE_EVENT_TABLE()
115 DECLARE_DYNAMIC_CLASS(wxToolBar
)
118 #endif // wxUSE_TOOLBAR