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