]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/tbar95.h
replaced T() makro with wxT() due to namespace probs, _T() exists, too
[wxWidgets.git] / include / wx / msw / tbar95.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 #include "wx/tbarbase.h"
21
22 WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
23
24 class WXDLLEXPORT wxToolBar95: public wxToolBarBase
25 {
26 DECLARE_DYNAMIC_CLASS(wxToolBar95)
27 public:
28 /*
29 * Public interface
30 */
31
32 wxToolBar95();
33
34 wxToolBar95(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
35 long style = wxNO_BORDER|wxTB_HORIZONTAL,
36 const wxString& name = wxToolBarNameStr)
37 {
38 Create(parent, id, pos, size, style, name);
39 }
40 ~wxToolBar95();
41
42 bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
43 long style = wxNO_BORDER|wxTB_HORIZONTAL,
44 const wxString& name = wxToolBarNameStr);
45
46 // Call default behaviour
47 void OnMouseEvent(wxMouseEvent& event);
48
49 // Handle wxToolBar95 events
50
51 // If pushedBitmap is NULL, a reversed version of bitmap is
52 // created and used as the pushed/toggled image.
53 // If toggle is TRUE, the button toggles between the two states.
54 wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
55 bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
56 const wxString& helpString1 = "", const wxString& helpString2 = "");
57
58 // Set default bitmap size
59 void SetToolBitmapSize(const wxSize& size);
60 void EnableTool(int toolIndex, bool enable); // additional drawing on enabling
61 void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
62 void ClearTools();
63
64 // The button size is bigger than the bitmap size
65 wxSize GetToolSize() const;
66
67 wxSize GetMaxSize() const;
68
69 virtual bool GetToolState(int toolIndex) const;
70
71 // Add all the buttons: required for Win95.
72 virtual bool CreateTools();
73 virtual void SetRows(int nRows);
74 virtual void LayoutButtons() {}
75
76 // The post-tool-addition call
77 bool Realize() { return CreateTools(); };
78
79 // IMPLEMENTATION
80 virtual bool MSWCommand(WXUINT param, WXWORD id);
81 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
82
83 // Responds to colour changes
84 void OnSysColourChanged(wxSysColourChangedEvent& event);
85
86 protected:
87 WXHBITMAP m_hBitmap;
88
89 DECLARE_EVENT_TABLE()
90 };
91
92 #endif // wxUSE_TOOLBAR
93
94 #endif
95 // _WX_TBAR95_H_