]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/tbar95.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/tbar95.h
3 // Purpose: wxToolBar95 (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/tbarbase.h"
23 class WXDLLEXPORT wxToolBar95
: public wxToolBarBase
26 wxToolBar95() { Init(); }
28 wxToolBar95(wxWindow
*parent
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
32 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
33 const wxString
& name
= wxToolBarNameStr
)
37 Create(parent
, id
, pos
, size
, style
, name
);
42 bool Create(wxWindow
*parent
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
47 const wxString
& name
= wxToolBarNameStr
);
49 // override base class virtuals
51 virtual wxToolBarTool
*AddTool(int toolIndex
,
52 const wxBitmap
& bitmap
,
53 const wxBitmap
& pushedBitmap
= wxNullBitmap
,
55 long xPos
= -1, long yPos
= -1,
56 wxObject
*clientData
= NULL
,
57 const wxString
& helpString1
= wxEmptyString
,
58 const wxString
& helpString2
= wxEmptyString
);
59 virtual bool AddControl(wxControl
*control
);
61 virtual void ClearTools();
63 virtual bool Realize() { return CreateTools(); };
65 virtual void EnableTool(int toolIndex
, bool enable
);
66 virtual void ToggleTool(int toolIndex
, bool toggle
);
68 virtual void SetToolBitmapSize(const wxSize
& size
);
69 virtual wxSize
GetToolSize() const;
70 virtual wxSize
GetMaxSize() const;
72 virtual bool GetToolState(int toolIndex
) const;
74 virtual bool CreateTools();
75 virtual void SetRows(int nRows
);
78 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
79 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
81 void OnMouseEvent(wxMouseEvent
& event
);
82 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
85 // common part of all ctors
93 class WXDLLEXPORT wxToolBar
: public wxToolBar95
98 wxToolBar(wxWindow
*parent
,
100 const wxPoint
& pos
= wxDefaultPosition
,
101 const wxSize
& size
= wxDefaultSize
,
102 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
103 const wxString
& name
= wxToolBarNameStr
)
104 : wxToolBar95(parent
, id
, pos
, size
, style
, name
)
109 DECLARE_DYNAMIC_CLASS(wxToolBar
)
112 #endif // wxUSE_TOOLBAR