]> git.saurik.com Git - wxWidgets.git/blob - include/wx/aui/auibar.h
CoreText fixes
[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 void SetWindow(wxWindow* w) { window = w; }
157 wxWindow* GetWindow() { return window; }
158
159 void SetId(int new_id) { id = new_id; }
160 int GetId() const { return id; }
161
162 void SetKind(int new_kind) { kind = new_kind; }
163 int GetKind() const { return kind; }
164
165 void SetState(int new_state) { state = new_state; }
166 int GetState() const { return state; }
167
168 void SetSizerItem(wxSizerItem* s) { sizer_item = s; }
169 wxSizerItem* GetSizerItem() const { return sizer_item; }
170
171 void SetLabel(const wxString& s) { label = s; }
172 const wxString& GetLabel() const { return label; }
173
174 void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; }
175 const wxBitmap& GetBitmap() const { return bitmap; }
176
177 void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; }
178 const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; }
179
180 void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; }
181 const wxBitmap& GetHoverBitmap() const { return hover_bitmap; }
182
183 void SetShortHelp(const wxString& s) { short_help = s; }
184 const wxString& GetShortHelp() const { return short_help; }
185
186 void SetLongHelp(const wxString& s) { long_help = s; }
187 const wxString& GetLongHelp() const { return long_help; }
188
189 void SetMinSize(const wxSize& s) { min_size = s; }
190 const wxSize& GetMinSize() const { return min_size; }
191
192 void SetSpacerPixels(int s) { spacer_pixels = s; }
193 int GetSpacerPixels() const { return spacer_pixels; }
194
195 void SetProportion(int p) { proportion = p; }
196 int GetProportion() const { return proportion; }
197
198 void SetActive(bool b) { active = b; }
199 bool IsActive() const { return active; }
200
201 void SetHasDropDown(bool b) { dropdown = b; }
202 bool HasDropDown() const { return dropdown; }
203
204 void SetSticky(bool b) { sticky = b; }
205 bool IsSticky() const { return sticky; }
206
207 void SetUserData(long l) { user_data = l; }
208 long GetUserData() const { return user_data; }
209
210 private:
211
212 wxWindow* window; // item's associated window
213 wxString label; // label displayed on the item
214 wxBitmap bitmap; // item's bitmap
215 wxBitmap disabled_bitmap; // item's disabled bitmap
216 wxBitmap hover_bitmap; // item's hover bitmap
217 wxString short_help; // short help (for tooltip)
218 wxString long_help; // long help (for status bar)
219 wxSizerItem* sizer_item; // sizer item
220 wxSize min_size; // item's minimum size
221 int spacer_pixels; // size of a spacer
222 int id; // item's id
223 int kind; // item's kind
224 int state; // state
225 int proportion; // proportion
226 bool active; // true if the item is currently active
227 bool dropdown; // true if the item has a dropdown button
228 bool sticky; // overrides button states if true (always active)
229 long user_data; // user-specified data
230 };
231
232 #ifndef SWIG
233 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiToolBarItem, wxAuiToolBarItemArray, WXDLLIMPEXP_AUI);
234 #endif
235
236
237
238
239 // tab art class
240
241 class WXDLLIMPEXP_AUI wxAuiToolBarArt
242 {
243 public:
244
245 wxAuiToolBarArt() { }
246 virtual ~wxAuiToolBarArt() { }
247
248 virtual wxAuiToolBarArt* Clone() = 0;
249 virtual void SetFlags(unsigned int flags) = 0;
250 virtual void SetFont(const wxFont& font) = 0;
251 virtual void SetTextOrientation(int orientation) = 0;
252
253 virtual void DrawBackground(
254 wxDC& dc,
255 wxWindow* wnd,
256 const wxRect& rect) = 0;
257
258 virtual void DrawLabel(
259 wxDC& dc,
260 wxWindow* wnd,
261 const wxAuiToolBarItem& item,
262 const wxRect& rect) = 0;
263
264 virtual void DrawButton(
265 wxDC& dc,
266 wxWindow* wnd,
267 const wxAuiToolBarItem& item,
268 const wxRect& rect) = 0;
269
270 virtual void DrawDropDownButton(
271 wxDC& dc,
272 wxWindow* wnd,
273 const wxAuiToolBarItem& item,
274 const wxRect& rect) = 0;
275
276 virtual void DrawControlLabel(
277 wxDC& dc,
278 wxWindow* wnd,
279 const wxAuiToolBarItem& item,
280 const wxRect& rect) = 0;
281
282 virtual void DrawSeparator(
283 wxDC& dc,
284 wxWindow* wnd,
285 const wxRect& rect) = 0;
286
287 virtual void DrawGripper(
288 wxDC& dc,
289 wxWindow* wnd,
290 const wxRect& rect) = 0;
291
292 virtual void DrawOverflowButton(
293 wxDC& dc,
294 wxWindow* wnd,
295 const wxRect& rect,
296 int state) = 0;
297
298 virtual wxSize GetLabelSize(
299 wxDC& dc,
300 wxWindow* wnd,
301 const wxAuiToolBarItem& item) = 0;
302
303 virtual wxSize GetToolSize(
304 wxDC& dc,
305 wxWindow* wnd,
306 const wxAuiToolBarItem& item) = 0;
307
308 virtual int GetElementSize(int element_id) = 0;
309 virtual void SetElementSize(int element_id, int size) = 0;
310
311 virtual int ShowDropDown(
312 wxWindow* wnd,
313 const wxAuiToolBarItemArray& items) = 0;
314 };
315
316
317
318 class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt : public wxAuiToolBarArt
319 {
320
321 public:
322
323 wxAuiDefaultToolBarArt();
324 virtual ~wxAuiDefaultToolBarArt();
325
326 virtual wxAuiToolBarArt* Clone();
327 virtual void SetFlags(unsigned int flags);
328 virtual void SetFont(const wxFont& font);
329 virtual void SetTextOrientation(int orientation);
330
331 virtual void DrawBackground(
332 wxDC& dc,
333 wxWindow* wnd,
334 const wxRect& rect);
335
336 virtual void DrawLabel(
337 wxDC& dc,
338 wxWindow* wnd,
339 const wxAuiToolBarItem& item,
340 const wxRect& rect);
341
342 virtual void DrawButton(
343 wxDC& dc,
344 wxWindow* wnd,
345 const wxAuiToolBarItem& item,
346 const wxRect& rect);
347
348 virtual void DrawDropDownButton(
349 wxDC& dc,
350 wxWindow* wnd,
351 const wxAuiToolBarItem& item,
352 const wxRect& rect);
353
354 virtual void DrawControlLabel(
355 wxDC& dc,
356 wxWindow* wnd,
357 const wxAuiToolBarItem& item,
358 const wxRect& rect);
359
360 virtual void DrawSeparator(
361 wxDC& dc,
362 wxWindow* wnd,
363 const wxRect& rect);
364
365 virtual void DrawGripper(
366 wxDC& dc,
367 wxWindow* wnd,
368 const wxRect& rect);
369
370 virtual void DrawOverflowButton(
371 wxDC& dc,
372 wxWindow* wnd,
373 const wxRect& rect,
374 int state);
375
376 virtual wxSize GetLabelSize(
377 wxDC& dc,
378 wxWindow* wnd,
379 const wxAuiToolBarItem& item);
380
381 virtual wxSize GetToolSize(
382 wxDC& dc,
383 wxWindow* wnd,
384 const wxAuiToolBarItem& item);
385
386 virtual int GetElementSize(int element);
387 virtual void SetElementSize(int element_id, int size);
388
389 virtual int ShowDropDown(wxWindow* wnd,
390 const wxAuiToolBarItemArray& items);
391
392 protected:
393
394 wxBitmap m_button_dropdown_bmp;
395 wxBitmap m_disabled_button_dropdown_bmp;
396 wxBitmap m_overflow_bmp;
397 wxBitmap m_disabled_overflow_bmp;
398 wxColour m_base_colour;
399 wxColour m_highlight_colour;
400 wxFont m_font;
401 unsigned int m_flags;
402 int m_text_orientation;
403
404 wxPen m_gripper_pen1;
405 wxPen m_gripper_pen2;
406 wxPen m_gripper_pen3;
407
408 int m_separator_size;
409 int m_gripper_size;
410 int m_overflow_size;
411 };
412
413
414
415
416 class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl
417 {
418 public:
419
420 wxAuiToolBar(wxWindow* parent,
421 wxWindowID id = -1,
422 const wxPoint& position = wxDefaultPosition,
423 const wxSize& size = wxDefaultSize,
424 long style = wxAUI_TB_DEFAULT_STYLE);
425 ~wxAuiToolBar();
426
427 void SetWindowStyleFlag(long style);
428
429 void SetArtProvider(wxAuiToolBarArt* art);
430 wxAuiToolBarArt* GetArtProvider() const;
431
432 bool SetFont(const wxFont& font);
433
434
435 void AddTool(int tool_id,
436 const wxString& label,
437 const wxBitmap& bitmap,
438 const wxString& short_help_string = wxEmptyString,
439 wxItemKind kind = wxITEM_NORMAL);
440
441 void AddTool(int tool_id,
442 const wxString& label,
443 const wxBitmap& bitmap,
444 const wxBitmap& disabled_bitmap,
445 wxItemKind kind,
446 const wxString& short_help_string,
447 const wxString& long_help_string,
448 wxObject* client_data);
449
450 void AddTool(int tool_id,
451 const wxBitmap& bitmap,
452 const wxBitmap& disabled_bitmap,
453 bool toggle = false,
454 wxObject* client_data = NULL,
455 const wxString& short_help_string = wxEmptyString,
456 const wxString& long_help_string = wxEmptyString)
457 {
458 AddTool(tool_id,
459 wxEmptyString,
460 bitmap,
461 disabled_bitmap,
462 toggle ? wxITEM_CHECK : wxITEM_NORMAL,
463 short_help_string,
464 long_help_string,
465 client_data);
466 }
467
468 void AddLabel(int tool_id,
469 const wxString& label = wxEmptyString,
470 const int width = -1);
471 void AddControl(wxControl* control,
472 const wxString& label = wxEmptyString);
473 void AddSeparator();
474 void AddSpacer(int pixels);
475 void AddStretchSpacer(int proportion = 1);
476
477 bool Realize();
478
479 wxControl* FindControl(int window_id);
480 wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
481 wxAuiToolBarItem* FindToolByIndex(int idx) const;
482 wxAuiToolBarItem* FindTool(int tool_id) const;
483
484 void ClearTools() { Clear() ; }
485 void Clear();
486 bool DeleteTool(int tool_id);
487 bool DeleteByIndex(int tool_id);
488
489 size_t GetToolCount() const;
490 int GetToolPos(int tool_id) const { return GetToolIndex(tool_id); }
491 int GetToolIndex(int tool_id) const;
492 bool GetToolFits(int tool_id) const;
493 wxRect GetToolRect(int tool_id) const;
494 bool GetToolFitsByIndex(int tool_id) const;
495 bool GetToolBarFits() const;
496
497 void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); }
498 void SetMargins(int x, int y) { SetMargins(x, x, y, y); }
499 void SetMargins(int left, int right, int top, int bottom);
500
501 void SetToolBitmapSize(const wxSize& size);
502 wxSize GetToolBitmapSize() const;
503
504 bool GetOverflowVisible() const;
505 void SetOverflowVisible(bool visible);
506
507 bool GetGripperVisible() const;
508 void SetGripperVisible(bool visible);
509
510 void ToggleTool(int tool_id, bool state);
511 bool GetToolToggled(int tool_id) const;
512
513 void EnableTool(int tool_id, bool state);
514 bool GetToolEnabled(int tool_id) const;
515
516 void SetToolDropDown(int tool_id, bool dropdown);
517 bool GetToolDropDown(int tool_id) const;
518
519 void SetToolBorderPadding(int padding);
520 int GetToolBorderPadding() const;
521
522 void SetToolTextOrientation(int orientation);
523 int GetToolTextOrientation() const;
524
525 void SetToolPacking(int packing);
526 int GetToolPacking() const;
527
528 void SetToolProportion(int tool_id, int proportion);
529 int GetToolProportion(int tool_id) const;
530
531 void SetToolSeparation(int separation);
532 int GetToolSeparation() const;
533
534 void SetToolSticky(int tool_id, bool sticky);
535 bool GetToolSticky(int tool_id) const;
536
537 wxString GetToolLabel(int tool_id) const;
538 void SetToolLabel(int tool_id, const wxString& label);
539
540 wxBitmap GetToolBitmap(int tool_id) const;
541 void SetToolBitmap(int tool_id, const wxBitmap& bitmap);
542
543 wxString GetToolShortHelp(int tool_id) const;
544 void SetToolShortHelp(int tool_id, const wxString& help_string);
545
546 wxString GetToolLongHelp(int tool_id) const;
547 void SetToolLongHelp(int tool_id, const wxString& help_string);
548
549 void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
550 const wxAuiToolBarItemArray& append);
551
552 protected:
553
554 virtual void OnCustomRender(wxDC& WXUNUSED(dc),
555 const wxAuiToolBarItem& WXUNUSED(item),
556 const wxRect& WXUNUSED(rect)) { }
557
558 protected:
559
560 void DoIdleUpdate();
561 void SetOrientation(int orientation);
562 void SetHoverItem(wxAuiToolBarItem* item);
563 void SetPressedItem(wxAuiToolBarItem* item);
564 void RefreshOverflowState();
565
566 int GetOverflowState() const;
567 wxRect GetOverflowRect() const;
568 wxSize GetLabelSize(const wxString& label);
569 wxAuiToolBarItem* FindToolByPositionWithPacking(wxCoord x, wxCoord y) const;
570
571 void DoSetSize(int x,
572 int y,
573 int width,
574 int height,
575 int sizeFlags = wxSIZE_AUTO);
576
577 protected: // handlers
578
579 void OnSize(wxSizeEvent& evt);
580 void OnIdle(wxIdleEvent& evt);
581 void OnPaint(wxPaintEvent& evt);
582 void OnEraseBackground(wxEraseEvent& evt);
583 void OnLeftDown(wxMouseEvent& evt);
584 void OnLeftUp(wxMouseEvent& evt);
585 void OnRightDown(wxMouseEvent& evt);
586 void OnRightUp(wxMouseEvent& evt);
587 void OnMiddleDown(wxMouseEvent& evt);
588 void OnMiddleUp(wxMouseEvent& evt);
589 void OnMotion(wxMouseEvent& evt);
590 void OnLeaveWindow(wxMouseEvent& evt);
591 void OnSetCursor(wxSetCursorEvent& evt);
592
593 protected:
594
595 wxAuiToolBarItemArray m_items; // array of toolbar items
596 wxAuiToolBarArt* m_art; // art provider
597 wxBoxSizer* m_sizer; // main sizer for toolbar
598 wxAuiToolBarItem* m_action_item; // item that's being acted upon (pressed)
599 wxAuiToolBarItem* m_tip_item; // item that has its tooltip shown
600 wxBitmap m_bitmap; // double-buffer bitmap
601 wxSizerItem* m_gripper_sizer_item;
602 wxSizerItem* m_overflow_sizer_item;
603 wxSize m_absolute_min_size;
604 wxPoint m_action_pos; // position of left-mouse down
605 wxAuiToolBarItemArray m_custom_overflow_prepend;
606 wxAuiToolBarItemArray m_custom_overflow_append;
607
608 int m_button_width;
609 int m_button_height;
610 int m_sizer_element_count;
611 int m_left_padding;
612 int m_right_padding;
613 int m_top_padding;
614 int m_bottom_padding;
615 int m_tool_packing;
616 int m_tool_border_padding;
617 int m_tool_text_orientation;
618 int m_overflow_state;
619 bool m_dragging;
620 bool m_gripper_visible;
621 bool m_overflow_visible;
622 long m_style;
623
624 DECLARE_EVENT_TABLE()
625 DECLARE_CLASS(wxAuiToolBar)
626 };
627
628
629
630
631 // wx event machinery
632
633 #ifndef SWIG
634
635 BEGIN_DECLARE_EVENT_TYPES()
636 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 0)
637 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 0)
638 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 0)
639 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 0)
640 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 0)
641 END_DECLARE_EVENT_TYPES()
642
643 typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&);
644
645 #define wxAuiToolBarEventHandler(func) \
646 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiToolBarEventFunction, &func)
647
648 #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \
649 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn))
650 #define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \
651 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn))
652 #define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \
653 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn))
654 #define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \
655 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn))
656 #define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \
657 wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn))
658
659 #else
660
661 // wxpython/swig event work
662 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN;
663 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK;
664 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK;
665 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK;
666 %constant wxEventType wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG;
667
668 %pythoncode {
669 EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 1 )
670 EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 1 )
671 EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 1 )
672 EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 1 )
673 EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 1 )
674 }
675 #endif // SWIG
676
677 #endif // wxUSE_AUI
678 #endif // _WX_AUIBAR_H_
679