]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/toolbar.h
(hopefully) final touches to wxArtProvider
[wxWidgets.git] / include / wx / mac / toolbar.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: toolbar.h
3// Purpose: wxToolBar class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOOLBAR_H_
13#define _WX_TOOLBAR_H_
14
15#ifdef __GNUG__
16#pragma interface "toolbar.h"
17#endif
18
519cb848
SC
19#if wxUSE_TOOLBAR
20
0dbd6262 21#include "wx/tbarbase.h"
519cb848 22#include "wx/dynarray.h"
0dbd6262
SC
23
24WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
25
26class WXDLLEXPORT wxToolBar: public wxToolBarBase
27{
28 DECLARE_DYNAMIC_CLASS(wxToolBar)
29 public:
30 /*
31 * Public interface
32 */
33
4765d335
SC
34 wxToolBar() { Init(); }
35
0dbd6262
SC
36
37 inline wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
38 long style = wxNO_BORDER|wxTB_HORIZONTAL,
39 const wxString& name = wxToolBarNameStr)
40 {
4765d335 41 Init();
0dbd6262
SC
42 Create(parent, id, pos, size, style, name);
43 }
44 ~wxToolBar();
45
46 bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
47 long style = wxNO_BORDER|wxTB_HORIZONTAL,
48 const wxString& name = wxToolBarNameStr);
49
4765d335
SC
50 // override/implement base class virtuals
51 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
0dbd6262 52
4765d335 53 virtual bool Realize();
0dbd6262 54
4765d335
SC
55 virtual void SetToolBitmapSize(const wxSize& size);
56 virtual wxSize GetToolSize() const;
0dbd6262 57
4765d335 58 virtual void SetRows(int nRows);
0dbd6262
SC
59
60 // Add all the buttons
0dbd6262 61
5273bf2f 62 virtual void MacHandleControlClick( WXWidget control , short controlpart ) ;
05adb9d2
SC
63 virtual wxString MacGetToolTipString( wxPoint &where ) ;
64 void OnPaint(wxPaintEvent& event) ;
65 void OnMouse(wxMouseEvent& event) ;
c257d44d 66 virtual void MacSuperChangedPosition() ;
0dbd6262 67protected:
4765d335
SC
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 wxBitmap& bitmap1,
81 const wxBitmap& bitmap2,
82 bool toggle,
83 wxObject *clientData,
84 const wxString& shortHelpString,
85 const wxString& longHelpString);
86 virtual wxToolBarToolBase *CreateTool(wxControl *control);
87
519cb848 88 wxArrayPtrVoid m_macToolHandles ;
0dbd6262 89
4765d335 90 DECLARE_EVENT_TABLE()
0dbd6262
SC
91};
92
519cb848
SC
93#endif // wxUSE_TOOLBAR
94
0dbd6262
SC
95#endif
96 // _WX_TOOLBAR_H_