]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/tbargtk.h
wxSizeEvent now carries the total size, not just the client size
[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
e76c0b5f
VZ
57 virtual void SetWindowStyleFlag( long style );
58
8a0681f9
VZ
59 // implementation from now on
60 // --------------------------
61
c801d85f 62 GtkToolbar *m_toolbar;
8a0681f9
VZ
63
64 GdkColor *m_fg;
65 GdkColor *m_bg;
66
9864c56d 67 bool m_blockEvent;
8a0681f9 68
9b7e522a 69 void OnInternalIdle();
8a0681f9
VZ
70
71protected:
72 // common part of all ctors
73 void Init();
74
e76c0b5f
VZ
75 // set the GTK toolbar style and orientation
76 void GtkSetStyle();
77
8a0681f9
VZ
78 // implement base class pure virtuals
79 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
80 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
81
82 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
83 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
84 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
85
86 virtual wxToolBarToolBase *CreateTool(int id,
e76c0b5f 87 const wxString& label,
8a0681f9
VZ
88 const wxBitmap& bitmap1,
89 const wxBitmap& bitmap2,
e76c0b5f 90 wxItemKind kind,
8a0681f9
VZ
91 wxObject *clientData,
92 const wxString& shortHelpString,
93 const wxString& longHelpString);
94 virtual wxToolBarToolBase *CreateTool(wxControl *control);
95
9b7e522a 96private:
9b7e522a 97 DECLARE_DYNAMIC_CLASS(wxToolBar)
c801d85f
KB
98};
99
8a0681f9 100#endif // wxUSE_TOOLBAR
dcf924a3 101
c801d85f 102#endif
8a0681f9 103 // _WX_GTK_TBARGTK_H_