1 //////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aui/auibook.h
3 // Purpose: wxaui: wx advanced user interface - notebook
4 // Author: Benjamin I. Williams
7 // Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
8 // Licence: wxWindows Library Licence, Version 3.1
9 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_AUINOTEBOOK_H_
14 #define _WX_AUINOTEBOOK_H_
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
24 #include "wx/aui/framemanager.h"
25 #include "wx/aui/dockart.h"
26 #include "wx/aui/floatpane.h"
27 #include "wx/bookctrl.h"
33 enum wxAuiNotebookOption
35 wxAUI_NB_TOP
= 1 << 0,
36 wxAUI_NB_LEFT
= 1 << 1, // not implemented yet
37 wxAUI_NB_RIGHT
= 1 << 2, // not implemented yet
38 wxAUI_NB_BOTTOM
= 1 << 3,
39 wxAUI_NB_TAB_SPLIT
= 1 << 4,
40 wxAUI_NB_TAB_MOVE
= 1 << 5,
41 wxAUI_NB_TAB_EXTERNAL_MOVE
= 1 << 6,
42 wxAUI_NB_TAB_FIXED_WIDTH
= 1 << 7,
43 wxAUI_NB_SCROLL_BUTTONS
= 1 << 8,
44 wxAUI_NB_WINDOWLIST_BUTTON
= 1 << 9,
45 wxAUI_NB_CLOSE_BUTTON
= 1 << 10,
46 wxAUI_NB_CLOSE_ON_ACTIVE_TAB
= 1 << 11,
47 wxAUI_NB_CLOSE_ON_ALL_TABS
= 1 << 12,
48 wxAUI_NB_MIDDLE_CLICK_CLOSE
= 1 << 13,
50 wxAUI_NB_DEFAULT_STYLE
= wxAUI_NB_TOP
|
53 wxAUI_NB_SCROLL_BUTTONS
|
54 wxAUI_NB_CLOSE_ON_ACTIVE_TAB
|
55 wxAUI_NB_MIDDLE_CLICK_CLOSE
61 // aui notebook event class
63 class WXDLLIMPEXP_AUI wxAuiNotebookEvent
: public wxBookCtrlEvent
66 wxAuiNotebookEvent(wxEventType command_type
= wxEVT_NULL
,
68 : wxBookCtrlEvent(command_type
, win_id
)
73 wxAuiNotebookEvent(const wxAuiNotebookEvent
& c
) : wxBookCtrlEvent(c
)
75 drag_source
= c
.drag_source
;
78 wxEvent
*Clone() const { return new wxAuiNotebookEvent(*this); }
80 void SetDragSource(wxAuiNotebook
* s
) { drag_source
= s
; }
81 wxAuiNotebook
* GetDragSource() const { return drag_source
; }
84 wxAuiNotebook
* drag_source
;
88 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiNotebookEvent
)
93 class WXDLLIMPEXP_AUI wxAuiNotebookPage
96 wxWindow
* window
; // page's associated window
97 wxString caption
; // caption displayed on the tab
98 wxBitmap bitmap
; // tab's bitmap
99 wxRect rect
; // tab's hit rectangle
100 bool active
; // true if the page is currently active
103 class WXDLLIMPEXP_AUI wxAuiTabContainerButton
107 int id
; // button's id
108 int cur_state
; // current state (normal, hover, pressed, etc.)
109 int location
; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
110 wxBitmap bitmap
; // button's hover bitmap
111 wxBitmap dis_bitmap
; // button's disabled bitmap
112 wxRect rect
; // button's hit rectangle
117 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiNotebookPage
, wxAuiNotebookPageArray
, WXDLLIMPEXP_AUI
);
118 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton
, wxAuiTabContainerButtonArray
, WXDLLIMPEXP_AUI
);
124 class WXDLLIMPEXP_AUI wxAuiTabArt
129 virtual ~wxAuiTabArt() { }
131 virtual wxAuiTabArt
* Clone() = 0;
132 virtual void SetFlags(unsigned int flags
) = 0;
134 virtual void SetSizingInfo(const wxSize
& tab_ctrl_size
,
135 size_t tab_count
) = 0;
137 virtual void SetNormalFont(const wxFont
& font
) = 0;
138 virtual void SetSelectedFont(const wxFont
& font
) = 0;
139 virtual void SetMeasuringFont(const wxFont
& font
) = 0;
140 virtual void SetColour(const wxColour
& colour
) = 0;
141 virtual void SetActiveColour(const wxColour
& colour
) = 0;
143 virtual void DrawBackground(
146 const wxRect
& rect
) = 0;
148 virtual void DrawTab(wxDC
& dc
,
150 const wxAuiNotebookPage
& pane
,
151 const wxRect
& in_rect
,
152 int close_button_state
,
153 wxRect
* out_tab_rect
,
154 wxRect
* out_button_rect
,
157 virtual void DrawButton(
160 const wxRect
& in_rect
,
164 wxRect
* out_rect
) = 0;
166 virtual wxSize
GetTabSize(
169 const wxString
& caption
,
170 const wxBitmap
& bitmap
,
172 int close_button_state
,
175 virtual int ShowDropDown(
177 const wxAuiNotebookPageArray
& items
,
180 virtual int GetIndentSize() = 0;
182 virtual int GetBestTabCtrlSize(
184 const wxAuiNotebookPageArray
& pages
,
185 const wxSize
& required_bmp_size
) = 0;
189 class WXDLLIMPEXP_AUI wxAuiDefaultTabArt
: public wxAuiTabArt
194 wxAuiDefaultTabArt();
195 virtual ~wxAuiDefaultTabArt();
197 wxAuiTabArt
* Clone();
198 void SetFlags(unsigned int flags
);
199 void SetSizingInfo(const wxSize
& tab_ctrl_size
,
202 void SetNormalFont(const wxFont
& font
);
203 void SetSelectedFont(const wxFont
& font
);
204 void SetMeasuringFont(const wxFont
& font
);
205 void SetColour(const wxColour
& colour
);
206 void SetActiveColour(const wxColour
& colour
);
213 void DrawTab(wxDC
& dc
,
215 const wxAuiNotebookPage
& pane
,
216 const wxRect
& in_rect
,
217 int close_button_state
,
218 wxRect
* out_tab_rect
,
219 wxRect
* out_button_rect
,
225 const wxRect
& in_rect
,
236 const wxString
& caption
,
237 const wxBitmap
& bitmap
,
239 int close_button_state
,
244 const wxAuiNotebookPageArray
& items
,
247 int GetBestTabCtrlSize(wxWindow
* wnd
,
248 const wxAuiNotebookPageArray
& pages
,
249 const wxSize
& required_bmp_size
);
253 wxFont m_normal_font
;
254 wxFont m_selected_font
;
255 wxFont m_measuring_font
;
256 wxColour m_base_colour
;
257 wxPen m_base_colour_pen
;
259 wxBrush m_base_colour_brush
;
260 wxColour m_active_colour
;
261 wxBitmap m_active_close_bmp
;
262 wxBitmap m_disabled_close_bmp
;
263 wxBitmap m_active_left_bmp
;
264 wxBitmap m_disabled_left_bmp
;
265 wxBitmap m_active_right_bmp
;
266 wxBitmap m_disabled_right_bmp
;
267 wxBitmap m_active_windowlist_bmp
;
268 wxBitmap m_disabled_windowlist_bmp
;
270 int m_fixed_tab_width
;
271 int m_tab_ctrl_height
;
272 unsigned int m_flags
;
276 class WXDLLIMPEXP_AUI wxAuiSimpleTabArt
: public wxAuiTabArt
282 virtual ~wxAuiSimpleTabArt();
284 wxAuiTabArt
* Clone();
285 void SetFlags(unsigned int flags
);
287 void SetSizingInfo(const wxSize
& tab_ctrl_size
,
290 void SetNormalFont(const wxFont
& font
);
291 void SetSelectedFont(const wxFont
& font
);
292 void SetMeasuringFont(const wxFont
& font
);
293 void SetColour(const wxColour
& colour
);
294 void SetActiveColour(const wxColour
& colour
);
301 void DrawTab(wxDC
& dc
,
303 const wxAuiNotebookPage
& pane
,
304 const wxRect
& in_rect
,
305 int close_button_state
,
306 wxRect
* out_tab_rect
,
307 wxRect
* out_button_rect
,
313 const wxRect
& in_rect
,
324 const wxString
& caption
,
325 const wxBitmap
& bitmap
,
327 int close_button_state
,
332 const wxAuiNotebookPageArray
& items
,
335 int GetBestTabCtrlSize(wxWindow
* wnd
,
336 const wxAuiNotebookPageArray
& pages
,
337 const wxSize
& required_bmp_size
);
341 wxFont m_normal_font
;
342 wxFont m_selected_font
;
343 wxFont m_measuring_font
;
344 wxPen m_normal_bkpen
;
345 wxPen m_selected_bkpen
;
346 wxBrush m_normal_bkbrush
;
347 wxBrush m_selected_bkbrush
;
349 wxBitmap m_active_close_bmp
;
350 wxBitmap m_disabled_close_bmp
;
351 wxBitmap m_active_left_bmp
;
352 wxBitmap m_disabled_left_bmp
;
353 wxBitmap m_active_right_bmp
;
354 wxBitmap m_disabled_right_bmp
;
355 wxBitmap m_active_windowlist_bmp
;
356 wxBitmap m_disabled_windowlist_bmp
;
358 int m_fixed_tab_width
;
359 unsigned int m_flags
;
370 class WXDLLIMPEXP_AUI wxAuiTabContainer
375 virtual ~wxAuiTabContainer();
377 void SetArtProvider(wxAuiTabArt
* art
);
378 wxAuiTabArt
* GetArtProvider() const;
380 void SetFlags(unsigned int flags
);
381 unsigned int GetFlags() const;
383 bool AddPage(wxWindow
* page
, const wxAuiNotebookPage
& info
);
384 bool InsertPage(wxWindow
* page
, const wxAuiNotebookPage
& info
, size_t idx
);
385 bool MovePage(wxWindow
* page
, size_t new_idx
);
386 bool RemovePage(wxWindow
* page
);
387 bool SetActivePage(wxWindow
* page
);
388 bool SetActivePage(size_t page
);
389 void SetNoneActive();
390 int GetActivePage() const;
391 bool TabHitTest(int x
, int y
, wxWindow
** hit
) const;
392 bool ButtonHitTest(int x
, int y
, wxAuiTabContainerButton
** hit
) const;
393 wxWindow
* GetWindowFromIdx(size_t idx
) const;
394 int GetIdxFromWindow(wxWindow
* page
) const;
395 size_t GetPageCount() const;
396 wxAuiNotebookPage
& GetPage(size_t idx
);
397 const wxAuiNotebookPage
& GetPage(size_t idx
) const;
398 wxAuiNotebookPageArray
& GetPages();
399 void SetNormalFont(const wxFont
& normal_font
);
400 void SetSelectedFont(const wxFont
& selected_font
);
401 void SetMeasuringFont(const wxFont
& measuring_font
);
402 void SetColour(const wxColour
& colour
);
403 void SetActiveColour(const wxColour
& colour
);
405 void SetRect(const wxRect
& rect
);
407 void RemoveButton(int id
);
408 void AddButton(int id
,
410 const wxBitmap
& normal_bitmap
= wxNullBitmap
,
411 const wxBitmap
& disabled_bitmap
= wxNullBitmap
);
413 size_t GetTabOffset() const;
414 void SetTabOffset(size_t offset
);
416 // Is the tab visible?
417 bool IsTabVisible(int tabPage
, int tabOffset
, wxDC
* dc
, wxWindow
* wnd
);
419 // Make the tab visible if it wasn't already
420 void MakeTabVisible(int tabPage
, wxWindow
* win
);
424 virtual void Render(wxDC
* dc
, wxWindow
* wnd
);
429 wxAuiNotebookPageArray m_pages
;
430 wxAuiTabContainerButtonArray m_buttons
;
431 wxAuiTabContainerButtonArray m_tab_close_buttons
;
434 unsigned int m_flags
;
439 class WXDLLIMPEXP_AUI wxAuiTabCtrl
: public wxControl
,
440 public wxAuiTabContainer
444 wxAuiTabCtrl(wxWindow
* parent
,
445 wxWindowID id
= wxID_ANY
,
446 const wxPoint
& pos
= wxDefaultPosition
,
447 const wxSize
& size
= wxDefaultSize
,
452 bool IsDragging() const { return m_is_dragging
; }
455 // choose the default border for this window
456 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
458 void OnPaint(wxPaintEvent
& evt
);
459 void OnEraseBackground(wxEraseEvent
& evt
);
460 void OnSize(wxSizeEvent
& evt
);
461 void OnLeftDown(wxMouseEvent
& evt
);
462 void OnLeftDClick(wxMouseEvent
& evt
);
463 void OnLeftUp(wxMouseEvent
& evt
);
464 void OnMiddleDown(wxMouseEvent
& evt
);
465 void OnMiddleUp(wxMouseEvent
& evt
);
466 void OnRightDown(wxMouseEvent
& evt
);
467 void OnRightUp(wxMouseEvent
& evt
);
468 void OnMotion(wxMouseEvent
& evt
);
469 void OnLeaveWindow(wxMouseEvent
& evt
);
470 void OnButton(wxAuiNotebookEvent
& evt
);
471 void OnSetFocus(wxFocusEvent
& event
);
472 void OnKillFocus(wxFocusEvent
& event
);
473 void OnChar(wxKeyEvent
& event
);
474 void OnCaptureLost(wxMouseCaptureLostEvent
& evt
);
479 wxWindow
* m_click_tab
;
481 wxAuiTabContainerButton
* m_hover_button
;
482 wxAuiTabContainerButton
* m_pressed_button
;
485 DECLARE_CLASS(wxAuiTabCtrl
)
486 DECLARE_EVENT_TABLE()
493 class WXDLLIMPEXP_AUI wxAuiNotebook
: public wxNavigationEnabled
<wxBookCtrlBase
>
498 wxAuiNotebook() { Init(); }
500 wxAuiNotebook(wxWindow
* parent
,
501 wxWindowID id
= wxID_ANY
,
502 const wxPoint
& pos
= wxDefaultPosition
,
503 const wxSize
& size
= wxDefaultSize
,
504 long style
= wxAUI_NB_DEFAULT_STYLE
)
507 Create(parent
, id
, pos
, size
, style
);
510 virtual ~wxAuiNotebook();
512 bool Create(wxWindow
* parent
,
513 wxWindowID id
= wxID_ANY
,
514 const wxPoint
& pos
= wxDefaultPosition
,
515 const wxSize
& size
= wxDefaultSize
,
518 void SetWindowStyleFlag(long style
);
519 void SetArtProvider(wxAuiTabArt
* art
);
520 wxAuiTabArt
* GetArtProvider() const;
522 virtual void SetUniformBitmapSize(const wxSize
& size
);
523 virtual void SetTabCtrlHeight(int height
);
525 bool AddPage(wxWindow
* page
,
526 const wxString
& caption
,
528 const wxBitmap
& bitmap
= wxNullBitmap
);
530 bool InsertPage(size_t page_idx
,
532 const wxString
& caption
,
534 const wxBitmap
& bitmap
= wxNullBitmap
);
536 bool DeletePage(size_t page
);
537 bool RemovePage(size_t page
);
539 size_t GetPageCount() const;
540 wxWindow
* GetPage(size_t page_idx
) const;
541 int GetPageIndex(wxWindow
* page_wnd
) const;
543 bool SetPageText(size_t page
, const wxString
& text
);
544 wxString
GetPageText(size_t page_idx
) const;
546 bool SetPageBitmap(size_t page
, const wxBitmap
& bitmap
);
547 wxBitmap
GetPageBitmap(size_t page_idx
) const;
549 int SetSelection(size_t new_page
);
550 int GetSelection() const;
552 virtual void Split(size_t page
, int direction
);
554 const wxAuiManager
& GetAuiManager() const { return m_mgr
; }
556 // Sets the normal font
557 void SetNormalFont(const wxFont
& font
);
559 // Sets the selected tab font
560 void SetSelectedFont(const wxFont
& font
);
562 // Sets the measuring font
563 void SetMeasuringFont(const wxFont
& font
);
566 virtual bool SetFont(const wxFont
& font
);
568 // Gets the tab control height
569 int GetTabCtrlHeight() const;
571 // Gets the height of the notebook for a given page height
572 int GetHeightForPageHeight(int pageHeight
);
574 // Advances the selection, generation page selection events
575 void AdvanceSelection(bool forward
= true);
577 // Shows the window menu
578 bool ShowWindowMenu();
580 // we do have multiple pages
581 virtual bool HasMultiplePages() const { return true; }
583 // we don't want focus for ourselves
584 // virtual bool AcceptsFocus() const { return false; }
586 // Redo sizing after thawing
589 //wxBookCtrlBase functions
591 virtual void SetPageSize (const wxSize
&size
);
592 virtual int HitTest (const wxPoint
&pt
, long *flags
=NULL
) const;
594 virtual int GetPageImage(size_t n
) const;
595 virtual bool SetPageImage(size_t n
, int imageId
);
597 wxWindow
* GetCurrentPage () const;
599 virtual int ChangeSelection(size_t n
);
601 virtual bool AddPage(wxWindow
*page
, const wxString
&text
, bool select
,
603 virtual bool DeleteAllPages();
604 virtual bool InsertPage(size_t index
, wxWindow
*page
, const wxString
&text
,
605 bool select
=false, int imageId
=NO_IMAGE
);
608 // Common part of all ctors.
611 // choose the default border for this window
612 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
614 // these can be overridden
616 // update the height, return true if it was done or false if the new height
617 // calculated by CalculateTabCtrlHeight() is the same as the old one
618 virtual bool UpdateTabCtrlHeight();
620 virtual int CalculateTabCtrlHeight();
621 virtual wxSize
CalculateNewSplitSize();
623 // remove the page and return a pointer to it
624 virtual wxWindow
*DoRemovePage(size_t WXUNUSED(page
)) { return NULL
; }
626 //A general selection function
627 virtual int DoModifySelection(size_t n
, bool events
);
632 void InitNotebook(long style
);
633 wxAuiTabCtrl
* GetTabCtrlFromPoint(const wxPoint
& pt
);
634 wxWindow
* GetTabFrameFromTabCtrl(wxWindow
* tab_ctrl
);
635 wxAuiTabCtrl
* GetActiveTabCtrl();
636 bool FindTab(wxWindow
* page
, wxAuiTabCtrl
** ctrl
, int* idx
);
637 void RemoveEmptyTabFrames();
638 void UpdateHintWindowSize();
642 void OnChildFocusNotebook(wxChildFocusEvent
& evt
);
643 void OnRender(wxAuiManagerEvent
& evt
);
644 void OnSize(wxSizeEvent
& evt
);
645 void OnTabClicked(wxAuiNotebookEvent
& evt
);
646 void OnTabBeginDrag(wxAuiNotebookEvent
& evt
);
647 void OnTabDragMotion(wxAuiNotebookEvent
& evt
);
648 void OnTabEndDrag(wxAuiNotebookEvent
& evt
);
649 void OnTabCancelDrag(wxAuiNotebookEvent
& evt
);
650 void OnTabButton(wxAuiNotebookEvent
& evt
);
651 void OnTabMiddleDown(wxAuiNotebookEvent
& evt
);
652 void OnTabMiddleUp(wxAuiNotebookEvent
& evt
);
653 void OnTabRightDown(wxAuiNotebookEvent
& evt
);
654 void OnTabRightUp(wxAuiNotebookEvent
& evt
);
655 void OnTabBgDClick(wxAuiNotebookEvent
& evt
);
656 void OnNavigationKeyNotebook(wxNavigationKeyEvent
& event
);
658 // set selection to the given window (which must be non-NULL and be one of
659 // our pages, otherwise an assert is raised)
660 void SetSelectionToWindow(wxWindow
*win
);
661 void SetSelectionToPage(const wxAuiNotebookPage
& page
)
663 SetSelectionToWindow(page
.window
);
669 wxAuiTabContainer m_tabs
;
671 int m_tab_id_counter
;
672 wxWindow
* m_dummy_wnd
;
674 wxSize m_requested_bmp_size
;
675 int m_requested_tabctrl_height
;
676 wxFont m_selected_font
;
677 wxFont m_normal_font
;
678 int m_tab_ctrl_height
;
681 unsigned int m_flags
;
684 DECLARE_CLASS(wxAuiNotebook
)
685 DECLARE_EVENT_TABLE()
692 // wx event machinery
696 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE
, wxAuiNotebookEvent
);
697 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
, wxAuiNotebookEvent
);
698 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING
, wxAuiNotebookEvent
);
699 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED
, wxAuiNotebookEvent
);
700 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_BUTTON
, wxAuiNotebookEvent
);
701 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG
, wxAuiNotebookEvent
);
702 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG
, wxAuiNotebookEvent
);
703 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION
, wxAuiNotebookEvent
);
704 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND
, wxAuiNotebookEvent
);
705 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN
, wxAuiNotebookEvent
);
706 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP
, wxAuiNotebookEvent
);
707 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN
, wxAuiNotebookEvent
);
708 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP
, wxAuiNotebookEvent
);
709 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE
, wxAuiNotebookEvent
);
710 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI
, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK
, wxAuiNotebookEvent
);
712 typedef void (wxEvtHandler::*wxAuiNotebookEventFunction
)(wxAuiNotebookEvent
&);
714 #define wxAuiNotebookEventHandler(func) \
715 wxEVENT_HANDLER_CAST(wxAuiNotebookEventFunction, func)
717 #define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
718 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
719 #define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \
720 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn))
721 #define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
722 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn))
723 #define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \
724 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn))
725 #define EVT_AUINOTEBOOK_BUTTON(winid, fn) \
726 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn))
727 #define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \
728 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn))
729 #define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \
730 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn))
731 #define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \
732 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn))
733 #define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
734 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
735 #define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \
736 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn))
737 #define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
738 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
739 #define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
740 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
741 #define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
742 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
743 #define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
744 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
745 #define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \
746 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn))
749 // wxpython/swig event work
750 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE
;
751 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED
;
752 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
;
753 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING
;
754 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON
;
755 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG
;
756 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG
;
757 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION
;
758 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND
;
759 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE
;
760 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN
;
761 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP
;
762 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN
;
763 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP
;
764 %constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK
;
767 EVT_AUINOTEBOOK_PAGE_CLOSE
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE
, 1 )
768 EVT_AUINOTEBOOK_PAGE_CLOSED
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED
, 1 )
769 EVT_AUINOTEBOOK_PAGE_CHANGED
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
, 1 )
770 EVT_AUINOTEBOOK_PAGE_CHANGING
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING
, 1 )
771 EVT_AUINOTEBOOK_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON
, 1 )
772 EVT_AUINOTEBOOK_BEGIN_DRAG
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG
, 1 )
773 EVT_AUINOTEBOOK_END_DRAG
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG
, 1 )
774 EVT_AUINOTEBOOK_DRAG_MOTION
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION
, 1 )
775 EVT_AUINOTEBOOK_ALLOW_DND
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND
, 1 )
776 EVT_AUINOTEBOOK_DRAG_DONE
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE
, 1 )
777 EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN
, 1 )
778 EVT__AUINOTEBOOK_TAB_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP
, 1 )
779 EVT__AUINOTEBOOK_TAB_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN
, 1 )
780 EVT__AUINOTEBOOK_TAB_RIGHT_UP
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP
, 1 )
781 EVT_AUINOTEBOOK_BG_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK
, 1 )
787 #endif // _WX_AUINOTEBOOK_H_