]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/toolbar.h
adding OS level Window Menu by default
[wxWidgets.git] / include / wx / mac / carbon / toolbar.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: toolbar.h
3// Purpose: wxToolBar class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOOLBAR_H_
13#define _WX_TOOLBAR_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "toolbar.h"
17#endif
18
19#if wxUSE_TOOLBAR
20
21#include "wx/tbarbase.h"
22#include "wx/dynarray.h"
23
24WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
25
26class WXDLLEXPORT wxToolBar: public wxToolBarBase
27{
28 DECLARE_DYNAMIC_CLASS(wxToolBar)
29 public:
30 /*
31 * Public interface
32 */
33
34 wxToolBar() { Init(); }
35
36
37 inline wxToolBar(wxWindow *parent, wxWindowID id,
38 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
39 long style = wxNO_BORDER|wxTB_HORIZONTAL,
40 const wxString& name = wxToolBarNameStr)
41 {
42 Init();
43 Create(parent, id, pos, size, style, name);
44 }
45 ~wxToolBar();
46
47 bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
48 long style = wxNO_BORDER|wxTB_HORIZONTAL,
49 const wxString& name = wxToolBarNameStr);
50
51 // override/implement base class virtuals
52 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
53
54 virtual bool Realize();
55
56 virtual void SetToolBitmapSize(const wxSize& size);
57 virtual wxSize GetToolSize() const;
58
59 virtual void SetRows(int nRows);
60
61 // Add all the buttons
62
8cf73271
SC
63 virtual wxString MacGetToolTipString( wxPoint &where ) ;
64 void OnPaint(wxPaintEvent& event) ;
65 void OnMouse(wxMouseEvent& event) ;
66 virtual void MacSuperChangedPosition() ;
67protected:
68 // common part of all ctors
69 void Init();
70
71 // implement base class pure virtuals
72 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
73 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
74
75 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
76 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
77 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
78
79 virtual wxToolBarToolBase *CreateTool(int id,
80 const wxString& label,
81 const wxBitmap& bmpNormal,
82 const wxBitmap& bmpDisabled,
83 wxItemKind kind,
84 wxObject *clientData,
85 const wxString& shortHelp,
86 const wxString& longHelp);
87 virtual wxToolBarToolBase *CreateTool(wxControl *control);
88
89 DECLARE_EVENT_TABLE()
90};
91
92#endif // wxUSE_TOOLBAR
93
94#endif
95 // _WX_TOOLBAR_H_