]> git.saurik.com Git - wxWidgets.git/blob - include/wx/toolbar.h
fixed USER_EXPORTED_ARRAY macros
[wxWidgets.git] / include / wx / toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/toolbar.h
3 // Purpose: wxToolBar interface declaration
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 20.11.99
7 // RCS-ID: $Id$
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_TOOLBAR_H_BASE_
13 #define _WX_TOOLBAR_H_BASE_
14
15 #include "wx/tbarbase.h" // the base class for all toolbars
16
17 #if wxUSE_TOOLBAR
18 #if !wxUSE_TOOLBAR_NATIVE && !defined(__WXUNIVERSAL__)
19 #include "wx/tbarsmpl.h"
20
21 class WXDLLEXPORT wxToolBar : public wxToolBarSimple
22 {
23 public:
24 wxToolBar() { }
25
26 wxToolBar(wxWindow *parent,
27 wxWindowID winid,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxNO_BORDER | wxTB_HORIZONTAL,
31 const wxString& name = wxToolBarNameStr)
32 : wxToolBarSimple(parent, winid, pos, size, style, name) { }
33
34 // the most commonly used version of AddTool()
35 wxToolBarToolBase *AddTool(int toolid,
36 const wxBitmap& bitmap,
37 const wxString& shortHelpString = wxEmptyString,
38 const wxString& longHelpString = wxEmptyString)
39 {
40 return wxToolBarSimple::AddTool(toolid, bitmap, wxNullBitmap, FALSE, -1, -1, NULL,
41 shortHelpString, longHelpString);
42 }
43
44 // old form
45 wxToolBarToolBase *AddTool
46 (
47 int toolid,
48 const wxBitmap& bitmap,
49 const wxBitmap& pushedBitmap,
50 bool toggle,
51 wxObject *clientData = NULL,
52 const wxString& shortHelpString = wxEmptyString,
53 const wxString& longHelpString = wxEmptyString
54 )
55 {
56 return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, -1, -1, clientData,
57 shortHelpString, longHelpString);
58 }
59
60 // virtual overridden
61 virtual wxToolBarToolBase *AddTool
62 (
63 int toolid,
64 const wxBitmap& bitmap,
65 const wxBitmap& pushedBitmap,
66 bool toggle,
67 wxCoord xPos,
68 wxCoord yPos = -1,
69 wxObject *clientData = NULL,
70 const wxString& shortHelpString = wxEmptyString,
71 const wxString& longHelpString = wxEmptyString
72 )
73 {
74 return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, xPos, yPos, clientData,
75 shortHelpString, longHelpString);
76 }
77
78 private:
79 DECLARE_DYNAMIC_CLASS(wxToolBar)
80 };
81 #else // wxUSE_TOOLBAR_NATIVE
82 #if defined(__WXUNIVERSAL__)
83 #include "wx/univ/toolbar.h"
84 #elif defined(__WXMSW__) && defined(__WIN95__)
85 #include "wx/msw/tbar95.h"
86 #elif defined(__WXMSW__)
87 #include "wx/msw/tbarmsw.h"
88 #elif defined(__WXMOTIF__)
89 #include "wx/motif/toolbar.h"
90 #elif defined(__WXGTK__)
91 #include "wx/gtk/tbargtk.h"
92 #elif defined(__WXMAC__)
93 #include "wx/mac/toolbar.h"
94 #elif defined(__WXPM__)
95 #include "wx/os2/toolbar.h"
96 #endif
97 #endif // !wxUSE_TOOLBAR_NATIVE/wxUSE_TOOLBAR_NATIVE
98 #endif // wxUSE_TOOLBAR
99
100 #endif
101 // _WX_TOOLBAR_H_BASE_