]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/tbargtk.h
added wxFSVolume patch from George Policello (untested, unreferenced from the project...
[wxWidgets.git] / include / wx / gtk / tbargtk.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: tbargtk.h
3// Purpose: GTK toolbar
4// Author: Robert Roebling
c801d85f
KB
5// RCS-ID: $Id$
6// Copyright: (c) Robert Roebling
8a0681f9 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
8a0681f9
VZ
10#ifndef _WX_GTK_TBARGTK_H_
11#define _WX_GTK_TBARGTK_H_
c801d85f
KB
12
13#ifdef __GNUG__
8a0681f9 14 #pragma interface "tbargtk.h"
c801d85f
KB
15#endif
16
dcf924a3
RR
17#if wxUSE_TOOLBAR
18
8a0681f9 19// ----------------------------------------------------------------------------
716b7364 20// wxToolBar
8a0681f9 21// ----------------------------------------------------------------------------
c801d85f 22
8a0681f9 23class wxToolBar : public wxToolBarBase
c801d85f 24{
9b7e522a 25public:
8a0681f9
VZ
26 // construction/destruction
27 wxToolBar() { Init(); }
28 wxToolBar( wxWindow *parent,
29 wxWindowID id,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = 0,
33 const wxString& name = wxToolBarNameStr )
34 {
35 Init();
36
37 Create(parent, id, pos, size, style, name);
38 }
39
40 bool Create( wxWindow *parent,
41 wxWindowID id,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = 0,
45 const wxString& name = wxToolBarNameStr );
46
47 virtual ~wxToolBar();
48
49 // override base class virtuals
debe6624 50 virtual void SetMargins(int x, int y);
debe6624 51 virtual void SetToolSeparation(int separation);
8a0681f9
VZ
52
53 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
54
a1f79c1e
VZ
55 virtual void SetToolShortHelp(int id, const wxString& helpString);
56
8a0681f9
VZ
57 // implementation from now on
58 // --------------------------
59
c801d85f 60 GtkToolbar *m_toolbar;
8a0681f9
VZ
61
62 GdkColor *m_fg;
63 GdkColor *m_bg;
64
9864c56d 65 bool m_blockEvent;
8a0681f9 66
9b7e522a 67 void OnInternalIdle();
8a0681f9
VZ
68
69protected:
70 // common part of all ctors
71 void Init();
72
73 // implement base class pure virtuals
74 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
75 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
76
77 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
78 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
79 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
80
81 virtual wxToolBarToolBase *CreateTool(int id,
82 const wxBitmap& bitmap1,
83 const wxBitmap& bitmap2,
84 bool toggle,
85 wxObject *clientData,
86 const wxString& shortHelpString,
87 const wxString& longHelpString);
88 virtual wxToolBarToolBase *CreateTool(wxControl *control);
89
9b7e522a 90private:
9b7e522a 91 DECLARE_DYNAMIC_CLASS(wxToolBar)
c801d85f
KB
92};
93
8a0681f9 94#endif // wxUSE_TOOLBAR
dcf924a3 95
c801d85f 96#endif
8a0681f9 97 // _WX_GTK_TBARGTK_H_