]> git.saurik.com Git - wxWidgets.git/blame - include/wx/aui/auibook.h
fix wxBitmapComboBox Gtk-CRITICAL assertion `GTK_IS_ENTRY (entry)' failed
[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
005b12d8
VZ
292 virtual size_t GetPageCount() const;
293 virtual wxWindow* GetPage(size_t pageIdx) const;
9a29fe70 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 // Shows the window menu
331 bool ShowWindowMenu();
332
333 // we do have multiple pages
334 virtual bool HasMultiplePages() const { return true; }
335
336 // we don't want focus for ourselves
c7bfb76a 337 // virtual bool AcceptsFocus() const { return false; }
a0c2e4a0 338
873ff54b
SL
339 //wxBookCtrlBase functions
340
341 virtual void SetPageSize (const wxSize &size);
342 virtual int HitTest (const wxPoint &pt, long *flags=NULL) const;
343
344 virtual int GetPageImage(size_t n) const;
345 virtual bool SetPageImage(size_t n, int imageId);
346
873ff54b
SL
347 virtual int ChangeSelection(size_t n);
348
349 virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
350 int imageId);
351 virtual bool DeleteAllPages();
352 virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
3b7e7e24 353 bool select, int imageId);
873ff54b 354
a3219eea 355protected:
90230407
VZ
356 // Common part of all ctors.
357 void Init();
358
dc797d8e
JS
359 // choose the default border for this window
360 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
4444d148 361
c52f18df
VZ
362 // Redo sizing after thawing
363 virtual void DoThaw();
364
2b9aac33 365 // these can be overridden
4026f044
VZ
366
367 // update the height, return true if it was done or false if the new height
368 // calculated by CalculateTabCtrlHeight() is the same as the old one
369 virtual bool UpdateTabCtrlHeight();
370
2b9aac33 371 virtual int CalculateTabCtrlHeight();
9fbb7d80 372 virtual wxSize CalculateNewSplitSize();
a56a1234 373
873ff54b
SL
374 // remove the page and return a pointer to it
375 virtual wxWindow *DoRemovePage(size_t WXUNUSED(page)) { return NULL; }
376
377 //A general selection function
378 virtual int DoModifySelection(size_t n, bool events);
379
2b9aac33
BW
380protected:
381
382 void DoSizing();
383 void InitNotebook(long style);
a3219eea 384 wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
9a29fe70 385 wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl);
a3219eea
BW
386 wxAuiTabCtrl* GetActiveTabCtrl();
387 bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
388 void RemoveEmptyTabFrames();
9fbb7d80 389 void UpdateHintWindowSize();
a56a1234 390
a3219eea
BW
391protected:
392
5bf3f27f 393 void OnChildFocusNotebook(wxChildFocusEvent& evt);
a3a5df9d 394 void OnRender(wxAuiManagerEvent& evt);
a3219eea 395 void OnSize(wxSizeEvent& evt);
3c778901
VZ
396 void OnTabClicked(wxAuiNotebookEvent& evt);
397 void OnTabBeginDrag(wxAuiNotebookEvent& evt);
398 void OnTabDragMotion(wxAuiNotebookEvent& evt);
399 void OnTabEndDrag(wxAuiNotebookEvent& evt);
2bd82d72 400 void OnTabCancelDrag(wxAuiNotebookEvent& evt);
3c778901
VZ
401 void OnTabButton(wxAuiNotebookEvent& evt);
402 void OnTabMiddleDown(wxAuiNotebookEvent& evt);
403 void OnTabMiddleUp(wxAuiNotebookEvent& evt);
404 void OnTabRightDown(wxAuiNotebookEvent& evt);
405 void OnTabRightUp(wxAuiNotebookEvent& evt);
406 void OnTabBgDClick(wxAuiNotebookEvent& evt);
5bf3f27f 407 void OnNavigationKeyNotebook(wxNavigationKeyEvent& event);
a56a1234 408
849c353a
VZ
409 // set selection to the given window (which must be non-NULL and be one of
410 // our pages, otherwise an assert is raised)
411 void SetSelectionToWindow(wxWindow *win);
412 void SetSelectionToPage(const wxAuiNotebookPage& page)
413 {
414 SetSelectionToWindow(page.window);
415 }
416
a3219eea
BW
417protected:
418
a3a5df9d 419 wxAuiManager m_mgr;
a3219eea 420 wxAuiTabContainer m_tabs;
9a29fe70
VZ
421 int m_curPage;
422 int m_tabIdCounter;
423 wxWindow* m_dummyWnd;
4444d148 424
9a29fe70
VZ
425 wxSize m_requestedBmpSize;
426 int m_requestedTabCtrlHeight;
427 wxFont m_selectedFont;
428 wxFont m_normalFont;
429 int m_tabCtrlHeight;
a56a1234 430
9a29fe70 431 int m_lastDragX;
702b1c7e 432 unsigned int m_flags;
4444d148 433
d91fa282 434#ifndef SWIG
0ce53f32 435 DECLARE_CLASS(wxAuiNotebook)
a3219eea 436 DECLARE_EVENT_TABLE()
d91fa282 437#endif
a3219eea
BW
438};
439
440
441
442
443// wx event machinery
444
445#ifndef SWIG
446
9b11752c
VZ
447wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent);
448wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent);
449wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent);
450wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent);
451wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent);
452wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent);
453wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent);
454wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent);
455wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent);
456wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent);
457wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent);
458wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent);
459wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent);
460wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent);
461wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent);
a3219eea
BW
462
463typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
464
465#define wxAuiNotebookEventHandler(func) \
3c778901 466 wxEVENT_HANDLER_CAST(wxAuiNotebookEventFunction, func)
a56a1234 467
3fd8c988
BW
468#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
469 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
134198f1
JS
470#define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \
471 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn))
a3219eea
BW
472#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
473 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn))
474#define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \
475 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn))
4953f8cf 476#define EVT_AUINOTEBOOK_BUTTON(winid, fn) \
a3219eea
BW
477 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn))
478#define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \
479 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn))
480#define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \
481 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn))
482#define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \
483 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn))
5d3aeb0f
BW
484#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
485 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
134198f1
JS
486#define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \
487 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn))
69f5e420
BW
488#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
489 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
490#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
491 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
492#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
493 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
494#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
495 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
134198f1
JS
496#define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \
497 wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn))
a3219eea
BW
498#else
499
500// wxpython/swig event work
3fd8c988 501%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE;
134198f1 502%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED;
d91fa282
RD
503%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED;
504%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING;
505%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON;
506%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG;
507%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG;
508%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION;
5d3aeb0f 509%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND;
134198f1 510%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE;
4309ed17
RD
511%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN;
512%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP;
513%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN;
514%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP;
134198f1 515%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK;
4309ed17 516
d91fa282 517%pythoncode {
3fd8c988 518 EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 1 )
134198f1 519 EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 1 )
d91fa282
RD
520 EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 1 )
521 EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 1 )
522 EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 1 )
523 EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 1 )
524 EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 1 )
4444d148 525 EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 1 )
5d3aeb0f 526 EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 1 )
134198f1 527 EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 1 )
4309ed17
RD
528 EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 )
529 EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 1 )
530 EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 )
531 EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 1 )
134198f1 532 EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 1 )
d91fa282 533}
a3219eea
BW
534#endif
535
536
537#endif // wxUSE_AUI
538#endif // _WX_AUINOTEBOOK_H_