]>
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_
17 // ----------------------------------------------------------------------------
18 // wxToolBar style flags
19 // ----------------------------------------------------------------------------
23 // lay out the toolbar horizontally
24 wxTB_HORIZONTAL
= wxHORIZONTAL
, // == 0x0004
26 // lay out the toolbar vertically
27 wxTB_VERTICAL
= wxVERTICAL
, // == 0x0008
29 // show 3D buttons (wxToolBarSimple only)
30 wxTB_3DBUTTONS
= 0x0010,
32 // "flat" buttons (Win32/GTK only)
35 // dockable toolbar (GTK only)
36 wxTB_DOCKABLE
= 0x0040,
38 // don't show the icons (they're shown by default)
39 wxTB_NOICONS
= 0x0080,
41 // show the text (not shown by default)
44 // don't show the divider between toolbar and the window (Win32 only)
45 wxTB_NODIVIDER
= 0x0200,
47 // no automatic alignment (Win32 only, useless)
48 wxTB_NOALIGN
= 0x0400,
50 // show the text and the icons alongside, not vertically stacked (Win32/GTK)
51 wxTB_HORZ_LAYOUT
= 0x0800,
52 wxTB_HORZ_TEXT
= wxTB_HORZ_LAYOUT
| wxTB_TEXT
56 #include "wx/tbarbase.h" // the base class for all toolbars
58 // Simple toolbar no longer available, so we will need to have
59 // a generic toolbar at some point (perhaps the wxUniv toolbar)
60 #if 0 // !wxUSE_TOOLBAR_NATIVE && !defined(__WXUNIVERSAL__)
61 #include "wx/tbarsmpl.h"
63 class WXDLLEXPORT wxToolBar
: public wxToolBarSimple
68 wxToolBar(wxWindow
*parent
,
70 const wxPoint
& pos
= wxDefaultPosition
,
71 const wxSize
& size
= wxDefaultSize
,
72 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
73 const wxString
& name
= wxToolBarNameStr
)
74 : wxToolBarSimple(parent
, winid
, pos
, size
, style
, name
) { }
76 // the most commonly used version of AddTool()
77 wxToolBarToolBase
*AddTool(int toolid
,
78 const wxBitmap
& bitmap
,
79 const wxString
& shortHelpString
= wxEmptyString
,
80 const wxString
& longHelpString
= wxEmptyString
)
82 return wxToolBarSimple::AddTool(toolid
, bitmap
, wxNullBitmap
, FALSE
, -1, -1, NULL
,
83 shortHelpString
, longHelpString
);
87 wxToolBarToolBase
*AddTool
90 const wxBitmap
& bitmap
,
91 const wxBitmap
& pushedBitmap
,
93 wxObject
*clientData
= NULL
,
94 const wxString
& shortHelpString
= wxEmptyString
,
95 const wxString
& longHelpString
= wxEmptyString
98 return wxToolBarSimple::AddTool(toolid
, bitmap
, pushedBitmap
, toggle
, -1, -1, clientData
,
99 shortHelpString
, longHelpString
);
102 // virtual overridden
103 virtual wxToolBarToolBase
*AddTool
106 const wxBitmap
& bitmap
,
107 const wxBitmap
& pushedBitmap
,
111 wxObject
*clientData
= NULL
,
112 const wxString
& shortHelpString
= wxEmptyString
,
113 const wxString
& longHelpString
= wxEmptyString
116 return wxToolBarSimple::AddTool(toolid
, bitmap
, pushedBitmap
, toggle
, xPos
, yPos
, clientData
,
117 shortHelpString
, longHelpString
);
121 DECLARE_DYNAMIC_CLASS(wxToolBar
)
123 #else // wxUSE_TOOLBAR_NATIVE
124 #if defined(__WXUNIVERSAL__)
125 #include "wx/univ/toolbar.h"
126 #elif defined(__WXWINCE__)
127 #include "wx/msw/wince/tbarwce.h"
128 #elif defined(__WXMSW__) && defined(__WIN95__)
129 #include "wx/msw/tbar95.h"
130 #elif defined(__WXMSW__)
131 #include "wx/msw/tbarmsw.h"
132 #elif defined(__WXMOTIF__)
133 #include "wx/motif/toolbar.h"
134 #elif defined(__WXGTK__)
135 #include "wx/gtk/tbargtk.h"
136 #elif defined(__WXMAC__)
137 #include "wx/mac/toolbar.h"
138 #elif defined(__WXCOCOA__)
139 #include "wx/cocoa/toolbar.h"
140 #elif defined(__WXPM__)
141 #include "wx/os2/toolbar.h"
143 #endif // !wxUSE_TOOLBAR_NATIVE/wxUSE_TOOLBAR_NATIVE
144 #endif // wxUSE_TOOLBAR
147 // _WX_TOOLBAR_H_BASE_