]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/toolbar.h
renamed GlobalPtr to GlobalPtrLock
[wxWidgets.git] / include / wx / motif / toolbar.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
8a0681f9 2// Name: wx/motif/toolbar.h
9b6dbb09
JS
3// Purpose: wxToolBar class
4// Author: Julian Smart
8a0681f9 5// Modified by: 13.12.99 by VZ during toolbar classes reorganization
9b6dbb09
JS
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOOLBAR_H_
13#define _WX_TOOLBAR_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
83df96d6 16#pragma interface "toolbar.h"
9b6dbb09
JS
17#endif
18
8a0681f9
VZ
19class WXDLLEXPORT wxToolBar : public wxToolBarBase
20{
21public:
22 // ctors and dtor
23 wxToolBar() { Init(); }
83df96d6 24
8a0681f9 25 wxToolBar(wxWindow *parent,
83df96d6
JS
26 wxWindowID id,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxNO_BORDER | wxTB_HORIZONTAL,
30 const wxString& name = wxToolBarNameStr)
8a0681f9
VZ
31 {
32 Init();
83df96d6 33
8a0681f9
VZ
34 Create(parent, id, pos, size, style, name);
35 }
83df96d6 36
8a0681f9 37 bool Create(wxWindow *parent,
83df96d6
JS
38 wxWindowID id,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxNO_BORDER | wxTB_HORIZONTAL,
42 const wxString& name = wxToolBarNameStr);
43
8a0681f9 44 virtual ~wxToolBar();
83df96d6 45
8a0681f9 46 // override/implement base class virtuals
982b2cfc 47 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
83df96d6 48
8a0681f9 49 virtual bool Realize();
83df96d6 50
8a0681f9 51 // implementation from now on
83df96d6 52
8a0681f9 53 // find tool by widget
982b2cfc 54 wxToolBarToolBase *FindToolByWidget(WXWidget w) const;
83df96d6 55
46675b46 56private:
8a0681f9
VZ
57 // common part of all ctors
58 void Init();
83df96d6 59
8a0681f9 60 // implement base class pure virtuals
982b2cfc
VZ
61 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
62 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
83df96d6 63
982b2cfc
VZ
64 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
65 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
66 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
83df96d6 67
982b2cfc 68 virtual wxToolBarToolBase *CreateTool(int id,
fcb35b5f
VZ
69 const wxString& label,
70 const wxBitmap& bmpNormal,
71 const wxBitmap& bmpDisabled,
72 wxItemKind kind,
73 wxObject *clientData,
74 const wxString& shortHelp,
75 const wxString& longHelp);
982b2cfc 76 virtual wxToolBarToolBase *CreateTool(wxControl *control);
46675b46
MB
77
78 virtual void DoSetSize(int x, int y,
79 int width, int height,
80 int sizeFlags = wxSIZE_AUTO);
8a0681f9
VZ
81private:
82 DECLARE_DYNAMIC_CLASS(wxToolBar)
9b6dbb09
JS
83};
84
85#endif
83df96d6 86// _WX_TOOLBAR_H_