]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxToolBar interface declaration
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_TOOLBAR_H_BASE_
13 #define _WX_TOOLBAR_H_BASE_
15 #include "wx/tbarbase.h" // the base class for all toolbars
18 #if !wxUSE_TOOLBAR_NATIVE && !defined(__WXUNIVERSAL__)
19 #include "wx/tbarsmpl.h"
21 class WXDLLEXPORT wxToolBar
: public wxToolBarSimple
26 wxToolBar(wxWindow
*parent
,
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
, id
, pos
, size
, style
, name
) { }
34 // the most commonly used version of AddTool()
35 wxToolBarToolBase
*AddTool(int id
,
36 const wxBitmap
& bitmap
,
37 const wxString
& shortHelpString
= wxEmptyString
,
38 const wxString
& longHelpString
= wxEmptyString
)
40 return wxToolBarSimple::AddTool(id
, bitmap
, wxNullBitmap
, FALSE
, -1, -1, NULL
,
41 shortHelpString
, longHelpString
);
45 wxToolBarToolBase
*AddTool
48 const wxBitmap
& bitmap
,
49 const wxBitmap
& pushedBitmap
,
51 wxObject
*clientData
= NULL
,
52 const wxString
& shortHelpString
= wxEmptyString
,
53 const wxString
& longHelpString
= wxEmptyString
56 return wxToolBarSimple::AddTool(id
, bitmap
, pushedBitmap
, toggle
, -1, -1, clientData
,
57 shortHelpString
, longHelpString
);
61 virtual wxToolBarToolBase
*AddTool
64 const wxBitmap
& bitmap
,
65 const wxBitmap
& pushedBitmap
,
69 wxObject
*clientData
= NULL
,
70 const wxString
& shortHelpString
= wxEmptyString
,
71 const wxString
& longHelpString
= wxEmptyString
74 return wxToolBarSimple::AddTool(id
, bitmap
, pushedBitmap
, toggle
, xPos
, yPos
, clientData
,
75 shortHelpString
, longHelpString
);
79 DECLARE_DYNAMIC_CLASS(wxToolBar
)
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 #elif defined(__WXSTUBS__)
97 #include "wx/stubs/toolbar.h"
99 #endif // !wxUSE_TOOLBAR_NATIVE/wxUSE_TOOLBAR_NATIVE
100 #endif // wxUSE_TOOLBAR
103 // _WX_TOOLBAR_H_BASE_