]> git.saurik.com Git - wxWidgets.git/blob - include/wx/aui/auibar.h
add wxSP_THIN_SASH for completeness (#9902)
[wxWidgets.git] / include / wx / aui / auibar.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aui/toolbar.h
3 // Purpose: wxaui: wx advanced user interface - docking window manager
4 // Author: Benjamin I. Williams
5 // Modified by:
6 // Created: 2008-08-04
7 // RCS-ID: $Id: framemanager.h 53135 2008-04-12 02:31:04Z VZ $
8 // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
9 // Licence: wxWindows Library Licence, Version 3.1
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_AUIBAR_H_
13 #define _WX_AUIBAR_H_
14
15 #include "wx/defs.h"
16
17 #if wxUSE_AUI
18
19 #include "wx/control.h"
20
21 enum wxAuiToolBarStyle
22 {
23 wxAUI_TB_TEXT = 1 << 0,
24 wxAUI_TB_NO_TOOLTIPS = 1 << 1,
25 wxAUI_TB_NO_AUTORESIZE = 1 << 2,
26 wxAUI_TB_GRIPPER = 1 << 3,
27 wxAUI_TB_OVERFLOW = 1 << 4,
28 wxAUI_TB_VERTICAL = 1 << 5,
29 wxAUI_TB_HORZ_LAYOUT = 1 << 6,
30 wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT),
31 wxAUI_TB_DEFAULT_STYLE = 0
32 };
33
34 enum wxAuiToolBarArtSetting
35 {
36 wxAUI_TBART_SEPARATOR_SIZE = 0,
37 wxAUI_TBART_GRIPPER_SIZE = 1,
38 wxAUI_TBART_OVERFLOW_SIZE = 2
39 };
40
41 enum wxAuiToolBarToolTextOrientation
42 {
43 wxAUI_TBTOOL_TEXT_LEFT = 0, // unused/unimplemented
44 wxAUI_TBTOOL_TEXT_RIGHT = 1,
45 wxAUI_TBTOOL_TEXT_TOP = 2, // unused/unimplemented
46 wxAUI_TBTOOL_TEXT_BOTTOM = 3
47 };
48
49
50 // aui toolbar event class
51
52 class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent
53 {
54 public:
55 wxAuiToolBarEvent(wxEventType command_type = wxEVT_NULL,
56 int win_id = 0)
57 : wxNotifyEvent(command_type, win_id)
58 {
59 is_dropdown_clicked = false;
60 click_pt = wxPoint(-1, -1);
61 rect = wxRect(-1,-1, 0, 0);
62 tool_id = -1;
63 }
64 #ifndef SWIG
65 wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c)
66 {
67 is_dropdown_clicked = c.is_dropdown_clicked;
68 click_pt = c.click_pt;
69 rect = c.rect;
70 tool_id = c.tool_id;
71 }
72 #endif
73 wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); }
74
75 bool IsDropDownClicked() const { return is_dropdown_clicked; }
76 void SetDropDownClicked(bool c) { is_dropdown_clicked = c; }
77
78 wxPoint GetClickPoint() const { return click_pt; }
79 void SetClickPoint(const wxPoint& p) { click_pt = p; }
80
81 wxRect GetItemRect() const { return rect; }
82 void SetItemRect(const wxRect& r) { rect = r; }
83
84 int GetToolId() const { return tool_id; }
85 void SetToolId(int id) { tool_id = id; }
86
87 private:
88
89 bool is_dropdown_clicked;
90 wxPoint click_pt;
91 wxRect rect;
92 int tool_id;
93
94 #ifndef SWIG
95 private:
96 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent)
97 #endif
98 };
99
100
101 class WXDLLIMPEXP_AUI wxAuiToolBarItem
102 {
103 friend class wxAuiToolBar;
104
105 public:
106
107 wxAuiToolBarItem()
108 {
109 window = NULL;
110 sizer_item = NULL;
111 spacer_pixels = 0;
112 id = 0;
113 kind = wxITEM_NORMAL;
114 state = 0; // normal, enabled
115 proportion = 0;
116 active = true;
117 dropdown = true;
118 sticky = true;
119 user_data = 0;
120 }
121
122 wxAuiToolBarItem(const wxAuiToolBarItem& c)
123 {
124 Assign(c);
125 }
126
127 wxAuiToolBarItem& operator=(const wxAuiToolBarItem& c)
128 {
129 Assign(c);
130 return *this;
131 }
132
133 void Assign(const wxAuiToolBarItem& c)
134 {
135 window = c.window;
136 label = c.label;
137 bitmap = c.bitmap;
138 disabled_bitmap = c.disabled_bitmap;
139 hover_bitmap = c.hover_bitmap;
140 short_help = c.short_help;
141 long_help = c.long_help;
142 sizer_item = c.sizer_item;
143 min_size = c.min_size;
144 spacer_pixels = c.spacer_pixels;
145 id = c.id;
146 kind = c.kind;
147 state = c.state;
148 proportion = c.proportion;
149 active = c.active;
150 dropdown = c.dropdown;
151 sticky = c.sticky;
152 user_data = c.user_data;
153 }
154
155
156 wxWindow* GetWindow() { return window; }
157 int GetId() const { return id; }
158 int GetKind() const { return kind; }
159 int GetState() const { return state; }
160 wxSizerItem* GetSizerItem() const { return sizer_item; }
161
162 void SetLabel(const wxString& s) { label = s; }
163 const wxString& GetLabel() const { return label; }
164
165 void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; }
166 const wxBitmap& GetBitmap() const { return bitmap; }
167
168 void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; }
169 const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; }
170
171 void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; }
172 const wxBitmap& GetHoverBitmap() const { return hover_bitmap; }
173
174 void SetShortHelp(const wxString& s) { short_help = s; }
175 const wxString& GetShortHelp() const { return short_help; }
176
177 void SetLongHelp(const wxString& s) { long_help = s; }
178 const wxString& GetLongHelp() const { return long_help; }
179
180 void SetMinSize(const wxSize& s) { min_size = s; }
181 const wxSize& GetMinSize() const { return min_size; }
182
183 void SetSpacerPixels(int s) { spacer_pixels = s; }
184 int GetSpacerPixels() const { return spacer_pixels; }
185
186 void SetProportion(int p) { proportion = p; }
187 int GetProportion() const { return proportion; }
188
189 void SetActive(bool b) { active = b; }
190 bool IsActive() const { return active; }
191
192 void SetHasDropDown(bool b) { dropdown = b; }
193 bool HasDropDown() const { return dropdown; }
194
195 void SetSticky(bool b) { sticky = b; }
196 bool IsSticky() const { return sticky; }
197
198 void SetUserData(long l) { user_data = l; }
199 long GetUserData() const { return user_data; }
200
201 private:
202
203 wxWindow* window; // item's associated window
204 wxString label; // label displayed on the item
205 wxBitmap bitmap; // item's bitmap
206 wxBitmap disabled_bitmap; // item's disabled bitmap
207 wxBitmap hover_bitmap; // item's hover bitmap
208 wxString short_help; // short help (for tooltip)
209 wxString long_help; // long help (for status bar)
210 wxSizerItem* sizer_item; // sizer item
211 wxSize min_size; // item's minimum size
212 int spacer_pixels; // size of a spacer
213 int id; // item's id
214 int kind; // item's kind
215 int state; // state
216 int proportion; // proportion
217 bool active; // true if the item is currently active
218 bool dropdown; // true if the item has a dropdown button
219 bool sticky; // overrides button states if true (always active)
220 long user_data; // user-specified data
221 };
222
223 #ifndef SWIG
224 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiToolBarItem, wxAuiToolBarItemArray, WXDLLIMPEXP_AUI);
225 #endif
226
227
228
229
230 // tab art class
231
232 class WXDLLIMPEXP_AUI wxAuiToolBarArt
233 {
234 public:
235
236 wxAuiToolBarArt() { }
237 virtual ~wxAuiToolBarArt() { }
238
239 virtual wxAuiToolBarArt* Clone() = 0;
240 virtual void SetFlags(unsigned int flags) = 0;
241 virtual void SetFont(const wxFont& font) = 0;
242 virtual void SetTextOrientation(int orientation) = 0;
243
244 virtual void DrawBackground(
245 wxDC& dc,
246 wxWindow* wnd,
247 const wxRect& rect) = 0;
248
249 virtual void DrawLabel(
250 wxDC& dc,
251 wxWindow* wnd,
252 const wxAuiToolBarItem& item,
253 const wxRect& rect) = 0;
254
255 virtual void DrawButton(
256 wxDC& dc,
257 wxWindow* wnd,
258 const wxAuiToolBarItem& item,
259 const wxRect& rect) = 0;
260
261 virtual void DrawDropDownButton(
262 wxDC& dc,
263 wxWindow* wnd,
264 const wxAuiToolBarItem& item,
265 const wxRect& rect) = 0;
266
267 virtual void DrawControlLabel(
268 wxDC& dc,
269 wxWindow* wnd,
270 const wxAuiToolBarItem& item,
271 const wxRect& rect) = 0;
272
273 virtual void DrawSeparator(
274 wxDC& dc,
275 wxWindow* wnd,
276 const wxRect& rect) = 0;
277
278 virtual void DrawGripper(
279 wxDC& dc,
280 wxWindow* wnd,
281 const wxRect& rect) = 0;
282
283 virtual void DrawOverflowButton(
284 wxDC& dc,
285 wxWindow* wnd,
286 const wxRect& rect,
287 int state) = 0;
288
289 virtual wxSize GetLabelSize(
290 wxDC& dc,
291 wxWindow* wnd,
292 const wxAuiToolBarItem& item) = 0;
293
294 virtual wxSize GetToolSize(
295 wxDC& dc,
296 wxWindow* wnd,
297 const wxAuiToolBarItem& item) = 0;
298
299 virtual int GetElementSize(int element_id) = 0;
300 virtual void SetElementSize(int element_id, int size) = 0;
301
302 virtual int ShowDropDown(
303 wxWindow* wnd,
304 const wxAuiToolBarItemArray& items) = 0;
305 };
306
307
308
309 class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt : public wxAuiToolBarArt
310 {
311
312 public:
313
314 wxAuiDefaultToolBarArt();
315 virtual ~wxAuiDefaultToolBarArt();
316
317 virtual wxAuiToolBarArt* Clone();
318 virtual void SetFlags(unsigned int flags);
319 virtual void SetFont(const wxFont& font);
320 virtual void SetTextOrientation(int orientation);
321
322 virtual void DrawBackground(
323 wxDC& dc,
324 wxWindow* wnd,
325 const wxRect& rect);
326
327 virtual void DrawLabel(
328 wxDC& dc,
329 wxWindow* wnd,
330 const wxAuiToolBarItem& item,
331 const wxRect& rect);
332
333 virtual void DrawButton(
334 wxDC& dc,
335 wxWindow* wnd,
336 const wxAuiToolBarItem& item,
337 const wxRect& rect);
338
339 virtual void DrawDropDownButton(
340 wxDC& dc,
341 wxWindow* wnd,
342 const wxAuiToolBarItem& item,
343 const wxRect& rect);
344
345 virtual void DrawControlLabel(
346 wxDC& dc,
347 wxWindow* wnd,
348 const wxAuiToolBarItem& item,
349 const wxRect& rect);
350
351 virtual void DrawSeparator(
352 wxDC& dc,
353 wxWindow* wnd,
354 const wxRect& rect);
355
356 virtual void DrawGripper(
357 wxDC& dc,
358 wxWindow* wnd,
359 const wxRect& rect);
360
361 virtual void DrawOverflowButton(
362 wxDC& dc,
363 wxWindow* wnd,
364 const wxRect& rect,
365 int state);
366
367 virtual wxSize GetLabelSize(
368 wxDC& dc,
369 wxWindow* wnd,
370 const wxAuiToolBarItem& item);
371
372 virtual wxSize GetToolSize(
373 wxDC& dc,
374 wxWindow* wnd,
375 const wxAuiToolBarItem& item);
376
377 virtual int GetElementSize(int element);
378 virtual void SetElementSize(int element_id, int size);
379
380 virtual int ShowDropDown(wxWindow* wnd,
381 const wxAuiToolBarItemArray& items);
382
383 protected:
384
385 wxBitmap m_button_dropdown_bmp;
386 wxBitmap m_disabled_button_dropdown_bmp;
387 wxBitmap m_overflow_bmp;
388 wxBitmap m_disabled_overflow_bmp;
389 wxColour m_base_colour;
390 wxColour m_highlight_colour;
391 wxFont m_font;
392 unsigned int m_flags;
393 int m_text_orientation;
394
395 wxPen m_gripper_pen1;
396 wxPen m_gripper_pen2;
397 wxPen m_gripper_pen3;
398
399 int m_separator_size;
400 int m_gripper_size;
401 int m_overflow_size;
402 };
403
404
405
406
407 class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl
408 {
409 public:
410
411 wxAuiToolBar(wxWindow* parent,
412 wxWindowID id = -1,
413 const wxPoint& position = wxDefaultPosition,
414 const wxSize& size = wxDefaultSize,
415 long style = wxAUI_TB_DEFAULT_STYLE);
416 ~wxAuiToolBar();
417
418 void SetWindowStyleFlag(long style);
419
420 void SetArtProvider(wxAuiToolBarArt* art);
421 wxAuiToolBarArt* GetArtProvider() const;
422
423 bool SetFont(const wxFont& font);
424
425
426 void AddTool(int tool_id,
427 const wxString& label,
428 const wxBitmap& bitmap,
429 const wxString& short_help_string = wxEmptyString,
430 wxItemKind kind = wxITEM_NORMAL);
431
432 void AddTool(int tool_id,
433 const wxString& label,
434 const wxBitmap& bitmap,
435 const wxBitmap& disabled_bitmap,
436 wxItemKind kind,
437 const wxString& short_help_string,
438 const wxString& long_help_string,
439 wxObject* client_data);
440
441 void AddTool(int tool_id,
442 const wxBitmap& bitmap,
443 const wxBitmap& disabled_bitmap,
444 bool toggle = false,
445 wxObject* client_data = NULL,
446 const wxString& short_help_string = wxEmptyString,
447 const wxString& long_help_string = wxEmptyString)
448 {
449 AddTool(tool_id,
450 wxEmptyString,
451 bitmap,
452 disabled_bitmap,
453 toggle ? wxITEM_CHECK : wxITEM_NORMAL,
454 short_help_string,
455 long_help_string,
456 client_data);
457 }
458
459 void AddLabel(int tool_id,
460 const wxString& label = wxEmptyString,
461 const int width = -1);
462 void AddControl(wxControl* control,
463 const wxString& label = wxEmptyString);
464 void AddSeparator();
465 void AddSpacer(int pixels);
466 void AddStretchSpacer(int proportion = 1);
467
468 bool Realize();
469
470 wxControl* FindControl(int window_id);
471 wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
472 wxAuiToolBarItem* FindToolByIndex(int idx) const;
473 wxAuiToolBarItem* FindTool(int tool_id) const;
474
475 void ClearTools() { Clear() ; }
476 void Clear();
477 bool DeleteTool(int tool_id);
478 bool DeleteByIndex(int tool_id);
479
480 size_t GetToolCount() const;
481 int GetToolPos(int tool_id) const { return GetToolIndex(tool_id); }
482 int GetToolIndex(int tool_id) const;
483 bool GetToolFits(int tool_id) const;
484 wxRect GetToolRect(int tool_id) const;
485 bool GetToolFitsByIndex(int tool_id) const;
486 bool GetToolBarFits() const;
487
488 void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); }
489 void SetMargins(int x, int y) { SetMargins(x, x, y, y); }
490 void SetMargins(int left, int right, int top, int bottom);
491
492 void SetToolBitmapSize(const wxSize& size);
493 wxSize GetToolBitmapSize() const;
494
495 bool GetOverflowVisible() const;
496 void SetOverflowVisible(bool visible);
497
498 bool GetGripperVisible() const;
499 void SetGripperVisible(bool visible);
500
501 void ToggleTool(int tool_id, bool state);
502 bool GetToolToggled(int tool_id) const;
503
504 void EnableTool(int tool_id, bool state);
505 bool GetToolEnabled(int tool_id) const;
506
507 void SetToolDropDown(int tool_id, bool dropdown);
508 bool GetToolDropDown(int tool_id) const;
509
510 void SetToolBorderPadding(int padding);
511 int GetToolBorderPadding() const;
512
513 void SetToolTextOrientation(int orientation);
514 int GetToolTextOrientation() const;
515
516 void SetToolPacking(int packing);
517 int GetToolPacking() const;
518
519 void SetToolProportion(int tool_id, int proportion);
520 int GetToolProportion(int tool_id) const;
521
522 void SetToolSeparation(int separation);
523 int GetToolSeparation() const;
524
525 void SetToolSticky(int tool_id, bool sticky);
526 bool GetToolSticky(int tool_id) const;
527
528 wxString GetToolLabel(int tool_id) const;
529 void SetToolLabel(int tool_id, const wxString& label);
530
531 wxBitmap GetToolBitmap(int tool_id) const;
532 void SetToolBitmap(int tool_id, const wxBitmap& bitmap);
533
534 wxString GetToolShortHelp(int tool_id) const;
535 void SetToolShortHelp(int tool_id, const wxString& help_string);
536
537 wxString GetToolLongHelp(int tool_id) const;
538 void SetToolLongHelp(int tool_id, const wxString& help_string);
539
540 void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
541 const wxAuiToolBarItemArray& append);
542
543 protected:
544
545 virtual void OnCustomRender(wxDC& WXUNUSED(dc),
546 const wxAuiToolBarItem& WXUNUSED(item),
547 const wxRect& WXUNUSED(rect)) { }
548
549 protected:
550
551 void DoIdleUpdate();
552 void SetOrientation(int orientation);
553 void SetHoverItem(wxAuiToolBarItem* item);
554 void SetPressedItem(wxAuiToolBarItem* item);
555 void RefreshOverflowState();
556
557 int GetOverflowState() const;
558 wxRect GetOverflowRect() const;
559 wxSize GetLabelSize(const wxString& label);
560 wxAuiToolBarItem* FindToolByPositionWithPacking(wxCoord x, wxCoord y) const;
561
562 void DoSetSize(int x,
563 int y,
564 int width,
565 int height,
566 int sizeFlags = wxSIZE_AUTO);
567
568 protected: // handlers
569
570 void OnSize(wxSizeEvent& evt);
571 void OnIdle(wxIdleEvent& evt);
572 void OnPaint(wxPaintEvent& evt);
573 void OnEraseBackground(wxEraseEvent& evt);
574 void OnLeftDown(wxMouseEvent& evt);
575 void OnLeftUp(wxMouseEvent& evt);
576 void OnRightDown(wxMouseEvent& evt);
577 void OnRightUp(wxMouseEvent& evt);
578 void OnMiddleDown(wxMouseEvent& evt);
579 void OnMiddleUp(wxMouseEvent& evt);
580 void OnMotion(wxMouseEvent& evt);
581 void OnLeaveWindow(wxMouseEvent& evt);
582 void OnSetCursor(wxSetCursorEvent& evt);
583
584 protected:
585
586 wxAuiToolBarItemArray m_items; // array of toolbar items
587 wxAuiToolBarArt* m_art; // art provider
588 wxBoxSizer* m_sizer; // main sizer for toolbar
589 wxAuiToolBarItem* m_action_item; // item that's being acted upon (pressed)
590 wxAuiToolBarItem* m_tip_item; // item that has its tooltip shown
591 wxBitmap m_bitmap; // double-buffer bitmap
592 wxSizerItem* m_gripper_sizer_item;
593 wxSizerItem* m_overflow_sizer_item;
594 wxSize m_absolute_min_size;
595 wxPoint m_action_pos; // position of left-mouse down
596 wxAuiToolBarItemArray m_custom_overflow_prepend;
597 wxAuiToolBarItemArray m_custom_overflow_append;
598
599 int m_button_width;
600 int m_button_height;
601 int m_sizer_element_count;
602 int m_left_padding;
603 int m_right_padding;
604 int m_top_padding;
605 int m_bottom_padding;
606 int m_tool_packing;
607 int m_tool_border_padding;
608 int m_tool_text_orientation;
609 int m_overflow_state;
610 bool m_dragging;
611 bool m_gripper_visible;
612 bool m_overflow_visible;
613 long m_style;
614
615 DECLARE_EVENT_TABLE()
616 DECLARE_CLASS(wxAuiToolBar)
617 };
618
619
620
621
622 // wx event machinery
623
624 #ifndef SWIG
625
626 BEGIN_DECLARE_EVENT_TYPES()
627 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 0)
628 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 0)
629 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 0)
630 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 0)
631 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 0)
632 END_DECLARE_EVENT_TYPES()
633
634 typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&);
635
636 #define wxAuiToolBarEventHandler(func) \
637 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiToolBarEventFunction, &func)
638
639 #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \
640 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn))
641 #define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \
642 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn))
643 #define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \
644 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn))
645 #define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \
646 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn))
647 #define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \
648 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn))
649
650 #else
651
652 // wxpython/swig event work
653 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN;
654 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK;
655 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK;
656 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK;
657 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG;
658
659 %pythoncode {
660 EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 1 )
661 EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 1 )
662 EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 1 )
663 EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 1 )
664 EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 1 )
665 }
666 #endif // SWIG
667
668 #endif // wxUSE_AUI
669 #endif // _WX_AUIBAR_H_
670