]> git.saurik.com Git - wxWidgets.git/blame - include/wx/aui/auibook.h
removing unnecessary - and incorrect - override, fixes #14319
[wxWidgets.git] / include / wx / aui / auibook.h
CommitLineData
c7bfb76a 1//////////////////////////////////////////////////////////////////////////////
4444d148 2// Name: wx/aui/auibook.h
a3219eea
BW
3// Purpose: wxaui: wx advanced user interface - notebook
4// Author: Benjamin I. Williams
4758baf5 5// Modified by: Jens Lody
a3219eea
BW
6// Created: 2006-06-28
7// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
8// Licence: wxWindows Library Licence, Version 3.1
9///////////////////////////////////////////////////////////////////////////////
10
11
12
13#ifndef _WX_AUINOTEBOOK_H_
14#define _WX_AUINOTEBOOK_H_
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20#include "wx/defs.h"
a3219eea
BW
21
22#if wxUSE_AUI
23
4758baf5 24#include "wx/aui/tabart.h"
4444d148 25#include "wx/aui/framemanager.h"
873ff54b 26#include "wx/bookctrl.h"
25d7cf54 27#include "wx/containr.h"
a3219eea
BW
28
29
5d3aeb0f
BW
30class wxAuiNotebook;
31
702b1c7e
BW
32
33enum wxAuiNotebookOption
34{
35 wxAUI_NB_TOP = 1 << 0,
36 wxAUI_NB_LEFT = 1 << 1, // not implemented yet
37 wxAUI_NB_RIGHT = 1 << 2, // not implemented yet
134198f1 38 wxAUI_NB_BOTTOM = 1 << 3,
702b1c7e
BW
39 wxAUI_NB_TAB_SPLIT = 1 << 4,
40 wxAUI_NB_TAB_MOVE = 1 << 5,
5d3aeb0f 41 wxAUI_NB_TAB_EXTERNAL_MOVE = 1 << 6,
b0d17f7c
BW
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,
69f5e420 48 wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
a56a1234 49
702b1c7e
BW
50 wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
51 wxAUI_NB_TAB_SPLIT |
52 wxAUI_NB_TAB_MOVE |
41b76acd 53 wxAUI_NB_SCROLL_BUTTONS |
69f5e420
BW
54 wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
55 wxAUI_NB_MIDDLE_CLICK_CLOSE
702b1c7e
BW
56};
57
3f69756e
BW
58
59
702b1c7e 60
2b9aac33
BW
61// aui notebook event class
62
873ff54b 63class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxBookCtrlEvent
2b9aac33
BW
64{
65public:
9a29fe70
VZ
66 wxAuiNotebookEvent(wxEventType commandType = wxEVT_NULL,
67 int winId = 0)
68 : wxBookCtrlEvent(commandType, winId)
2b9aac33 69 {
9a29fe70 70 m_dragSource = NULL;
2b9aac33
BW
71 }
72#ifndef SWIG
873ff54b 73 wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c)
2b9aac33 74 {
9a29fe70 75 m_dragSource = c.m_dragSource;
2b9aac33
BW
76 }
77#endif
78 wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
79
9a29fe70
VZ
80 void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; }
81 wxAuiNotebook* GetDragSource() const { return m_dragSource; }
2b9aac33 82
9a29fe70
VZ
83private:
84 wxAuiNotebook* m_dragSource;
2b9aac33
BW
85
86#ifndef SWIG
87private:
88 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiNotebookEvent)
89#endif
90};
91
92
93class WXDLLIMPEXP_AUI wxAuiNotebookPage
94{
95public:
96 wxWindow* window; // page's associated window
97 wxString caption; // caption displayed on the tab
11527fc9 98 wxString tooltip; // tooltip displayed when hovering over tab title
2b9aac33
BW
99 wxBitmap bitmap; // tab's bitmap
100 wxRect rect; // tab's hit rectangle
101 bool active; // true if the page is currently active
102};
103
104class WXDLLIMPEXP_AUI wxAuiTabContainerButton
105{
106public:
107
108 int id; // button's id
9a29fe70 109 int curState; // current state (normal, hover, pressed, etc.)
2b9aac33
BW
110 int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
111 wxBitmap bitmap; // button's hover bitmap
9a29fe70 112 wxBitmap disBitmap; // button's disabled bitmap
2b9aac33
BW
113 wxRect rect; // button's hit rectangle
114};
115
116
117#ifndef SWIG
118WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiNotebookPage, wxAuiNotebookPageArray, WXDLLIMPEXP_AUI);
119WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton, wxAuiTabContainerButtonArray, WXDLLIMPEXP_AUI);
120#endif
121
122
a3219eea
BW
123class WXDLLIMPEXP_AUI wxAuiTabContainer
124{
125public:
126
127 wxAuiTabContainer();
9fabaac4 128 virtual ~wxAuiTabContainer();
a3219eea 129
a3a5df9d 130 void SetArtProvider(wxAuiTabArt* art);
e0dc13d4 131 wxAuiTabArt* GetArtProvider() const;
3f69756e 132
702b1c7e
BW
133 void SetFlags(unsigned int flags);
134 unsigned int GetFlags() const;
135
a3219eea
BW
136 bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
137 bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
9a29fe70 138 bool MovePage(wxWindow* page, size_t newIdx);
a3219eea
BW
139 bool RemovePage(wxWindow* page);
140 bool SetActivePage(wxWindow* page);
141 bool SetActivePage(size_t page);
142 void SetNoneActive();
143 int GetActivePage() const;
144 bool TabHitTest(int x, int y, wxWindow** hit) const;
145 bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const;
146 wxWindow* GetWindowFromIdx(size_t idx) const;
147 int GetIdxFromWindow(wxWindow* page) const;
148 size_t GetPageCount() const;
149 wxAuiNotebookPage& GetPage(size_t idx);
c3e016e4 150 const wxAuiNotebookPage& GetPage(size_t idx) const;
a3219eea 151 wxAuiNotebookPageArray& GetPages();
9a29fe70
VZ
152 void SetNormalFont(const wxFont& normalFont);
153 void SetSelectedFont(const wxFont& selectedFont);
154 void SetMeasuringFont(const wxFont& measuringFont);
ceb9b8db
VZ
155 void SetColour(const wxColour& colour);
156 void SetActiveColour(const wxColour& colour);
a3219eea
BW
157 void DoShowHide();
158 void SetRect(const wxRect& rect);
a56a1234 159
41b76acd 160 void RemoveButton(int id);
4953f8cf
BW
161 void AddButton(int id,
162 int location,
9a29fe70
VZ
163 const wxBitmap& normalBitmap = wxNullBitmap,
164 const wxBitmap& disabledBitmap = wxNullBitmap);
4444d148 165
4953f8cf
BW
166 size_t GetTabOffset() const;
167 void SetTabOffset(size_t offset);
a56a1234 168
a0c2e4a0
JS
169 // Is the tab visible?
170 bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd);
171
172 // Make the tab visible if it wasn't already
173 void MakeTabVisible(int tabPage, wxWindow* win);
174
a3219eea
BW
175protected:
176
01372b8f 177 virtual void Render(wxDC* dc, wxWindow* wnd);
a3219eea 178
01372b8f 179protected:
a3219eea 180
a3a5df9d 181 wxAuiTabArt* m_art;
a3219eea
BW
182 wxAuiNotebookPageArray m_pages;
183 wxAuiTabContainerButtonArray m_buttons;
9a29fe70 184 wxAuiTabContainerButtonArray m_tabCloseButtons;
a3219eea 185 wxRect m_rect;
9a29fe70 186 size_t m_tabOffset;
702b1c7e 187 unsigned int m_flags;
a3219eea
BW
188};
189
190
191
192class WXDLLIMPEXP_AUI wxAuiTabCtrl : public wxControl,
193 public wxAuiTabContainer
194{
195public:
196
197 wxAuiTabCtrl(wxWindow* parent,
d91fa282 198 wxWindowID id = wxID_ANY,
a3219eea
BW
199 const wxPoint& pos = wxDefaultPosition,
200 const wxSize& size = wxDefaultSize,
201 long style = 0);
4444d148 202
26da5e4f 203 ~wxAuiTabCtrl();
a56a1234 204
9a29fe70 205 bool IsDragging() const { return m_isDragging; }
d16619f8 206
a3219eea 207protected:
dc797d8e
JS
208 // choose the default border for this window
209 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
a3219eea
BW
210
211 void OnPaint(wxPaintEvent& evt);
212 void OnEraseBackground(wxEraseEvent& evt);
213 void OnSize(wxSizeEvent& evt);
214 void OnLeftDown(wxMouseEvent& evt);
134198f1 215 void OnLeftDClick(wxMouseEvent& evt);
a3219eea 216 void OnLeftUp(wxMouseEvent& evt);
69f5e420
BW
217 void OnMiddleDown(wxMouseEvent& evt);
218 void OnMiddleUp(wxMouseEvent& evt);
219 void OnRightDown(wxMouseEvent& evt);
220 void OnRightUp(wxMouseEvent& evt);
a3219eea
BW
221 void OnMotion(wxMouseEvent& evt);
222 void OnLeaveWindow(wxMouseEvent& evt);
4953f8cf 223 void OnButton(wxAuiNotebookEvent& evt);
a0c2e4a0
JS
224 void OnSetFocus(wxFocusEvent& event);
225 void OnKillFocus(wxFocusEvent& event);
226 void OnChar(wxKeyEvent& event);
45ca0e77 227 void OnCaptureLost(wxMouseCaptureLostEvent& evt);
a56a1234 228
a3219eea 229protected:
4444d148 230
9a29fe70
VZ
231 wxPoint m_clickPt;
232 wxWindow* m_clickTab;
233 bool m_isDragging;
234 wxAuiTabContainerButton* m_hoverButton;
235 wxAuiTabContainerButton* m_pressedButton;
a3219eea 236
d91fa282 237#ifndef SWIG
5d3aeb0f 238 DECLARE_CLASS(wxAuiTabCtrl)
a3219eea 239 DECLARE_EVENT_TABLE()
d91fa282 240#endif
a3219eea
BW
241};
242
243
244
245
873ff54b 246class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxBookCtrlBase>
a3219eea
BW
247{
248
249public:
250
90230407 251 wxAuiNotebook() { Init(); }
4444d148 252
a3a5df9d 253 wxAuiNotebook(wxWindow* parent,
0ce53f32
BW
254 wxWindowID id = wxID_ANY,
255 const wxPoint& pos = wxDefaultPosition,
256 const wxSize& size = wxDefaultSize,
90230407
VZ
257 long style = wxAUI_NB_DEFAULT_STYLE)
258 {
259 Init();
260 Create(parent, id, pos, size, style);
261 }
4444d148 262
a3a5df9d 263 virtual ~wxAuiNotebook();
a3219eea
BW
264
265 bool Create(wxWindow* parent,
d91fa282 266 wxWindowID id = wxID_ANY,
a3219eea
BW
267 const wxPoint& pos = wxDefaultPosition,
268 const wxSize& size = wxDefaultSize,
4444d148 269 long style = 0);
a56a1234 270
d606b6e9
BW
271 void SetWindowStyleFlag(long style);
272 void SetArtProvider(wxAuiTabArt* art);
273 wxAuiTabArt* GetArtProvider() const;
a56a1234 274
d606b6e9
BW
275 virtual void SetUniformBitmapSize(const wxSize& size);
276 virtual void SetTabCtrlHeight(int height);
a56a1234 277
a3219eea
BW
278 bool AddPage(wxWindow* page,
279 const wxString& caption,
280 bool select = false,
281 const wxBitmap& bitmap = wxNullBitmap);
4444d148 282
9a29fe70 283 bool InsertPage(size_t pageIdx,
a3219eea
BW
284 wxWindow* page,
285 const wxString& caption,
286 bool select = false,
287 const wxBitmap& bitmap = wxNullBitmap);
4444d148 288
a3219eea
BW
289 bool DeletePage(size_t page);
290 bool RemovePage(size_t page);
a56a1234 291
d606b6e9 292 size_t GetPageCount() const;
9a29fe70
VZ
293 wxWindow* GetPage(size_t pageIdx) const;
294 int GetPageIndex(wxWindow* pageWnd) const;
4444d148 295
a3219eea 296 bool SetPageText(size_t page, const wxString& text);
9a29fe70 297 wxString GetPageText(size_t pageIdx) const;
c3e016e4 298
11527fc9
VZ
299 bool SetPageToolTip(size_t page, const wxString& text);
300 wxString GetPageToolTip(size_t pageIdx) const;
301
e0dc13d4 302 bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
9a29fe70 303 wxBitmap GetPageBitmap(size_t pageIdx) const;
c3e016e4 304
9a29fe70 305 int SetSelection(size_t newPage);
a3219eea 306 int GetSelection() const;
c3e016e4 307
d606b6e9 308 virtual void Split(size_t page, int direction);
0eaf8cd1 309
0eaf8cd1 310 const wxAuiManager& GetAuiManager() const { return m_mgr; }
0eaf8cd1 311
98d9f577
JS
312 // Sets the normal font
313 void SetNormalFont(const wxFont& font);
fc17828a 314
98d9f577
JS
315 // Sets the selected tab font
316 void SetSelectedFont(const wxFont& font);
fc17828a 317
98d9f577
JS
318 // Sets the measuring font
319 void SetMeasuringFont(const wxFont& font);
fc17828a 320
98d9f577 321 // Sets the tab font
fc17828a
JS
322 virtual bool SetFont(const wxFont& font);
323
98d9f577 324 // Gets the tab control height
fc17828a
JS
325 int GetTabCtrlHeight() const;
326
327 // Gets the height of the notebook for a given page height
328 int GetHeightForPageHeight(int pageHeight);
329
a0c2e4a0
JS
330 // Advances the selection, generation page selection events
331 void AdvanceSelection(bool forward = true);
332
333 // Shows the window menu
334 bool ShowWindowMenu();
335
336 // we do have multiple pages
337 virtual bool HasMultiplePages() const { return true; }
338
339 // we don't want focus for ourselves
c7bfb76a 340 // virtual bool AcceptsFocus() const { return false; }
a0c2e4a0 341
873ff54b
SL
342 //wxBookCtrlBase functions
343
344 virtual void SetPageSize (const wxSize &size);
345 virtual int HitTest (const wxPoint &pt, long *flags=NULL) const;
346
347 virtual int GetPageImage(size_t n) const;
348 virtual bool SetPageImage(size_t n, int imageId);
349
350 wxWindow* GetCurrentPage () const;
351
352 virtual int ChangeSelection(size_t n);
353
354 virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
355 int imageId);
356 virtual bool DeleteAllPages();
357 virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
3b7e7e24 358 bool select, int imageId);
873ff54b 359
a3219eea 360protected:
90230407
VZ
361 // Common part of all ctors.
362 void Init();
363
dc797d8e
JS
364 // choose the default border for this window
365 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
4444d148 366
c52f18df
VZ
367 // Redo sizing after thawing
368 virtual void DoThaw();
369
2b9aac33 370 // these can be overridden
4026f044
VZ
371
372 // update the height, return true if it was done or false if the new height
373 // calculated by CalculateTabCtrlHeight() is the same as the old one
374 virtual bool UpdateTabCtrlHeight();
375
2b9aac33 376 virtual int CalculateTabCtrlHeight();
9fbb7d80 377 virtual wxSize CalculateNewSplitSize();
a56a1234 378
873ff54b
SL
379 // remove the page and return a pointer to it
380 virtual wxWindow *DoRemovePage(size_t WXUNUSED(page)) { return NULL; }
381
382 //A general selection function
383 virtual int DoModifySelection(size_t n, bool events);
384
2b9aac33
BW
385protected:
386
387 void DoSizing();
388 void InitNotebook(long style);
a3219eea 389 wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
9a29fe70 390 wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl);
a3219eea
BW
391 wxAuiTabCtrl* GetActiveTabCtrl();
392 bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
393 void RemoveEmptyTabFrames();
9fbb7d80 394 void UpdateHintWindowSize();
a56a1234 395
a3219eea
BW
396protected:
397
5bf3f27f 398 void OnChildFocusNotebook(wxChildFocusEvent& evt);
a3a5df9d 399 void OnRender(wxAuiManagerEvent& evt);
a3219eea 400 void OnSize(wxSizeEvent& evt);
3c778901
VZ
401 void OnTabClicked(wxAuiNotebookEvent& evt);
402 void OnTabBeginDrag(wxAuiNotebookEvent& evt);
403 void OnTabDragMotion(wxAuiNotebookEvent& evt);
404 void OnTabEndDrag(wxAuiNotebookEvent& evt);
2bd82d72 405 void OnTabCancelDrag(wxAuiNotebookEvent& evt);
3c778901
VZ
406 void OnTabButton(wxAuiNotebookEvent& evt);
407 void OnTabMiddleDown(wxAuiNotebookEvent& evt);
408 void OnTabMiddleUp(wxAuiNotebookEvent& evt);
409 void OnTabRightDown(wxAuiNotebookEvent& evt);
410 void OnTabRightUp(wxAuiNotebookEvent& evt);
411 void OnTabBgDClick(wxAuiNotebookEvent& evt);
5bf3f27f 412 void OnNavigationKeyNotebook(wxNavigationKeyEvent& event);
a56a1234 413
849c353a
VZ
414 // set selection to the given window (which must be non-NULL and be one of
415 // our pages, otherwise an assert is raised)
416 void SetSelectionToWindow(wxWindow *win);
417 void SetSelectionToPage(const wxAuiNotebookPage& page)
418 {
419 SetSelectionToWindow(page.window);
420 }
421
a3219eea
BW
422protected:
423
a3a5df9d 424 wxAuiManager m_mgr;
a3219eea 425 wxAuiTabContainer m_tabs;
9a29fe70
VZ
426 int m_curPage;
427 int m_tabIdCounter;
428 wxWindow* m_dummyWnd;
4444d148 429
9a29fe70
VZ
430 wxSize m_requestedBmpSize;
431 int m_requestedTabCtrlHeight;
432 wxFont m_selectedFont;
433 wxFont m_normalFont;
434 int m_tabCtrlHeight;
a56a1234 435
9a29fe70 436 int m_lastDragX;
702b1c7e 437 unsigned int m_flags;
4444d148 438
d91fa282 439#ifndef SWIG
0ce53f32 440 DECLARE_CLASS(wxAuiNotebook)
a3219eea 441 DECLARE_EVENT_TABLE()
d91fa282 442#endif
a3219eea
BW
443};
444
445
446
447
448// wx event machinery
449
450#ifndef SWIG
451
9b11752c
VZ
452wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent);
453wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent);
454wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent);
455wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent);
456wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent);
457wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent);
458wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent);
459wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent);
460wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent);
461wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent);
462wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent);
463wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent);
464wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent);
465wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent);
466wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent);
a3219eea
BW
467
468typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
469
470#define wxAuiNotebookEventHandler(func) \
3c778901 471 wxEVENT_HANDLER_CAST(wxAuiNotebookEventFunction, func)
a56a1234 472
3fd8c988
BW
473#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
474 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
134198f1
JS
475#define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \
476 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn))
a3219eea
BW
477#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
478 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn))
479#define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \
480 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn))
4953f8cf 481#define EVT_AUINOTEBOOK_BUTTON(winid, fn) \
a3219eea
BW
482 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn))
483#define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \
484 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn))
485#define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \
486 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn))
487#define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \
488 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn))
5d3aeb0f
BW
489#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
490 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
134198f1
JS
491#define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \
492 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn))
69f5e420
BW
493#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
494 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
495#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
496 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
497#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
498 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
499#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
500 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
134198f1
JS
501#define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \
502 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn))
a3219eea
BW
503#else
504
505// wxpython/swig event work
3fd8c988 506%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE;
134198f1 507%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED;
d91fa282
RD
508%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED;
509%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING;
510%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON;
511%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG;
512%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG;
513%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION;
5d3aeb0f 514%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND;
134198f1 515%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE;
4309ed17
RD
516%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN;
517%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP;
518%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN;
519%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP;
134198f1 520%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK;
4309ed17 521
d91fa282 522%pythoncode {
3fd8c988 523 EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 1 )
134198f1 524 EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 1 )
d91fa282
RD
525 EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 1 )
526 EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 1 )
527 EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 1 )
528 EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 1 )
529 EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 1 )
4444d148 530 EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 1 )
5d3aeb0f 531 EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 1 )
134198f1 532 EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 1 )
4309ed17
RD
533 EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 )
534 EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 1 )
535 EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 )
536 EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 1 )
134198f1 537 EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 1 )
d91fa282 538}
a3219eea
BW
539#endif
540
541
542#endif // wxUSE_AUI
543#endif // _WX_AUINOTEBOOK_H_