]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/tbar95.h
wxMenu::callback stuff taken inside WXWIN_COMPATIBILITY_2 (everybody should
[wxWidgets.git] / include / wx / msw / tbar95.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/tbar95.h
3 // Purpose: wxToolBar95 (Windows 95 toolbar) class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_TBAR95_H_
13 #define _WX_TBAR95_H_
14
15 #ifdef __GNUG__
16 #pragma interface "tbar95.h"
17 #endif
18
19 #if wxUSE_TOOLBAR
20
21 #include "wx/tbarbase.h"
22
23 class WXDLLEXPORT wxToolBar95 : public wxToolBarBase
24 {
25 public:
26 wxToolBar95() { Init(); }
27
28 wxToolBar95(wxWindow *parent,
29 wxWindowID id,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = wxNO_BORDER | wxTB_HORIZONTAL,
33 const wxString& name = wxToolBarNameStr)
34 {
35 Init();
36
37 Create(parent, id, pos, size, style, name);
38 }
39
40 ~wxToolBar95();
41
42 bool Create(wxWindow *parent,
43 wxWindowID id,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxNO_BORDER | wxTB_HORIZONTAL,
47 const wxString& name = wxToolBarNameStr);
48
49 // override base class virtuals
50
51 virtual wxToolBarTool *AddTool(int toolIndex,
52 const wxBitmap& bitmap,
53 const wxBitmap& pushedBitmap = wxNullBitmap,
54 bool toggle = FALSE,
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);
60
61 virtual void ClearTools();
62
63 virtual bool Realize() { return CreateTools(); };
64
65 virtual void EnableTool(int toolIndex, bool enable);
66 virtual void ToggleTool(int toolIndex, bool toggle);
67
68 virtual void SetToolBitmapSize(const wxSize& size);
69 virtual wxSize GetToolSize() const;
70 virtual wxSize GetMaxSize() const;
71
72 virtual bool GetToolState(int toolIndex) const;
73
74 virtual bool CreateTools();
75 virtual void SetRows(int nRows);
76
77 // IMPLEMENTATION
78 virtual bool MSWCommand(WXUINT param, WXWORD id);
79 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
80
81 void OnMouseEvent(wxMouseEvent& event);
82 void OnSysColourChanged(wxSysColourChangedEvent& event);
83
84 protected:
85 // common part of all ctors
86 void Init();
87
88 WXHBITMAP m_hBitmap;
89
90 DECLARE_EVENT_TABLE()
91 DECLARE_DYNAMIC_CLASS(wxToolBar95)
92 };
93
94 #endif // wxUSE_TOOLBAR
95
96 #endif
97 // _WX_TBAR95_H_