1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aui/toolbar.h
3 // Purpose: wxaui: wx advanced user interface - docking window manager
4 // Author: Benjamin I. Williams
8 // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
9 // Licence: wxWindows Library Licence, Version 3.1
10 ///////////////////////////////////////////////////////////////////////////////
19 #include "wx/control.h"
23 class WXDLLIMPEXP_FWD_CORE wxClientDC
;
24 class WXDLLIMPEXP_FWD_AUI wxAuiPaneInfo
;
26 enum wxAuiToolBarStyle
28 wxAUI_TB_TEXT
= 1 << 0,
29 wxAUI_TB_NO_TOOLTIPS
= 1 << 1,
30 wxAUI_TB_NO_AUTORESIZE
= 1 << 2,
31 wxAUI_TB_GRIPPER
= 1 << 3,
32 wxAUI_TB_OVERFLOW
= 1 << 4,
33 // using this style forces the toolbar to be vertical and
34 // be only dockable to the left or right sides of the window
35 // whereas by default it can be horizontal or vertical and
37 wxAUI_TB_VERTICAL
= 1 << 5,
38 wxAUI_TB_HORZ_LAYOUT
= 1 << 6,
39 // analogous to wxAUI_TB_VERTICAL, but forces the toolbar
41 wxAUI_TB_HORIZONTAL
= 1 << 7,
42 wxAUI_TB_PLAIN_BACKGROUND
= 1 << 8,
43 wxAUI_TB_HORZ_TEXT
= (wxAUI_TB_HORZ_LAYOUT
| wxAUI_TB_TEXT
),
44 wxAUI_ORIENTATION_MASK
= (wxAUI_TB_VERTICAL
| wxAUI_TB_HORIZONTAL
),
45 wxAUI_TB_DEFAULT_STYLE
= 0
48 enum wxAuiToolBarArtSetting
50 wxAUI_TBART_SEPARATOR_SIZE
= 0,
51 wxAUI_TBART_GRIPPER_SIZE
= 1,
52 wxAUI_TBART_OVERFLOW_SIZE
= 2
55 enum wxAuiToolBarToolTextOrientation
57 wxAUI_TBTOOL_TEXT_LEFT
= 0, // unused/unimplemented
58 wxAUI_TBTOOL_TEXT_RIGHT
= 1,
59 wxAUI_TBTOOL_TEXT_TOP
= 2, // unused/unimplemented
60 wxAUI_TBTOOL_TEXT_BOTTOM
= 3
64 // aui toolbar event class
66 class WXDLLIMPEXP_AUI wxAuiToolBarEvent
: public wxNotifyEvent
69 wxAuiToolBarEvent(wxEventType commandType
= wxEVT_NULL
,
71 : wxNotifyEvent(commandType
, winId
)
73 m_isDropdownClicked
= false;
74 m_clickPt
= wxPoint(-1, -1);
75 m_rect
= wxRect(-1,-1, 0, 0);
79 wxAuiToolBarEvent(const wxAuiToolBarEvent
& c
) : wxNotifyEvent(c
)
81 m_isDropdownClicked
= c
.m_isDropdownClicked
;
82 m_clickPt
= c
.m_clickPt
;
84 m_toolId
= c
.m_toolId
;
87 wxEvent
*Clone() const { return new wxAuiToolBarEvent(*this); }
89 bool IsDropDownClicked() const { return m_isDropdownClicked
; }
90 void SetDropDownClicked(bool c
) { m_isDropdownClicked
= c
; }
92 wxPoint
GetClickPoint() const { return m_clickPt
; }
93 void SetClickPoint(const wxPoint
& p
) { m_clickPt
= p
; }
95 wxRect
GetItemRect() const { return m_rect
; }
96 void SetItemRect(const wxRect
& r
) { m_rect
= r
; }
98 int GetToolId() const { return m_toolId
; }
99 void SetToolId(int toolId
) { m_toolId
= toolId
; }
103 bool m_isDropdownClicked
;
109 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent
)
113 class WXDLLIMPEXP_AUI wxAuiToolBarItem
115 friend class wxAuiToolBar
;
125 m_kind
= wxITEM_NORMAL
;
126 m_state
= 0; // normal, enabled
132 m_alignment
= wxALIGN_CENTER
;
135 wxAuiToolBarItem(const wxAuiToolBarItem
& c
)
140 wxAuiToolBarItem
& operator=(const wxAuiToolBarItem
& c
)
146 void Assign(const wxAuiToolBarItem
& c
)
148 m_window
= c
.m_window
;
150 m_bitmap
= c
.m_bitmap
;
151 m_disabledBitmap
= c
.m_disabledBitmap
;
152 m_hoverBitmap
= c
.m_hoverBitmap
;
153 m_shortHelp
= c
.m_shortHelp
;
154 m_longHelp
= c
.m_longHelp
;
155 m_sizerItem
= c
.m_sizerItem
;
156 m_minSize
= c
.m_minSize
;
157 m_spacerPixels
= c
.m_spacerPixels
;
158 m_toolId
= c
.m_toolId
;
161 m_proportion
= c
.m_proportion
;
162 m_active
= c
.m_active
;
163 m_dropDown
= c
.m_dropDown
;
164 m_sticky
= c
.m_sticky
;
165 m_userData
= c
.m_userData
;
166 m_alignment
= c
.m_alignment
;
170 void SetWindow(wxWindow
* w
) { m_window
= w
; }
171 wxWindow
* GetWindow() { return m_window
; }
173 void SetId(int newId
) { m_toolId
= newId
; }
174 int GetId() const { return m_toolId
; }
176 void SetKind(int newKind
) { m_kind
= newKind
; }
177 int GetKind() const { return m_kind
; }
179 void SetState(int newState
) { m_state
= newState
; }
180 int GetState() const { return m_state
; }
182 void SetSizerItem(wxSizerItem
* s
) { m_sizerItem
= s
; }
183 wxSizerItem
* GetSizerItem() const { return m_sizerItem
; }
185 void SetLabel(const wxString
& s
) { m_label
= s
; }
186 const wxString
& GetLabel() const { return m_label
; }
188 void SetBitmap(const wxBitmap
& bmp
) { m_bitmap
= bmp
; }
189 const wxBitmap
& GetBitmap() const { return m_bitmap
; }
191 void SetDisabledBitmap(const wxBitmap
& bmp
) { m_disabledBitmap
= bmp
; }
192 const wxBitmap
& GetDisabledBitmap() const { return m_disabledBitmap
; }
194 void SetHoverBitmap(const wxBitmap
& bmp
) { m_hoverBitmap
= bmp
; }
195 const wxBitmap
& GetHoverBitmap() const { return m_hoverBitmap
; }
197 void SetShortHelp(const wxString
& s
) { m_shortHelp
= s
; }
198 const wxString
& GetShortHelp() const { return m_shortHelp
; }
200 void SetLongHelp(const wxString
& s
) { m_longHelp
= s
; }
201 const wxString
& GetLongHelp() const { return m_longHelp
; }
203 void SetMinSize(const wxSize
& s
) { m_minSize
= s
; }
204 const wxSize
& GetMinSize() const { return m_minSize
; }
206 void SetSpacerPixels(int s
) { m_spacerPixels
= s
; }
207 int GetSpacerPixels() const { return m_spacerPixels
; }
209 void SetProportion(int p
) { m_proportion
= p
; }
210 int GetProportion() const { return m_proportion
; }
212 void SetActive(bool b
) { m_active
= b
; }
213 bool IsActive() const { return m_active
; }
215 void SetHasDropDown(bool b
)
217 wxCHECK_RET( !b
|| m_kind
== wxITEM_NORMAL
,
218 wxS("Only normal tools can have drop downs") );
223 bool HasDropDown() const { return m_dropDown
; }
225 void SetSticky(bool b
) { m_sticky
= b
; }
226 bool IsSticky() const { return m_sticky
; }
228 void SetUserData(long l
) { m_userData
= l
; }
229 long GetUserData() const { return m_userData
; }
231 void SetAlignment(int l
) { m_alignment
= l
; }
232 int GetAlignment() const { return m_alignment
; }
236 wxWindow
* m_window
; // item's associated window
237 wxString m_label
; // label displayed on the item
238 wxBitmap m_bitmap
; // item's bitmap
239 wxBitmap m_disabledBitmap
; // item's disabled bitmap
240 wxBitmap m_hoverBitmap
; // item's hover bitmap
241 wxString m_shortHelp
; // short help (for tooltip)
242 wxString m_longHelp
; // long help (for status bar)
243 wxSizerItem
* m_sizerItem
; // sizer item
244 wxSize m_minSize
; // item's minimum size
245 int m_spacerPixels
; // size of a spacer
246 int m_toolId
; // item's id
247 int m_kind
; // item's kind
248 int m_state
; // state
249 int m_proportion
; // proportion
250 bool m_active
; // true if the item is currently active
251 bool m_dropDown
; // true if the item has a dropdown button
252 bool m_sticky
; // overrides button states if true (always active)
253 long m_userData
; // user-specified data
254 int m_alignment
; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
258 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiToolBarItem
, wxAuiToolBarItemArray
, WXDLLIMPEXP_AUI
);
266 class WXDLLIMPEXP_AUI wxAuiToolBarArt
270 wxAuiToolBarArt() { }
271 virtual ~wxAuiToolBarArt() { }
273 virtual wxAuiToolBarArt
* Clone() = 0;
274 virtual void SetFlags(unsigned int flags
) = 0;
275 virtual unsigned int GetFlags() = 0;
276 virtual void SetFont(const wxFont
& font
) = 0;
277 virtual wxFont
GetFont() = 0;
278 virtual void SetTextOrientation(int orientation
) = 0;
279 virtual int GetTextOrientation() = 0;
281 virtual void DrawBackground(
284 const wxRect
& rect
) = 0;
286 virtual void DrawPlainBackground(
289 const wxRect
& rect
) = 0;
291 virtual void DrawLabel(
294 const wxAuiToolBarItem
& item
,
295 const wxRect
& rect
) = 0;
297 virtual void DrawButton(
300 const wxAuiToolBarItem
& item
,
301 const wxRect
& rect
) = 0;
303 virtual void DrawDropDownButton(
306 const wxAuiToolBarItem
& item
,
307 const wxRect
& rect
) = 0;
309 virtual void DrawControlLabel(
312 const wxAuiToolBarItem
& item
,
313 const wxRect
& rect
) = 0;
315 virtual void DrawSeparator(
318 const wxRect
& rect
) = 0;
320 virtual void DrawGripper(
323 const wxRect
& rect
) = 0;
325 virtual void DrawOverflowButton(
331 virtual wxSize
GetLabelSize(
334 const wxAuiToolBarItem
& item
) = 0;
336 virtual wxSize
GetToolSize(
339 const wxAuiToolBarItem
& item
) = 0;
341 virtual int GetElementSize(int elementId
) = 0;
342 virtual void SetElementSize(int elementId
, int size
) = 0;
344 virtual int ShowDropDown(
346 const wxAuiToolBarItemArray
& items
) = 0;
351 class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt
: public wxAuiToolBarArt
356 wxAuiDefaultToolBarArt();
357 virtual ~wxAuiDefaultToolBarArt();
359 virtual wxAuiToolBarArt
* Clone();
360 virtual void SetFlags(unsigned int flags
);
361 virtual unsigned int GetFlags();
362 virtual void SetFont(const wxFont
& font
);
363 virtual wxFont
GetFont();
364 virtual void SetTextOrientation(int orientation
);
365 virtual int GetTextOrientation();
367 virtual void DrawBackground(
372 virtual void DrawPlainBackground(wxDC
& dc
,
376 virtual void DrawLabel(
379 const wxAuiToolBarItem
& item
,
382 virtual void DrawButton(
385 const wxAuiToolBarItem
& item
,
388 virtual void DrawDropDownButton(
391 const wxAuiToolBarItem
& item
,
394 virtual void DrawControlLabel(
397 const wxAuiToolBarItem
& item
,
400 virtual void DrawSeparator(
405 virtual void DrawGripper(
410 virtual void DrawOverflowButton(
416 virtual wxSize
GetLabelSize(
419 const wxAuiToolBarItem
& item
);
421 virtual wxSize
GetToolSize(
424 const wxAuiToolBarItem
& item
);
426 virtual int GetElementSize(int element
);
427 virtual void SetElementSize(int elementId
, int size
);
429 virtual int ShowDropDown(wxWindow
* wnd
,
430 const wxAuiToolBarItemArray
& items
);
434 wxBitmap m_buttonDropDownBmp
;
435 wxBitmap m_disabledButtonDropDownBmp
;
436 wxBitmap m_overflowBmp
;
437 wxBitmap m_disabledOverflowBmp
;
438 wxColour m_baseColour
;
439 wxColour m_highlightColour
;
441 unsigned int m_flags
;
442 int m_textOrientation
;
456 class WXDLLIMPEXP_AUI wxAuiToolBar
: public wxControl
459 wxAuiToolBar() { Init(); }
461 wxAuiToolBar(wxWindow
* parent
,
462 wxWindowID id
= wxID_ANY
,
463 const wxPoint
& pos
= wxDefaultPosition
,
464 const wxSize
& size
= wxDefaultSize
,
465 long style
= wxAUI_TB_DEFAULT_STYLE
)
468 Create(parent
, id
, pos
, size
, style
);
471 virtual ~wxAuiToolBar();
473 bool Create(wxWindow
* parent
,
474 wxWindowID id
= wxID_ANY
,
475 const wxPoint
& pos
= wxDefaultPosition
,
476 const wxSize
& size
= wxDefaultSize
,
477 long style
= wxAUI_TB_DEFAULT_STYLE
);
479 virtual void SetWindowStyleFlag(long style
);
481 void SetArtProvider(wxAuiToolBarArt
* art
);
482 wxAuiToolBarArt
* GetArtProvider() const;
484 bool SetFont(const wxFont
& font
);
487 wxAuiToolBarItem
* AddTool(int toolId
,
488 const wxString
& label
,
489 const wxBitmap
& bitmap
,
490 const wxString
& shortHelpString
= wxEmptyString
,
491 wxItemKind kind
= wxITEM_NORMAL
);
493 wxAuiToolBarItem
* AddTool(int toolId
,
494 const wxString
& label
,
495 const wxBitmap
& bitmap
,
496 const wxBitmap
& disabledBitmap
,
498 const wxString
& shortHelpString
,
499 const wxString
& longHelpString
,
500 wxObject
* clientData
);
502 wxAuiToolBarItem
* AddTool(int toolId
,
503 const wxBitmap
& bitmap
,
504 const wxBitmap
& disabledBitmap
,
506 wxObject
* clientData
= NULL
,
507 const wxString
& shortHelpString
= wxEmptyString
,
508 const wxString
& longHelpString
= wxEmptyString
)
510 return AddTool(toolId
,
514 toggle
? wxITEM_CHECK
: wxITEM_NORMAL
,
520 wxAuiToolBarItem
* AddLabel(int toolId
,
521 const wxString
& label
= wxEmptyString
,
522 const int width
= -1);
523 wxAuiToolBarItem
* AddControl(wxControl
* control
,
524 const wxString
& label
= wxEmptyString
);
525 wxAuiToolBarItem
* AddSeparator();
526 wxAuiToolBarItem
* AddSpacer(int pixels
);
527 wxAuiToolBarItem
* AddStretchSpacer(int proportion
= 1);
531 wxControl
* FindControl(int windowId
);
532 wxAuiToolBarItem
* FindToolByPosition(wxCoord x
, wxCoord y
) const;
533 wxAuiToolBarItem
* FindToolByIndex(int idx
) const;
534 wxAuiToolBarItem
* FindTool(int toolId
) const;
536 void ClearTools() { Clear() ; }
538 bool DeleteTool(int toolId
);
539 bool DeleteByIndex(int toolId
);
541 size_t GetToolCount() const;
542 int GetToolPos(int toolId
) const { return GetToolIndex(toolId
); }
543 int GetToolIndex(int toolId
) const;
544 bool GetToolFits(int toolId
) const;
545 wxRect
GetToolRect(int toolId
) const;
546 bool GetToolFitsByIndex(int toolId
) const;
547 bool GetToolBarFits() const;
549 void SetMargins(const wxSize
& size
) { SetMargins(size
.x
, size
.x
, size
.y
, size
.y
); }
550 void SetMargins(int x
, int y
) { SetMargins(x
, x
, y
, y
); }
551 void SetMargins(int left
, int right
, int top
, int bottom
);
553 void SetToolBitmapSize(const wxSize
& size
);
554 wxSize
GetToolBitmapSize() const;
556 bool GetOverflowVisible() const;
557 void SetOverflowVisible(bool visible
);
559 bool GetGripperVisible() const;
560 void SetGripperVisible(bool visible
);
562 void ToggleTool(int toolId
, bool state
);
563 bool GetToolToggled(int toolId
) const;
565 void EnableTool(int toolId
, bool state
);
566 bool GetToolEnabled(int toolId
) const;
568 void SetToolDropDown(int toolId
, bool dropdown
);
569 bool GetToolDropDown(int toolId
) const;
571 void SetToolBorderPadding(int padding
);
572 int GetToolBorderPadding() const;
574 void SetToolTextOrientation(int orientation
);
575 int GetToolTextOrientation() const;
577 void SetToolPacking(int packing
);
578 int GetToolPacking() const;
580 void SetToolProportion(int toolId
, int proportion
);
581 int GetToolProportion(int toolId
) const;
583 void SetToolSeparation(int separation
);
584 int GetToolSeparation() const;
586 void SetToolSticky(int toolId
, bool sticky
);
587 bool GetToolSticky(int toolId
) const;
589 wxString
GetToolLabel(int toolId
) const;
590 void SetToolLabel(int toolId
, const wxString
& label
);
592 wxBitmap
GetToolBitmap(int toolId
) const;
593 void SetToolBitmap(int toolId
, const wxBitmap
& bitmap
);
595 wxString
GetToolShortHelp(int toolId
) const;
596 void SetToolShortHelp(int toolId
, const wxString
& helpString
);
598 wxString
GetToolLongHelp(int toolId
) const;
599 void SetToolLongHelp(int toolId
, const wxString
& helpString
);
601 void SetCustomOverflowItems(const wxAuiToolBarItemArray
& prepend
,
602 const wxAuiToolBarItemArray
& append
);
604 // get size of hint rectangle for a particular dock location
605 wxSize
GetHintSize(int dockDirection
) const;
606 bool IsPaneValid(const wxAuiPaneInfo
& pane
) const;
608 // Override to call DoIdleUpdate().
609 virtual void UpdateWindowUI(long flags
= wxUPDATE_UI_NONE
);
614 virtual void OnCustomRender(wxDC
& WXUNUSED(dc
),
615 const wxAuiToolBarItem
& WXUNUSED(item
),
616 const wxRect
& WXUNUSED(rect
)) { }
621 void SetOrientation(int orientation
);
622 void SetHoverItem(wxAuiToolBarItem
* item
);
623 void SetPressedItem(wxAuiToolBarItem
* item
);
624 void RefreshOverflowState();
626 int GetOverflowState() const;
627 wxRect
GetOverflowRect() const;
628 wxSize
GetLabelSize(const wxString
& label
);
629 wxAuiToolBarItem
* FindToolByPositionWithPacking(wxCoord x
, wxCoord y
) const;
631 void DoSetSize(int x
,
635 int sizeFlags
= wxSIZE_AUTO
);
637 protected: // handlers
639 void OnSize(wxSizeEvent
& evt
);
640 void OnIdle(wxIdleEvent
& evt
);
641 void OnPaint(wxPaintEvent
& evt
);
642 void OnEraseBackground(wxEraseEvent
& evt
);
643 void OnLeftDown(wxMouseEvent
& evt
);
644 void OnLeftUp(wxMouseEvent
& evt
);
645 void OnRightDown(wxMouseEvent
& evt
);
646 void OnRightUp(wxMouseEvent
& evt
);
647 void OnMiddleDown(wxMouseEvent
& evt
);
648 void OnMiddleUp(wxMouseEvent
& evt
);
649 void OnMotion(wxMouseEvent
& evt
);
650 void OnLeaveWindow(wxMouseEvent
& evt
);
651 void OnCaptureLost(wxMouseCaptureLostEvent
& evt
);
652 void OnSetCursor(wxSetCursorEvent
& evt
);
656 wxAuiToolBarItemArray m_items
; // array of toolbar items
657 wxAuiToolBarArt
* m_art
; // art provider
658 wxBoxSizer
* m_sizer
; // main sizer for toolbar
659 wxAuiToolBarItem
* m_actionItem
; // item that's being acted upon (pressed)
660 wxAuiToolBarItem
* m_tipItem
; // item that has its tooltip shown
661 wxBitmap m_bitmap
; // double-buffer bitmap
662 wxSizerItem
* m_gripperSizerItem
;
663 wxSizerItem
* m_overflowSizerItem
;
664 wxSize m_absoluteMinSize
;
665 wxPoint m_actionPos
; // position of left-mouse down
666 wxAuiToolBarItemArray m_customOverflowPrepend
;
667 wxAuiToolBarItemArray m_customOverflowAppend
;
671 int m_sizerElementCount
;
677 int m_toolBorderPadding
;
678 int m_toolTextOrientation
;
681 bool m_gripperVisible
;
682 bool m_overflowVisible
;
684 bool RealizeHelper(wxClientDC
& dc
, bool horizontal
);
685 static bool IsPaneValid(long style
, const wxAuiPaneInfo
& pane
);
686 bool IsPaneValid(long style
) const;
687 void SetArtFlags() const;
688 wxOrientation m_orientation
;
689 wxSize m_horzHintSize
;
690 wxSize m_vertHintSize
;
693 // Common part of OnLeaveWindow() and OnCaptureLost().
694 void DoResetMouseState();
696 DECLARE_EVENT_TABLE()
697 DECLARE_CLASS(wxAuiToolBar
)
703 // wx event machinery
707 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_TOOL_DROPDOWN
, wxAuiToolBarEvent
);
708 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_OVERFLOW_CLICK
, wxAuiToolBarEvent
);
709 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_RIGHT_CLICK
, wxAuiToolBarEvent
);
710 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_MIDDLE_CLICK
, wxAuiToolBarEvent
);
711 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI
, wxEVT_AUITOOLBAR_BEGIN_DRAG
, wxAuiToolBarEvent
);
713 typedef void (wxEvtHandler::*wxAuiToolBarEventFunction
)(wxAuiToolBarEvent
&);
715 #define wxAuiToolBarEventHandler(func) \
716 wxEVENT_HANDLER_CAST(wxAuiToolBarEventFunction, func)
718 #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \
719 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn))
720 #define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \
721 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn))
722 #define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \
723 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn))
724 #define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \
725 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn))
726 #define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \
727 wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn))
731 // wxpython/swig event work
732 %constant wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN
;
733 %constant wxEventType wxEVT_AUITOOLBAR_OVERFLOW_CLICK
;
734 %constant wxEventType wxEVT_AUITOOLBAR_RIGHT_CLICK
;
735 %constant wxEventType wxEVT_AUITOOLBAR_MIDDLE_CLICK
;
736 %constant wxEventType wxEVT_AUITOOLBAR_BEGIN_DRAG
;
739 EVT_AUITOOLBAR_TOOL_DROPDOWN
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_TOOL_DROPDOWN
, 1 )
740 EVT_AUITOOLBAR_OVERFLOW_CLICK
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_OVERFLOW_CLICK
, 1 )
741 EVT_AUITOOLBAR_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_RIGHT_CLICK
, 1 )
742 EVT_AUITOOLBAR_MIDDLE_CLICK
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_MIDDLE_CLICK
, 1 )
743 EVT_AUITOOLBAR_BEGIN_DRAG
= wx
.PyEventBinder( wxEVT_AUITOOLBAR_BEGIN_DRAG
, 1 )
747 // old wxEVT_COMMAND_* constants
748 #define wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN wxEVT_AUITOOLBAR_TOOL_DROPDOWN
749 #define wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK wxEVT_AUITOOLBAR_OVERFLOW_CLICK
750 #define wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK wxEVT_AUITOOLBAR_RIGHT_CLICK
751 #define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK
752 #define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG
755 #endif // _WX_AUIBAR_H_