]> git.saurik.com Git - wxWidgets.git/blob - include/wx/tbarsmpl.h
memdc and bitmap fixes
[wxWidgets.git] / include / wx / tbarsmpl.h
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
12 #ifndef __TBARSMPLH__
13 #define __TBARSMPLH__
14
15 #ifdef __GNUG__
16 #pragma interface "tbarsmpl.h"
17 #endif
18
19 #include "wx/defs.h"
20
21 #if USE_TOOLBAR
22
23 #include "wx/bitmap.h"
24 #include "wx/list.h"
25 #include "wx/tbarbase.h"
26
27 WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
28 WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
29 WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
30
31 // XView can't cope properly with panels that behave like canvases
32 // (e.g. no scrollbars in panels)
33 class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase
34 {
35 DECLARE_DYNAMIC_CLASS(wxToolBarSimple)
36
37 public:
38
39 wxToolBarSimple(void);
40 #if WXWIN_COMPATIBILITY > 0
41 inline wxToolBarSimple(wxWindow *parent, int x, int y, int w, int h,
42 long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 1,
43 const char *name = wxToolBarNameStr)
44 {
45 Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name);
46 }
47 #endif
48 inline wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
49 long style = wxNO_BORDER, int orientation = wxVERTICAL,
50 int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr)
51 {
52 Create(parent, id, pos, size, style, orientation, RowsOrColumns, name);
53 }
54 ~wxToolBarSimple(void);
55
56 bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
57 long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr);
58
59 void OnPaint(wxPaintEvent& event);
60 void OnSize(wxSizeEvent& event);
61 void OnMouseEvent(wxMouseEvent& event);
62 void OnKillFocus(wxFocusEvent& event);
63
64 // Handle wxToolBar events
65
66 virtual void DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool);
67 virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
68
69 virtual void SpringUpButton(int index);
70
71 DECLARE_EVENT_TABLE()
72 };
73
74 #endif // USE_TOOLBAR
75 #endif
76 // __TBARSMPLH__
77