]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/tbar95.h
wxMenu::callback stuff taken inside WXWIN_COMPATIBILITY_2 (everybody should
[wxWidgets.git] / include / wx / msw / tbar95.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
1c383dba 2// Name: wx/msw/tbar95.h
2bda0e17
KB
3// Purpose: wxToolBar95 (Windows 95 toolbar) class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
d427503c 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_TBAR95_H_
13#define _WX_TBAR95_H_
2bda0e17
KB
14
15#ifdef __GNUG__
16#pragma interface "tbar95.h"
17#endif
18
d427503c 19#if wxUSE_TOOLBAR
2bda0e17 20
1c383dba 21#include "wx/tbarbase.h"
2bda0e17 22
1c383dba 23class WXDLLEXPORT wxToolBar95 : public wxToolBarBase
2bda0e17 24{
1c383dba
VZ
25public:
26 wxToolBar95() { Init(); }
2bda0e17 27
1c383dba
VZ
28 wxToolBar95(wxWindow *parent,
29 wxWindowID id,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = wxNO_BORDER | wxTB_HORIZONTAL,
33 const wxString& name = wxToolBarNameStr)
34 {
35 Init();
2bda0e17 36
1c383dba
VZ
37 Create(parent, id, pos, size, style, name);
38 }
2bda0e17 39
1c383dba 40 ~wxToolBar95();
2bda0e17 41
1c383dba
VZ
42 bool Create(wxWindow *parent,
43 wxWindowID id,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxNO_BORDER | wxTB_HORIZONTAL,
47 const wxString& name = wxToolBarNameStr);
2bda0e17 48
1c383dba 49 // override base class virtuals
2bda0e17 50
1c383dba
VZ
51 virtual wxToolBarTool *AddTool(int toolIndex,
52 const wxBitmap& bitmap,
53 const wxBitmap& pushedBitmap = wxNullBitmap,
54 bool toggle = FALSE,
55 long xPos = -1, long yPos = -1,
56 wxObject *clientData = NULL,
57 const wxString& helpString1 = wxEmptyString,
58 const wxString& helpString2 = wxEmptyString);
59 virtual bool AddControl(wxControl *control);
2bda0e17 60
1c383dba 61 virtual void ClearTools();
2bda0e17 62
1c383dba 63 virtual bool Realize() { return CreateTools(); };
2bda0e17 64
1c383dba
VZ
65 virtual void EnableTool(int toolIndex, bool enable);
66 virtual void ToggleTool(int toolIndex, bool toggle);
4fabb575 67
1c383dba
VZ
68 virtual void SetToolBitmapSize(const wxSize& size);
69 virtual wxSize GetToolSize() const;
70 virtual wxSize GetMaxSize() const;
14b72bf5 71
1c383dba 72 virtual bool GetToolState(int toolIndex) const;
2bda0e17 73
1c383dba
VZ
74 virtual bool CreateTools();
75 virtual void SetRows(int nRows);
81d66cf3 76
1c383dba
VZ
77 // IMPLEMENTATION
78 virtual bool MSWCommand(WXUINT param, WXWORD id);
79 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
2bda0e17 80
1c383dba
VZ
81 void OnMouseEvent(wxMouseEvent& event);
82 void OnSysColourChanged(wxSysColourChangedEvent& event);
2bda0e17
KB
83
84protected:
1c383dba
VZ
85 // common part of all ctors
86 void Init();
87
88 WXHBITMAP m_hBitmap;
2bda0e17 89
1c383dba
VZ
90 DECLARE_EVENT_TABLE()
91 DECLARE_DYNAMIC_CLASS(wxToolBar95)
2bda0e17
KB
92};
93
d427503c
VZ
94#endif // wxUSE_TOOLBAR
95
2bda0e17 96#endif
bbcdf8bc 97 // _WX_TBAR95_H_