]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/tbar95.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/tbar95.h
3 // Purpose: wxToolBar (Windows 95 toolbar) class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "tbar95.h"
21 #include "wx/dynarray.h"
23 class WXDLLEXPORT wxToolBar
: public wxToolBarBase
27 wxToolBar() { Init(); }
29 wxToolBar(wxWindow
*parent
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
33 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
34 const wxString
& name
= wxToolBarNameStr
)
38 Create(parent
, id
, pos
, size
, style
, name
);
41 bool Create(wxWindow
*parent
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
45 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
46 const wxString
& name
= wxToolBarNameStr
);
50 // override/implement base class virtuals
51 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
53 virtual bool Realize();
55 virtual void SetToolBitmapSize(const wxSize
& size
);
56 virtual wxSize
GetToolSize() const;
58 virtual void SetRows(int nRows
);
60 // implementation only from now on
61 // -------------------------------
63 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
64 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
66 void OnMouseEvent(wxMouseEvent
& event
);
67 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
70 // common part of all ctors
73 // implement base class pure virtuals
74 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
75 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
77 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
78 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
79 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
81 virtual wxToolBarToolBase
*CreateTool(int id
,
82 const wxBitmap
& bitmap1
,
83 const wxBitmap
& bitmap2
,
86 const wxString
& shortHelpString
,
87 const wxString
& longHelpString
);
88 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
);
90 // should be called whenever the toolbar size changes
93 // override WndProc to process WM_SIZE
94 virtual long MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
96 // the big bitmap containing all bitmaps of the toolbar buttons
99 // the total number of toolbar elements
103 DECLARE_EVENT_TABLE()
104 DECLARE_DYNAMIC_CLASS(wxToolBar
)
107 #endif // wxUSE_TOOLBAR