]> git.saurik.com Git - wxWidgets.git/blame - include/wx/tbarsmpl.h
Added wxTolBar::etMargins
[wxWidgets.git] / include / wx / tbarsmpl.h
CommitLineData
10b959e3
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: tbarsmpl.h
3// Purpose: wxToolBarSimple class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_TBARSMPLH__
13#define _WX_TBARSMPLH__
10b959e3
JS
14
15#ifdef __GNUG__
16#pragma interface "tbarsmpl.h"
17#endif
18
19#include "wx/defs.h"
20
47d67540 21#if wxUSE_TOOLBAR
10b959e3
JS
22
23#include "wx/bitmap.h"
24#include "wx/list.h"
25#include "wx/tbarbase.h"
26
46ccb510
JS
27class WXDLLEXPORT wxMemoryDC;
28
10b959e3
JS
29WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
30WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
31WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
32
33// XView can't cope properly with panels that behave like canvases
34// (e.g. no scrollbars in panels)
35class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase
36{
37 DECLARE_DYNAMIC_CLASS(wxToolBarSimple)
38
39 public:
40
41 wxToolBarSimple(void);
debe6624 42 inline wxToolBarSimple(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)
10b959e3 45 {
81d66cf3 46 Create(parent, id, pos, size, style, name);
10b959e3
JS
47 }
48 ~wxToolBarSimple(void);
49
debe6624 50 bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
81d66cf3 51 long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr);
10b959e3
JS
52
53 void OnPaint(wxPaintEvent& event);
54 void OnSize(wxSizeEvent& event);
55 void OnMouseEvent(wxMouseEvent& event);
56 void OnKillFocus(wxFocusEvent& event);
57
58 // Handle wxToolBar events
59
60 virtual void DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool);
debe6624 61 virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
10b959e3 62
debe6624 63 virtual void SpringUpButton(int index);
10b959e3 64
81d66cf3
JS
65 void Layout(void);
66
67 // The post-tool-addition call
68 bool Realize() { Layout(); return TRUE; };
69
70protected:
71 int m_currentRowsOrColumns;
72 long m_lastX, m_lastY;
73
74DECLARE_EVENT_TABLE()
75
10b959e3
JS
76};
77
47d67540 78#endif // wxUSE_TOOLBAR
10b959e3 79#endif
34138703 80 // _WX_TBARSMPLH__
10b959e3 81