]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/tbargtk.h
another GetInt/GetId bug fix
[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
55 // implementation from now on
56 // --------------------------
57
c801d85f 58 GtkToolbar *m_toolbar;
8a0681f9
VZ
59
60 GdkColor *m_fg;
61 GdkColor *m_bg;
62
59fe1666 63 bool m_blockNextEvent;
8a0681f9 64
9b7e522a 65 void OnInternalIdle();
8a0681f9
VZ
66
67protected:
68 // common part of all ctors
69 void Init();
70
71 // implement base class pure virtuals
72 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
73 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
74
75 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
76 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
77 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
78
79 virtual wxToolBarToolBase *CreateTool(int id,
80 const wxBitmap& bitmap1,
81 const wxBitmap& bitmap2,
82 bool toggle,
83 wxObject *clientData,
84 const wxString& shortHelpString,
85 const wxString& longHelpString);
86 virtual wxToolBarToolBase *CreateTool(wxControl *control);
87
9b7e522a 88private:
9b7e522a 89 DECLARE_DYNAMIC_CLASS(wxToolBar)
c801d85f
KB
90};
91
8a0681f9 92#endif // wxUSE_TOOLBAR
dcf924a3 93
c801d85f 94#endif
8a0681f9 95 // _WX_GTK_TBARGTK_H_