1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aui/toolbar.h
3 // Purpose: wxaui: wx advanced user interface - docking window manager
4 // Author: Benjamin I. Williams
7 // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
8 // Licence: wxWindows Library Licence, Version 3.1
9 ///////////////////////////////////////////////////////////////////////////////
18 #include "wx/control.h"
22 class WXDLLIMPEXP_FWD_CORE wxClientDC
;
23 class WXDLLIMPEXP_FWD_AUI wxAuiPaneInfo
;
25 enum wxAuiToolBarStyle
27 wxAUI_TB_TEXT
= 1 << 0,
28 wxAUI_TB_NO_TOOLTIPS
= 1 << 1,
29 wxAUI_TB_NO_AUTORESIZE
= 1 << 2,
30 wxAUI_TB_GRIPPER
= 1 << 3,
31 wxAUI_TB_OVERFLOW
= 1 << 4,
32 // using this style forces the toolbar to be vertical and
33 // be only dockable to the left or right sides of the window
34 // whereas by default it can be horizontal or vertical and
36 wxAUI_TB_VERTICAL
= 1 << 5,
37 wxAUI_TB_HORZ_LAYOUT
= 1 << 6,
38 // analogous to wxAUI_TB_VERTICAL, but forces the toolbar
40 wxAUI_TB_HORIZONTAL
= 1 << 7,
41 wxAUI_TB_PLAIN_BACKGROUND
= 1 << 8,
42 wxAUI_TB_HORZ_TEXT
= (wxAUI_TB_HORZ_LAYOUT
| wxAUI_TB_TEXT
),
43 wxAUI_ORIENTATION_MASK
= (wxAUI_TB_VERTICAL
| wxAUI_TB_HORIZONTAL
),
44 wxAUI_TB_DEFAULT_STYLE
= 0
47 enum wxAuiToolBarArtSetting
49 wxAUI_TBART_SEPARATOR_SIZE
= 0,
50 wxAUI_TBART_GRIPPER_SIZE
= 1,
51 wxAUI_TBART_OVERFLOW_SIZE
= 2
54 enum wxAuiToolBarToolTextOrientation
56 wxAUI_TBTOOL_TEXT_LEFT
= 0, // unused/unimplemented
57 wxAUI_TBTOOL_TEXT_RIGHT
= 1,
58 wxAUI_TBTOOL_TEXT_TOP
= 2, // unused/unimplemented
59 wxAUI_TBTOOL_TEXT_BOTTOM
= 3
63 // aui toolbar event class
65 class WXDLLIMPEXP_AUI wxAuiToolBarEvent
: public wxNotifyEvent
68 wxAuiToolBarEvent(wxEventType commandType
= wxEVT_NULL
,
70 : wxNotifyEvent(commandType
, winId
)
72 m_isDropdownClicked
= false;
73 m_clickPt
= wxPoint(-1, -1);
74 m_rect
= wxRect(-1,-1, 0, 0);
78 wxAuiToolBarEvent(const wxAuiToolBarEvent
& c
) : wxNotifyEvent(c
)
80 m_isDropdownClicked
= c
.m_isDropdownClicked
;
81 m_clickPt
= c
.m_clickPt
;
83 m_toolId
= c
.m_toolId
;
86 wxEvent
*Clone() const { return new wxAuiToolBarEvent(*this); }
88 bool IsDropDownClicked() const { return m_isDropdownClicked
; }
89 void SetDropDownClicked(bool c
) { m_isDropdownClicked
= c
; }
91 wxPoint
GetClickPoint() const { return m_clickPt
; }
92 void SetClickPoint(const wxPoint
& p
) { m_clickPt
= p
; }
94 wxRect
GetItemRect() const { return m_rect
; }
95 void SetItemRect(const wxRect
& r
) { m_rect
= r
; }
97 int GetToolId() const { return m_toolId
; }
98 void SetToolId(int toolId
) { m_toolId
= toolId
; }
102 bool m_isDropdownClicked
;
108 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent
)
112 class WXDLLIMPEXP_AUI wxAuiToolBarItem
114 friend class wxAuiToolBar
;
124 m_kind
= wxITEM_NORMAL
;
125 m_state
= 0; // normal, enabled
131 m_alignment
= wxALIGN_CENTER
;
134 wxAuiToolBarItem(const wxAuiToolBarItem
& c
)
139 wxAuiToolBarItem
& operator=(const wxAuiToolBarItem
& c
)
145 void Assign(const wxAuiToolBarItem
& c
)
147 m_window
= c
.m_window
;
149 m_bitmap
= c
.m_bitmap
;
150 m_disabledBitmap
= c
.m_disabledBitmap
;
151 m_hoverBitmap
= c
.m_hoverBitmap
;
152 m_shortHelp
= c
.m_shortHelp
;
153 m_longHelp
= c
.m_longHelp
;
154 m_sizerItem
= c
.m_sizerItem
;
155 m_minSize
= c
.m_minSize
;
156 m_spacerPixels
= c
.m_spacerPixels
;
157 m_toolId
= c
.m_toolId
;
160 m_proportion
= c
.m_proportion
;
161 m_active
= c
.m_active
;
162 m_dropDown
= c
.m_dropDown
;
163 m_sticky
= c
.m_sticky
;
164 m_userData
= c
.m_userData
;
165 m_alignment
= c
.m_alignment
;
169 void SetWindow(wxWindow
* w
) { m_window
= w
; }
170 wxWindow
* GetWindow() { return m_window
; }
172 void SetId(int newId
) { m_toolId
= newId
; }
173 int GetId() const { return m_toolId
; }
175 void SetKind(int newKind
) { m_kind
= newKind
; }
176 int GetKind() const { return m_kind
; }
178 void SetState(int newState
) { m_state
= newState
; }
179 int GetState() const { return m_state
; }
181 void SetSizerItem(wxSizerItem
* s
) { m_sizerItem
= s
; }
182 wxSizerItem
* GetSizerItem() const { return m_sizerItem
; }
184 void SetLabel(const wxString
& s
) { m_label
= s
; }
185 const wxString
& GetLabel() const { return m_label
; }
187 void SetBitmap(const wxBitmap
& bmp
) { m_bitmap
= bmp
; }
188 const wxBitmap
& GetBitmap() const { return m_bitmap
; }
190 void SetDisabledBitmap(const wxBitmap
& bmp
) { m_disabledBitmap
= bmp
; }
191 const wxBitmap
& GetDisabledBitmap() const { return m_disabledBitmap
; }
193 void SetHoverBitmap(const wxBitmap
& bmp
) { m_hoverBitmap
= bmp
; }
194 const wxBitmap
& GetHoverBitmap() const { return m_hoverBitmap
; }
196 void SetShortHelp(const wxString
& s
) { m_shortHelp
= s
; }
197 const wxString
& GetShortHelp() const { return m_shortHelp
; }
199 void SetLongHelp(const wxString
& s
) { m_longHelp
= s
; }
200 const wxString
& GetLongHelp() const { return m_longHelp
; }
202 void SetMinSize(const wxSize
& s
) { m_minSize
= s
; }
203 const wxSize
& GetMinSize() const { return m_minSize
; }
205 void SetSpacerPixels(int s
) { m_spacerPixels
= s
; }
206 int GetSpacerPixels() const { return m_spacerPixels
; }
208 void SetProportion(int p
) { m_proportion
= p
; }
209 int GetProportion() const { return m_proportion
; }
211 void SetActive(bool b
) { m_active
= b
; }
212 bool IsActive() const { return m_active
; }
214 void SetHasDropDown(bool b
)
216 wxCHECK_RET( !b
|| m_kind
== wxITEM_NORMAL
,
217 wxS("Only normal tools can have drop downs") );
222 bool HasDropDown() const { return m_dropDown
; }
224 void SetSticky(bool b
) { m_sticky
= b
; }
225 bool IsSticky() const { return m_sticky
; }
227 void SetUserData(long l
) { m_userData
= l
; }
228 long GetUserData() const { return m_userData
; }
230 void SetAlignment(int l
) { m_alignment
= l
; }
231 int GetAlignment() const { return m_alignment
; }
235 wxWindow
* m_window
; // item's associated window
236 wxString m_label
; // label displayed on the item
237 wxBitmap m_bitmap
; // item's bitmap
238 wxBitmap m_disabledBitmap
; // item's disabled bitmap
239 wxBitmap m_hoverBitmap
; // item's hover bitmap
240 wxString m_shortHelp
; // short help (for tooltip)
241 wxString m_longHelp
; // long help (for status bar)
242 wxSizerItem
* m_sizerItem
; // sizer item
243 wxSize m_minSize
; // item's minimum size
244 int m_spacerPixels
; // size of a spacer
245 int m_toolId
; // item's id
246 int m_kind
; // item's kind
247 int m_state
; // state
248 int m_proportion
; // proportion
249 bool m_active
; // true if the item is currently active
250 bool m_dropDown
; // true if the item has a dropdown button
251 bool m_sticky
; // overrides button states if true (always active)
252 long m_userData
; // user-specified data
253 int m_alignment
; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
257 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiToolBarItem
, wxAuiToolBarItemArray
, WXDLLIMPEXP_AUI
);
265 class WXDLLIMPEXP_AUI wxAuiToolBarArt
269 wxAuiToolBarArt() { }
270 virtual ~wxAuiToolBarArt() { }
272 virtual wxAuiToolBarArt
* Clone() = 0;
273 virtual void SetFlags(unsigned int flags
) = 0;
274 virtual unsigned int GetFlags() = 0;
275 virtual void SetFont(const wxFont
& font
) = 0;
276 virtual wxFont
GetFont() = 0;
277 virtual void SetTextOrientation(int orientation
) = 0;
278 virtual int GetTextOrientation() = 0;
280 virtual void DrawBackground(
283 const wxRect
& rect
) = 0;
285 virtual void DrawPlainBackground(
288 const wxRect
& rect
) = 0;
290 virtual void DrawLabel(
293 const wxAuiToolBarItem
& item
,
294 const wxRect
& rect
) = 0;
296 virtual void DrawButton(
299 const wxAuiToolBarItem
& item
,
300 const wxRect
& rect
) = 0;
302 virtual void DrawDropDownButton(
305 const wxAuiToolBarItem
& item
,
306 const wxRect
& rect
) = 0;
308 virtual void DrawControlLabel(
311 const wxAuiToolBarItem
& item
,
312 const wxRect
& rect
) = 0;
314 virtual void DrawSeparator(
317 const wxRect
& rect
) = 0;
319 virtual void DrawGripper(
322 const wxRect
& rect
) = 0;
324 virtual void DrawOverflowButton(
330 virtual wxSize
GetLabelSize(
333 const wxAuiToolBarItem
& item
) = 0;
335 virtual wxSize
GetToolSize(
338 const wxAuiToolBarItem
& item
) = 0;
340 virtual int GetElementSize(int elementId
) = 0;
341 virtual void SetElementSize(int elementId
, int size
) = 0;
343 virtual int ShowDropDown(
345 const wxAuiToolBarItemArray
& items
) = 0;
350 class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt
: public wxAuiToolBarArt
355 wxAuiDefaultToolBarArt();
356 virtual ~wxAuiDefaultToolBarArt();
358 virtual wxAuiToolBarArt
* Clone();
359 virtual void SetFlags(unsigned int flags
);
360 virtual unsigned int GetFlags();
361 virtual void SetFont(const wxFont
& font
);
362 virtual wxFont
GetFont();
363 virtual void SetTextOrientation(int orientation
);
364 virtual int GetTextOrientation();
366 virtual void DrawBackground(
371 virtual void DrawPlainBackground(wxDC
& dc
,
375 virtual void DrawLabel(
378 const wxAuiToolBarItem
& item
,
381 virtual void DrawButton(
384 const wxAuiToolBarItem
& item
,
387 virtual void DrawDropDownButton(
390 const wxAuiToolBarItem
& item
,
393 virtual void DrawControlLabel(
396 const wxAuiToolBarItem
& item
,
399 virtual void DrawSeparator(
404 virtual void DrawGripper(
409 virtual void DrawOverflowButton(
415 virtual wxSize
GetLabelSize(
418 const wxAuiToolBarItem
& item
);
420 virtual wxSize
GetToolSize(
423 const wxAuiToolBarItem
& item
);
425 virtual int GetElementSize(int element
);
426 virtual void SetElementSize(int elementId
, int size
);
428 virtual int ShowDropDown(wxWindow
* wnd
,
429 const wxAuiToolBarItemArray
& items
);
433 wxBitmap m_buttonDropDownBmp
;
434 wxBitmap m_disabledButtonDropDownBmp
;
435 wxBitmap m_overflowBmp
;
436 wxBitmap m_disabledOverflowBmp
;
437 wxColour m_baseColour
;
438 wxColour m_highlightColour
;
440 unsigned int m_flags
;
441 int m_textOrientation
;
455 class WXDLLIMPEXP_AUI wxAuiToolBar
: public wxControl
458 wxAuiToolBar() { Init(); }
460 wxAuiToolBar(wxWindow
* parent
,
461 wxWindowID id
= wxID_ANY
,
462 const wxPoint
& pos
= wxDefaultPosition
,
463 const wxSize
& size
= wxDefaultSize
,
464 long style
= wxAUI_TB_DEFAULT_STYLE
)
467 Create(parent
, id
, pos
, size
, style
);
470 virtual ~wxAuiToolBar();
472 bool Create(wxWindow
* parent
,
473 wxWindowID id
= wxID_ANY
,
474 const wxPoint
& pos
= wxDefaultPosition
,
475 const wxSize
& size
= wxDefaultSize
,
476 long style
= wxAUI_TB_DEFAULT_STYLE
);
478 virtual void SetWindowStyleFlag(long style
);
480 void SetArtProvider(wxAuiToolBarArt
* art
);
481 wxAuiToolBarArt
* GetArtProvider() const;
483 bool SetFont(const wxFont
& font
);
486 wxAuiToolBarItem
* AddTool(int toolId
,
487 const wxString
& label
,
488 const wxBitmap
& bitmap
,
489 const wxString
& shortHelpString
= wxEmptyString
,
490 wxItemKind kind
= wxITEM_NORMAL
);
492 wxAuiToolBarItem
* AddTool(int toolId
,
493 const wxString
& label
,
494 const wxBitmap
& bitmap
,
495 const wxBitmap
& disabledBitmap
,
497 const wxString
& shortHelpString
,
498 const wxString
& longHelpString
,
499 wxObject
* clientData
);
501 wxAuiToolBarItem
* AddTool(int toolId
,
502 const wxBitmap
& bitmap
,
503 const wxBitmap
& disabledBitmap
,
505 wxObject
* clientData
= NULL
,
506 const wxString
& shortHelpString
= wxEmptyString
,
507 const wxString
& longHelpString
= wxEmptyString
)
509 return AddTool(toolId
,
513 toggle
? wxITEM_CHECK
: wxITEM_NORMAL
,
519 wxAuiToolBarItem
* AddLabel(int toolId
,
520 const wxString
& label
= wxEmptyString
,
521 const int width
= -1);
522 wxAuiToolBarItem
* AddControl(wxControl
* control
,
523 const wxString
& label
= wxEmptyString
);
524 wxAuiToolBarItem
* AddSeparator();
525 wxAuiToolBarItem
* AddSpacer(int pixels
);
526 wxAuiToolBarItem
* AddStretchSpacer(int proportion
= 1);
530 wxControl
* FindControl(int windowId
);
531 wxAuiToolBarItem
* FindToolByPosition(wxCoord x
, wxCoord y
) const;
532 wxAuiToolBarItem
* FindToolByIndex(int idx
) const;
533 wxAuiToolBarItem
* FindTool(int toolId
) const;
535 void ClearTools() { Clear() ; }
537 bool DeleteTool(int toolId
);
538 bool DeleteByIndex(int toolId
);
540 size_t GetToolCount() const;
541 int GetToolPos(int toolId
) const { return GetToolIndex(toolId
); }
542 int GetToolIndex(int toolId
) const;
543 bool GetToolFits(int toolId
) const;
544 wxRect
GetToolRect(int toolId
) const;
545 bool GetToolFitsByIndex(int toolId
) const;
546 bool GetToolBarFits() const;
548 void SetMargins(const wxSize
& size
) { SetMargins(size
.x
, size
.x
, size
.y
, size
.y
); }
549 void SetMargins(int x
, int y
) { SetMargins(x
, x
, y
, y
); }
550 void SetMargins(int left
, int right
, int top
, int bottom
);
552 void SetToolBitmapSize(const wxSize
& size
);
553 wxSize
GetToolBitmapSize() const;
555 bool GetOverflowVisible() const;
556 void SetOverflowVisible(bool visible
);
558 bool GetGripperVisible() const;
559 void SetGripperVisible(bool visible
);
561 void ToggleTool(int toolId
, bool state
);
562 bool GetToolToggled(int toolId
) const;
564 void EnableTool(int toolId
, bool state
);
565 bool GetToolEnabled(int toolId
) const;
567 void SetToolDropDown(int toolId
, bool dropdown
);
568 bool GetToolDropDown(int toolId
) const;
570 void SetToolBorderPadding(int padding
);
571 int GetToolBorderPadding() const;
573 void SetToolTextOrientation(int orientation
);
574 int GetToolTextOrientation() const;
576 void SetToolPacking(int packing
);
577 int GetToolPacking() const;
579 void SetToolProportion(int toolId
, int proportion
);
580 int GetToolProportion(int toolId
) const;
582 void SetToolSeparation(int separation
);
583 int GetToolSeparation() const;
585 void SetToolSticky(int toolId
, bool sticky
);
586 bool GetToolSticky(int toolId
) const;
588 wxString
GetToolLabel(int toolId
) const;
589 void SetToolLabel(int toolId
, const wxString
& label
);
591 wxBitmap
GetToolBitmap(int toolId
) const;
592 void SetToolBitmap(int toolId
, const wxBitmap
& bitmap
);
594 wxString
GetToolShortHelp(int toolId
) const;
595 void SetToolShortHelp(int toolId
, const wxString
& helpString
);
597 wxString
GetToolLongHelp(int toolId
) const;
598 void SetToolLongHelp(int toolId
, const wxString
& helpString
);
600 void SetCustomOverflowItems(const wxAuiToolBarItemArray
& prepend
,
601 const wxAuiToolBarItemArray
& append
);
603 // get size of hint rectangle for a particular dock location
604 wxSize
GetHintSize(int dockDirection
) const;
605 bool IsPaneValid(const wxAuiPaneInfo
& pane
) const;
607 // Override to call DoIdleUpdate().
608 virtual void UpdateWindowUI(long flags
= wxUPDATE_UI_NONE
);
613 virtual void OnCustomRender(wxDC
& WXUNUSED(dc
),
614 const wxAuiToolBarItem
& WXUNUSED(item
),
615 const wxRect
& WXUNUSED(rect
)) { }
620 void SetOrientation(int orientation
);
621 void SetHoverItem(wxAuiToolBarItem
* item
);
622 void SetPressedItem(wxAuiToolBarItem
* item
);
623 void RefreshOverflowState();
625 int GetOverflowState() const;
626 wxRect
GetOverflowRect() const;
627 wxSize
GetLabelSize(const wxString
& label
);
628 wxAuiToolBarItem
* FindToolByPositionWithPacking(wxCoord x
, wxCoord y
) const;
630 void DoSetSize(int x
,
634 int sizeFlags
= wxSIZE_AUTO
);
636 protected: // handlers
638 void OnSize(wxSizeEvent
& evt
);
639 void OnIdle(wxIdleEvent
& evt
);
640 void OnPaint(wxPaintEvent
& evt
);
641 void OnEraseBackground(wxEraseEvent
& evt
);
642 void OnLeftDown(wxMouseEvent
& evt
);
643 void OnLeftUp(wxMouseEvent
& evt
);
644 void OnRightDown(wxMouseEvent
& evt
);
645 void OnRightUp(wxMouseEvent
& evt
);
646 void OnMiddleDown(wxMouseEvent
& evt
);
647 void OnMiddleUp(wxMouseEvent
& evt
);
648 void OnMotion(wxMouseEvent
& evt
);
649 void OnLeaveWindow(wxMouseEvent
& evt
);
650 void OnCaptureLost(wxMouseCaptureLostEvent
& evt
);
651 void OnSetCursor(wxSetCursorEvent
& evt
);
655 wxAuiToolBarItemArray m_items
; // array of toolbar items
656 wxAuiToolBarArt
* m_art
; // art provider
657 wxBoxSizer
* m_sizer
; // main sizer for toolbar
658 wxAuiToolBarItem
* m_actionItem
; // item that's being acted upon (pressed)
659 wxAuiToolBarItem
* m_tipItem
; // item that has its tooltip shown
660 wxBitmap m_bitmap
; // double-buffer bitmap
661 wxSizerItem
* m_gripperSizerItem
;
662 wxSizerItem
* m_overflowSizerItem
;
663 wxSize m_absoluteMinSize
;
664 wxPoint m_actionPos
; // position of left-mouse down
665 wxAuiToolBarItemArray m_customOverflowPrepend
;
666 wxAuiToolBarItemArray m_customOverflowAppend
;
670 int m_sizerElementCount
;
676 int m_toolBorderPadding
;
677 int m_toolTextOrientation
;
680 bool m_gripperVisible
;
681 bool m_overflowVisible
;
683 bool RealizeHelper(wxClientDC
& dc
, bool horizontal
);
684 static bool IsPaneValid(long style
, const wxAuiPaneInfo
& pane
);
685 bool IsPaneValid(long style
) const;
686 void SetArtFlags() const;
687 wxOrientation m_orientation
;
688 wxSize m_horzHintSize
;
689 wxSize m_vertHintSize
;
692 // Common part of OnLeaveWindow() and OnCaptureLost().
693 void DoResetMouseState();
695 DECLARE_EVENT_TABLE()
696 DECLARE_CLASS(wxAuiToolBar
)
702 // wx event machinery
706 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_TOOL_DROPDOWN
, wxAuiToolBarEvent
);
707 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_OVERFLOW_CLICK
, wxAuiToolBarEvent
);
708 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_RIGHT_CLICK
, wxAuiToolBarEvent
);
709 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_MIDDLE_CLICK
, wxAuiToolBarEvent
);
710 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_BEGIN_DRAG
, wxAuiToolBarEvent
);
712 typedef void (wxEvtHandler::*wxAuiToolBarEventFunction
)(wxAuiToolBarEvent
&);
714 #define wxAuiToolBarEventHandler(func) \
715 wxEVENT_HANDLER_CAST(wxAuiToolBarEventFunction, func)
717 #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \
718 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn))
719 #define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \
720 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn))
721 #define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \
722 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn))
723 #define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \
724 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn))
725 #define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \
726 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn))
730 // wxpython/swig event work
731 %constant wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN
;
732 %constant wxEventType wxEVT_AUITOOLBAR_OVERFLOW_CLICK
;
733 %constant wxEventType wxEVT_AUITOOLBAR_RIGHT_CLICK
;
734 %constant wxEventType wxEVT_AUITOOLBAR_MIDDLE_CLICK
;
735 %constant wxEventType wxEVT_AUITOOLBAR_BEGIN_DRAG
;
738 EVT_AUITOOLBAR_TOOL_DROPDOWN
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_TOOL_DROPDOWN
, 1 )
739 EVT_AUITOOLBAR_OVERFLOW_CLICK
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_OVERFLOW_CLICK
, 1 )
740 EVT_AUITOOLBAR_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_RIGHT_CLICK
, 1 )
741 EVT_AUITOOLBAR_MIDDLE_CLICK
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_MIDDLE_CLICK
, 1 )
742 EVT_AUITOOLBAR_BEGIN_DRAG
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_BEGIN_DRAG
, 1 )
746 // old wxEVT_COMMAND_* constants
747 #define wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN wxEVT_AUITOOLBAR_TOOL_DROPDOWN
748 #define wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK wxEVT_AUITOOLBAR_OVERFLOW_CLICK
749 #define wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK wxEVT_AUITOOLBAR_RIGHT_CLICK
750 #define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK
751 #define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG
754 #endif // _WX_AUIBAR_H_