]> git.saurik.com Git - wxWidgets.git/blame - include/wx/toolbar.h
added wxBitmapToHICON/CURSOR helper functions
[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$
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
8a0681f9 17#if wxUSE_TOOLBAR
a9b33d6b 18 #if !wxUSE_TOOLBAR_NATIVE && !defined(__WXUNIVERSAL__)
8a0681f9 19 #include "wx/tbarsmpl.h"
7aa58644
VZ
20
21 class WXDLLEXPORT wxToolBar : public wxToolBarSimple
22 {
23 public:
24 wxToolBar() { }
25
26 wxToolBar(wxWindow *parent,
d9e2e4c2 27 wxWindowID winid,
7aa58644
VZ
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxNO_BORDER | wxTB_HORIZONTAL,
31 const wxString& name = wxToolBarNameStr)
d9e2e4c2 32 : wxToolBarSimple(parent, winid, pos, size, style, name) { }
7aa58644 33
e88be8c9 34 // the most commonly used version of AddTool()
d9e2e4c2 35 wxToolBarToolBase *AddTool(int toolid,
e88be8c9
RR
36 const wxBitmap& bitmap,
37 const wxString& shortHelpString = wxEmptyString,
38 const wxString& longHelpString = wxEmptyString)
39 {
d9e2e4c2 40 return wxToolBarSimple::AddTool(toolid, bitmap, wxNullBitmap, FALSE, -1, -1, NULL,
e88be8c9
RR
41 shortHelpString, longHelpString);
42 }
a9b33d6b 43
e88be8c9
RR
44 // old form
45 wxToolBarToolBase *AddTool
46 (
d9e2e4c2 47 int toolid,
e88be8c9
RR
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 {
d9e2e4c2 56 return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, -1, -1, clientData,
e88be8c9
RR
57 shortHelpString, longHelpString);
58 }
a9b33d6b 59
e88be8c9
RR
60 // virtual overridden
61 virtual wxToolBarToolBase *AddTool
62 (
d9e2e4c2 63 int toolid,
e88be8c9
RR
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 {
d9e2e4c2 74 return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, xPos, yPos, clientData,
e88be8c9
RR
75 shortHelpString, longHelpString);
76 }
a9b33d6b 77
7aa58644
VZ
78 private:
79 DECLARE_DYNAMIC_CLASS(wxToolBar)
80 };
8a0681f9 81 #else // wxUSE_TOOLBAR_NATIVE
c08a4f00
RR
82 #if defined(__WXUNIVERSAL__)
83 #include "wx/univ/toolbar.h"
84 #elif defined(__WXMSW__) && defined(__WIN95__)
8a0681f9
VZ
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"
8a0681f9
VZ
92 #elif defined(__WXMAC__)
93 #include "wx/mac/toolbar.h"
94 #elif defined(__WXPM__)
95 #include "wx/os2/toolbar.h"
8a0681f9
VZ
96 #endif
97 #endif // !wxUSE_TOOLBAR_NATIVE/wxUSE_TOOLBAR_NATIVE
98#endif // wxUSE_TOOLBAR
c801d85f
KB
99
100#endif
6d167489 101 // _WX_TOOLBAR_H_BASE_