]> git.saurik.com Git - wxWidgets.git/blame - include/wx/toolbar.h
wxCocoa: Added (mostly) stubs for wxGLCanvas and friends.
[wxWidgets.git] / include / wx / toolbar.h
CommitLineData
6d167489
VZ
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$
77ffb593 8// Copyright: (c) wxWidgets team
65571936 9// Licence: wxWindows licence
6d167489
VZ
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOOLBAR_H_BASE_
13#define _WX_TOOLBAR_H_BASE_
14
f9dae779
VZ
15#include "wx/defs.h"
16
17// ----------------------------------------------------------------------------
18// wxToolBar style flags
19// ----------------------------------------------------------------------------
20
21enum
22{
23 // lay out the toolbar horizontally
24 wxTB_HORIZONTAL = wxHORIZONTAL, // == 0x0004
25
26 // lay out the toolbar vertically
27 wxTB_VERTICAL = wxVERTICAL, // == 0x0008
28
29 // show 3D buttons (wxToolBarSimple only)
30 wxTB_3DBUTTONS = 0x0010,
31
32 // "flat" buttons (Win32/GTK only)
33 wxTB_FLAT = 0x0020,
34
35 // dockable toolbar (GTK only)
36 wxTB_DOCKABLE = 0x0040,
37
38 // don't show the icons (they're shown by default)
39 wxTB_NOICONS = 0x0080,
40
41 // show the text (not shown by default)
42 wxTB_TEXT = 0x0100,
43
44 // don't show the divider between toolbar and the window (Win32 only)
45 wxTB_NODIVIDER = 0x0200,
46
47 // no automatic alignment (Win32 only, useless)
48 wxTB_NOALIGN = 0x0400,
49
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
53};
6d167489 54
8a0681f9 55#if wxUSE_TOOLBAR
f9dae779
VZ
56 #include "wx/tbarbase.h" // the base class for all toolbars
57
9ce43bfa
JS
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__)
8a0681f9 61 #include "wx/tbarsmpl.h"
7aa58644
VZ
62
63 class WXDLLEXPORT wxToolBar : public wxToolBarSimple
64 {
65 public:
66 wxToolBar() { }
67
68 wxToolBar(wxWindow *parent,
d9e2e4c2 69 wxWindowID winid,
7aa58644
VZ
70 const wxPoint& pos = wxDefaultPosition,
71 const wxSize& size = wxDefaultSize,
72 long style = wxNO_BORDER | wxTB_HORIZONTAL,
73 const wxString& name = wxToolBarNameStr)
d9e2e4c2 74 : wxToolBarSimple(parent, winid, pos, size, style, name) { }
7aa58644 75
e88be8c9 76 // the most commonly used version of AddTool()
d9e2e4c2 77 wxToolBarToolBase *AddTool(int toolid,
e88be8c9
RR
78 const wxBitmap& bitmap,
79 const wxString& shortHelpString = wxEmptyString,
80 const wxString& longHelpString = wxEmptyString)
81 {
cb719f2e 82 return wxToolBarSimple::AddTool(toolid, bitmap, wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, NULL,
e88be8c9
RR
83 shortHelpString, longHelpString);
84 }
a9b33d6b 85
e88be8c9
RR
86 // old form
87 wxToolBarToolBase *AddTool
88 (
d9e2e4c2 89 int toolid,
e88be8c9
RR
90 const wxBitmap& bitmap,
91 const wxBitmap& pushedBitmap,
92 bool toggle,
93 wxObject *clientData = NULL,
94 const wxString& shortHelpString = wxEmptyString,
95 const wxString& longHelpString = wxEmptyString
96 )
97 {
cb719f2e 98 return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, wxDefaultCoord, wxDefaultCoord, clientData,
e88be8c9
RR
99 shortHelpString, longHelpString);
100 }
a9b33d6b 101
e88be8c9
RR
102 // virtual overridden
103 virtual wxToolBarToolBase *AddTool
104 (
d9e2e4c2 105 int toolid,
e88be8c9
RR
106 const wxBitmap& bitmap,
107 const wxBitmap& pushedBitmap,
108 bool toggle,
109 wxCoord xPos,
cb719f2e 110 wxCoord yPos = wxDefaultCoord,
e88be8c9
RR
111 wxObject *clientData = NULL,
112 const wxString& shortHelpString = wxEmptyString,
113 const wxString& longHelpString = wxEmptyString
114 )
115 {
d9e2e4c2 116 return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, xPos, yPos, clientData,
e88be8c9
RR
117 shortHelpString, longHelpString);
118 }
a9b33d6b 119
7aa58644
VZ
120 private:
121 DECLARE_DYNAMIC_CLASS(wxToolBar)
122 };
8a0681f9 123 #else // wxUSE_TOOLBAR_NATIVE
c08a4f00
RR
124 #if defined(__WXUNIVERSAL__)
125 #include "wx/univ/toolbar.h"
a9928e9d 126 #elif defined(__WXMSW__) && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__)))
a96b4743 127 #include "wx/msw/tbar95.h"
39d2f9a7
JS
128 #elif defined(__WXWINCE__)
129 #include "wx/msw/wince/tbarwce.h"
8a0681f9
VZ
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"
8a0681f9
VZ
136 #elif defined(__WXMAC__)
137 #include "wx/mac/toolbar.h"
715c1da4
DE
138 #elif defined(__WXCOCOA__)
139 #include "wx/cocoa/toolbar.h"
8a0681f9
VZ
140 #elif defined(__WXPM__)
141 #include "wx/os2/toolbar.h"
8a0681f9
VZ
142 #endif
143 #endif // !wxUSE_TOOLBAR_NATIVE/wxUSE_TOOLBAR_NATIVE
144#endif // wxUSE_TOOLBAR
c801d85f
KB
145
146#endif
6d167489 147 // _WX_TOOLBAR_H_BASE_