]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/tbar95.h
Moved all WXDLLEXPORT's to be before the return type in order to make
[wxWidgets.git] / include / wx / msw / tbar95.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: tbar95.h
3// Purpose: wxToolBar95 (Windows 95 toolbar) class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc
JS
8// Copyright: (c) Julian Smart
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
47d67540 19#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
2bda0e17
KB
20#include "wx/tbarbase.h"
21
39ca6d79 22WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
2bda0e17 23
2bda0e17
KB
24class WXDLLEXPORT wxToolBar95: public wxToolBarBase
25{
26 DECLARE_DYNAMIC_CLASS(wxToolBar95)
27 public:
28 /*
29 * Public interface
30 */
31
32 wxToolBar95(void);
33
debe6624 34 inline wxToolBar95(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
81d66cf3
JS
35 long style = wxNO_BORDER|wxTB_HORIZONTAL,
36 const wxString& name = wxToolBarNameStr)
2bda0e17 37 {
81d66cf3 38 Create(parent, id, pos, size, style, name);
2bda0e17
KB
39 }
40 ~wxToolBar95(void);
41
debe6624 42 bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
81d66cf3
JS
43 long style = wxNO_BORDER|wxTB_HORIZONTAL,
44 const wxString& name = wxToolBarNameStr);
2bda0e17
KB
45
46 // Call default behaviour
57c208c5
JS
47 void OnPaint(wxPaintEvent& WXUNUSED(event)) { Default() ; }
48 void OnSize(wxSizeEvent& WXUNUSED(event)) { Default() ; }
49 void OnKillFocus(wxFocusEvent& WXUNUSED(event)) { Default() ; }
e6460682 50 void OnMouseEvent(wxMouseEvent& event);
2bda0e17
KB
51
52 // Handle wxToolBar95 events
53
54 // If pushedBitmap is NULL, a reversed version of bitmap is
55 // created and used as the pushed/toggled image.
56 // If toggle is TRUE, the button toggles between the two states.
debe6624
JS
57 wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
58 bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
2bda0e17
KB
59 const wxString& helpString1 = "", const wxString& helpString2 = "");
60
2bda0e17 61 // Set default bitmap size
81d66cf3 62 void SetToolBitmapSize(const wxSize& size);
debe6624
JS
63 void EnableTool(int toolIndex, bool enable); // additional drawing on enabling
64 void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
2bda0e17
KB
65 void ClearTools(void);
66
67 // The button size is bigger than the bitmap size
81d66cf3 68 wxSize GetToolSize(void) const;
2bda0e17
KB
69
70 wxSize GetMaxSize(void) const;
4fabb575 71
2bda0e17
KB
72 void GetSize(int *w, int *y) const;
73
14b72bf5
JS
74 virtual bool GetToolState(int toolIndex) const;
75
2bda0e17
KB
76 // Add all the buttons: required for Win95.
77 virtual bool CreateTools(void);
debe6624 78 virtual void SetRows(int nRows);
cc2b7472 79 virtual void LayoutButtons(void) {}
2bda0e17 80
81d66cf3
JS
81 // The post-tool-addition call
82 bool Realize() { return CreateTools(); };
83
2bda0e17 84 // IMPLEMENTATION
fd3f686c 85 virtual bool MSWCommand(WXUINT param, WXWORD id);
a23fd0e1 86 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
2bda0e17
KB
87
88 // Responds to colour changes
89 void OnSysColourChanged(wxSysColourChangedEvent& event);
90
91protected:
92 WXHBITMAP m_hBitmap;
93
94DECLARE_EVENT_TABLE()
95};
96
47d67540 97#endif // wxUSE_TOOL/BUTTONBAR
2bda0e17 98#endif
bbcdf8bc 99 // _WX_TBAR95_H_