]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/toolbar.h
3 // Purpose: wxToolBar class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 #include "wx/dynarray.h"
19 class WXDLLEXPORT wxToolBar
: public wxToolBarBase
23 wxToolBar() { Init(); }
25 wxToolBar(wxWindow
*parent
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
30 const wxString
& name
= wxToolBarNameStr
)
34 Create(parent
, id
, pos
, size
, style
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
42 const wxString
& name
= wxToolBarNameStr
);
46 // override/implement base class virtuals
47 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
49 virtual bool Realize();
51 virtual void SetToolBitmapSize(const wxSize
& size
);
52 virtual wxSize
GetToolSize() const;
54 virtual void SetRows(int nRows
);
56 // implementation only from now on
57 // -------------------------------
59 void OnMouseEvent(wxMouseEvent
& event
);
64 // common part of all ctors
67 // recreate the control completely
70 // implement base class pure virtuals
71 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
72 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
74 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
75 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
76 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
78 virtual wxToolBarToolBase
*CreateTool(int id
,
79 const wxString
& label
,
80 const wxBitmap
& bmpNormal
,
81 const wxBitmap
& bmpDisabled
,
84 const wxString
& shortHelp
,
85 const wxString
& longHelp
);
86 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
);
88 // return the appropriate size and flags for the toolbar control
89 virtual wxSize
DoGetBestSize() const;
91 // should be called whenever the toolbar size changes
94 // the big bitmap containing all bitmaps of the toolbar buttons
97 // the total number of toolbar elements
100 // the tool the cursor is in
101 wxToolBarToolBase
*m_pInTool
;
104 DECLARE_EVENT_TABLE()
105 DECLARE_DYNAMIC_CLASS(wxToolBar
)
106 DECLARE_NO_COPY_CLASS(wxToolBar
)
109 #endif // wxUSE_TOOLBAR