1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Wrappers for the wxAUI classes.
7 // Created: 5-July-2006
9 // Copyright: (c) 2006 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
14 "The wx.aui module is an Advanced User Interface library that aims to
15 implement \"cutting-edge\" interface usability and design features so
16 developers can quickly and easily create beautiful and usable
17 application interfaces.
19 **Vision and Design Principles**
21 wx.aui attempts to encapsulate the following aspects of the user
24 * Frame Management: Frame management provides the means to open,
25 move and hide common controls that are needed to interact with the
26 document, and allow these configurations to be saved into
27 different perspectives and loaded at a later time.
29 * Toolbars: Toolbars are a specialized subset of the frame
30 management system and should behave similarly to other docked
31 components. However, they also require additional functionality,
32 such as \"spring-loaded\" rebar support, \"chevron\" buttons and
33 end-user customizability.
35 * Modeless Controls: Modeless controls expose a tool palette or set
36 of options that float above the application content while allowing
37 it to be accessed. Usually accessed by the toolbar, these controls
38 disappear when an option is selected, but may also be \"torn off\"
39 the toolbar into a floating frame of their own.
41 * Look and Feel: Look and feel encompasses the way controls are
42 drawn, both when shown statically as well as when they are being
43 moved. This aspect of user interface design incorporates \"special
44 effects\" such as transparent window dragging as well as frame
47 **wx.aui adheres to the following principles**
49 - Use native floating frames to obtain a native look and feel for
52 - Use existing wxPython code where possible, such as sizer
53 implementation for frame management;
55 - Use standard wxPython coding conventions.
60 The following example shows a simple implementation that utilizes
61 `wx.aui.AuiManager` to manage three text controls in a frame window::
66 class MyFrame(wx.Frame):
68 def __init__(self, parent, id=-1, title='wx.aui Test',
69 size=(800, 600), style=wx.DEFAULT_FRAME_STYLE):
70 wx.Frame.__init__(self, parent, id, title, pos, size, style)
72 self._mgr = wx.aui.AuiManager(self)
74 # create several text controls
75 text1 = wx.TextCtrl(self, -1, 'Pane 1 - sample text',
76 wx.DefaultPosition, wx.Size(200,150),
77 wx.NO_BORDER | wx.TE_MULTILINE)
79 text2 = wx.TextCtrl(self, -1, 'Pane 2 - sample text',
80 wx.DefaultPosition, wx.Size(200,150),
81 wx.NO_BORDER | wx.TE_MULTILINE)
83 text3 = wx.TextCtrl(self, -1, 'Main content window',
84 wx.DefaultPosition, wx.Size(200,150),
85 wx.NO_BORDER | wx.TE_MULTILINE)
87 # add the panes to the manager
88 self._mgr.AddPane(text1, wx.LEFT, 'Pane Number One')
89 self._mgr.AddPane(text2, wx.BOTTOM, 'Pane Number Two')
90 self._mgr.AddPane(text3, wx.CENTER)
92 # tell the manager to 'commit' all the changes just made
95 self.Bind(wx.EVT_CLOSE, self.OnClose)
98 def OnClose(self, event):
99 # deinitialize the frame manager
106 frame = MyFrame(None)
114 %module(package="wx", docstring=DOCSTRING) aui
117 #include "wx/wxPython/wxPython.h"
118 #include "wx/wxPython/pyclasses.h"
119 #include <wx/aui/aui.h>
122 //---------------------------------------------------------------------------
127 %pythoncode { wx = _core }
128 %pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
131 %include _aui_docstrings.i
133 //---------------------------------------------------------------------------
135 // Preprocessor stuff so SWIG doesn't get confused when %include-ing
139 %ignore wxABI_VERSION;
141 #define wxUSE_MENUS 1
142 #define wxABI_VERSION 99999
144 #define WXDLLIMPEXP_AUI
146 #define wxDEPRECATED(decl)
147 #define DECLARE_EVENT_TABLE()
148 #define DECLARE_DYNAMIC_CLASS(foo)
152 // We'll skip making wrappers for these, they have overloads that take a
154 %ignore wxAuiPaneInfo::MaxSize(int x, int y);
155 %ignore wxAuiPaneInfo::MinSize(int x, int y);
156 %ignore wxAuiPaneInfo::BestSize(int x, int y);
157 %ignore wxAuiPaneInfo::FloatingPosition(int x, int y);
158 %ignore wxAuiPaneInfo::FloatingSize(int x, int y);
160 // But for these we will do the overloading (see %pythoncode below) so let's
161 // rename the C++ versions
162 %rename(_GetPaneByWidget) wxAuiManager::GetPane(wxWindow* window);
163 %rename(_GetPaneByName) wxAuiManager::GetPane(const wxString& name);
165 %rename(_AddPane1) wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info);
166 %rename(_AddPane2) wxAuiManager::AddPane(wxWindow* window, int direction = wxLEFT,
167 const wxString& caption = wxEmptyString);
169 %rename(AddPaneAtPos) wxAuiManager::AddPane(wxWindow* window,
170 const wxPaneInfo& pane_info,
171 const wxPoint& drop_pos);
173 // A typemap for the return value of wxAuiManager::GetAllPanes
174 %typemap(out) wxAuiPaneInfoArray& {
175 $result = PyList_New(0);
176 for (size_t i=0; i < $1->GetCount(); i++) {
177 PyObject* pane_obj = SWIG_NewPointerObj((void*)(&$1->Item(i)), SWIGTYPE_p_wxAuiPaneInfo, 0);
178 PyList_Append($result, pane_obj);
182 //%ignore wxAuiManager::~wxAuiManager;
184 %nokwargs wxAuiTabContainer::SetActivePage;
186 %pythonAppend wxAuiTabCtrl::wxAuiTabCtrl "self._setOORInfo(self)";
188 %pythonAppend wxAuiNotebook::wxAuiNotebook "self._setOORInfo(self)";
189 %pythonAppend wxAuiNotebook::wxAuiNotebook() "val._setOORInfo(val)";
190 %ignore wxAuiiNotebook::~wxAuiNotebook;
191 %rename(PreAuiNotebook) wxAuiNotebook::wxAuiNotebook();
194 %ignore wxAuiDefaultTabArt::SetWindow;
196 // ignore this overload
197 %ignore wxAuiTabContainer::GetPage(size_t idx) const;
201 %pythonAppend wxAuiMDIParentFrame::wxAuiMDIParentFrame "self._setOORInfo(self)";
202 %pythonAppend wxAuiMDIParentFrame::wxAuiMDIParentFrame() "val._setOORInfo(val)";
203 %ignore wxAuiMDIParentFrame::~wxAuiMDIParentFrame;
204 %rename(PreAuiMDIParentFrame) wxAuiMDIParentFrame::wxAuiMDIParentFrame();
206 // Ignore these for now because they need a typemap for the return value, see below.
207 %ignore wxAuiMDIParentFrame::GetNotebook;
208 %ignore wxAuiMDIParentFrame::GetActiveChild;
209 %ignore wxAuiMDIParentFrame::GetClientWindow;
211 %pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame "self._setOORInfo(self)";
212 %pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame() "val._setOORInfo(val)";
213 %ignore wxAuiMDIChildFrame::~wxAuiMDIChildFrame;
214 %rename(PreAuiMDIChildFrame) wxAuiMDIChildFrame::wxAuiMDIChildFrame();
216 %pythonAppend wxAuiMDIClientWindow::wxAuiMDIClientWindow "self._setOORInfo(self)";
217 %pythonAppend wxAuiMDIClientWindow::wxAuiMDIClientWindow() "val._setOORInfo(val)";
218 %ignore wxAuiMDIClientWindow::~wxAuiMDIClientWindow;
219 %rename(PreAuiMDIClientWindow) wxAuiMDIClientWindow::wxAuiMDIClientWindow();
222 %typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); }
224 //---------------------------------------------------------------------------
225 // Get all our defs from the REAL header files.
227 #define wxColor wxColour // fix problem in dockart.h
229 %include framemanager.h
237 //---------------------------------------------------------------------------
238 // Methods to inject into the AuiManager class that will sort out calls to
239 // the overloaded versions of GetPane and AddPane
241 %extend wxAuiManager {
243 def GetPane(self, item):
245 GetPane(self, window_or_info item) -> PaneInfo
247 GetPane is used to search for a `PaneInfo` object either by
248 widget reference or by pane name, which acts as a unique id
249 for a window pane. The returned `PaneInfo` object may then be
250 modified to change a pane's look, state or position. After one
251 or more modifications to the `PaneInfo`, `AuiManager.Update`
252 should be called to realize the changes to the user interface.
254 If the lookup failed (meaning the pane could not be found in
255 the manager) GetPane returns an empty `PaneInfo`, a condition
256 which can be checked by calling `PaneInfo.IsOk`.
258 if isinstance(item, wx.Window):
259 return self._GetPaneByWidget(item)
261 return self._GetPaneByName(item)
263 def AddPane(self, window, info=None, caption=None):
265 AddPane(self, window, info=None, caption=None) -> bool
267 AddPane tells the frame manager to start managing a child
268 window. There are two versions of this function. The first
269 verison accepts a `PaneInfo` object for the ``info`` parameter
270 and allows the full spectrum of pane parameter
271 possibilities. (Say that 3 times fast!)
273 The second version is used for simpler user interfaces which
274 do not require as much configuration. In this case the
275 ``info`` parameter specifies the direction property of the
276 pane info, and defaults to ``wx.LEFT``. The pane caption may
277 also be specified as an extra parameter in this form.
279 if type(info) == AuiPaneInfo:
280 return self._AddPane1(window, info)
287 return self._AddPane2(window, info, caption)
290 // For backwards compatibility
292 SetFrame = wx._deprecated(SetManagedWindow,
293 "SetFrame is deprecated, use `SetManagedWindow` instead.")
294 GetFrame = wx._deprecated(GetManagedWindow,
295 "GetFrame is deprecated, use `GetManagedWindow` instead.")
299 %extend wxAuiDockInfo {
303 %extend wxAuiDockUIPart {
304 ~wxAuiDockUIPart() {}
307 %extend wxAuiPaneButton {
308 ~wxAuiPaneButton() {}
311 %extend wxAuiMDIParentFrame {
312 %typemap(out) wxAuiNotebook* { $result = wxPyMake_wxObject($1, $owner); }
313 %typemap(out) wxAuiMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
314 %typemap(out) wxAuiMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
316 %rename(GetNotebook) _GetNotebook;
317 %rename(GetActiveChild) _GetActiveChild;
318 %rename(GetClientWindow) _GetClientWindow;
320 wxAuiNotebook* _GetNotebook() const
322 return self->GetNotebook();
325 wxAuiMDIChildFrame* _GetActiveChild() const
327 return self->GetActiveChild();
330 wxAuiMDIClientWindow* _GetClientWindow() const
332 return self->GetClientWindow();
335 %typemap(out) wxAuiNotebook*;
336 %typemap(out) wxAuiMDIChildFrame*;
337 %typemap(out) wxAuiMDIClientWindow*;
341 //---------------------------------------------------------------------------
344 // A wxDocArt class that knows how to forward virtuals to Python methods
345 class wxPyAuiDockArt : public wxAuiDefaultDockArt
348 wxPyAuiDockArt() : wxAuiDefaultDockArt() {}
350 DEC_PYCALLBACK_INT_INT(GetMetric);
351 DEC_PYCALLBACK_VOID_INTINT(SetMetric);
352 DEC_PYCALLBACK__INTFONT(SetFont);
353 DEC_PYCALLBACK_FONT_INT(GetFont);
354 DEC_PYCALLBACK_COLOUR_INT(GetColour);
355 DEC_PYCALLBACK__INTCOLOUR(SetColour);
357 virtual void DrawSash(wxDC& dc,
363 wxPyBlock_t blocked = wxPyBeginBlockThreads();
364 if ((found = wxPyCBH_findCallback(m_myInst, "DrawSash"))) {
365 PyObject* odc = wxPyMake_wxObject(&dc, false);
366 PyObject* owin = wxPyMake_wxObject(window, false);
367 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
368 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOiO)",
369 odc, owin, orientation, orect));
374 wxPyEndBlockThreads(blocked);
376 wxAuiDefaultDockArt::DrawSash(dc, window, orientation, rect);
379 virtual void DrawBackground(wxDC& dc,
385 wxPyBlock_t blocked = wxPyBeginBlockThreads();
386 if ((found = wxPyCBH_findCallback(m_myInst, "DrawBackground"))) {
387 PyObject* odc = wxPyMake_wxObject(&dc, false);
388 PyObject* owin = wxPyMake_wxObject(window, false);
389 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
390 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOiO)",
391 odc, owin, orientation, orect));
396 wxPyEndBlockThreads(blocked);
398 wxAuiDefaultDockArt::DrawBackground(dc, window, orientation, rect);
401 virtual void DrawCaption(wxDC& dc,
403 const wxString& text,
408 wxPyBlock_t blocked = wxPyBeginBlockThreads();
409 if ((found = wxPyCBH_findCallback(m_myInst, "DrawCaption"))) {
410 PyObject* odc = wxPyMake_wxObject(&dc, false);
411 PyObject* owin = wxPyMake_wxObject(window, false);
412 PyObject* otext = wx2PyString(text);
413 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
414 PyObject* opane = wxPyConstructObject((void*)&pane, wxT("wxAuiPaneInfo"), 0);
415 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOO)",
416 odc, owin, otext, orect, opane));
423 wxPyEndBlockThreads(blocked);
425 wxAuiDefaultDockArt::DrawCaption(dc, window, text, rect, pane);
428 virtual void DrawGripper(wxDC& dc,
434 wxPyBlock_t blocked = wxPyBeginBlockThreads();
435 if ((found = wxPyCBH_findCallback(m_myInst, "DrawGripper"))) {
436 PyObject* odc = wxPyMake_wxObject(&dc, false);
437 PyObject* owin = wxPyMake_wxObject(window, false);
438 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
439 PyObject* opane = wxPyConstructObject((void*)&pane, wxT("wxAuiPaneInfo"), 0);
440 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOO)", odc, owin, orect, opane));
445 wxPyEndBlockThreads(blocked);
447 wxAuiDefaultDockArt::DrawGripper(dc, window, rect, pane);
450 virtual void DrawBorder(wxDC& dc,
456 wxPyBlock_t blocked = wxPyBeginBlockThreads();
457 if ((found = wxPyCBH_findCallback(m_myInst, "DrawBorder"))) {
458 PyObject* odc = wxPyMake_wxObject(&dc, false);
459 PyObject* owin = wxPyMake_wxObject(window, false);
460 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
461 PyObject* opane = wxPyConstructObject((void*)&pane, wxT("wxAuiPaneInfo"), 0);
462 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", odc, orect, opane));
468 wxPyEndBlockThreads(blocked);
470 wxAuiDefaultDockArt::DrawBorder(dc, window, rect, pane);
473 virtual void DrawPaneButton(wxDC& dc,
481 wxPyBlock_t blocked = wxPyBeginBlockThreads();
482 if ((found = wxPyCBH_findCallback(m_myInst, "DrawPaneButton"))) {
483 PyObject* odc = wxPyMake_wxObject(&dc, false);
484 PyObject* owin = wxPyMake_wxObject(window, false);
485 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
486 PyObject* opane = wxPyConstructObject((void*)&pane, wxT("wxAuiPaneInfo"), 0);
487 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOiIOO)",
488 odc, owin, button, button_state,
495 wxPyEndBlockThreads(blocked);
497 wxAuiDefaultDockArt::DrawPaneButton(dc, window, button, button_state, rect, pane);
504 IMP_PYCALLBACK_INT_INT(wxPyAuiDockArt, wxAuiDefaultDockArt, GetMetric);
505 IMP_PYCALLBACK_VOID_INTINT(wxPyAuiDockArt, wxAuiDefaultDockArt, SetMetric);
506 IMP_PYCALLBACK__INTFONT(wxPyAuiDockArt, wxAuiDefaultDockArt, SetFont);
507 IMP_PYCALLBACK_FONT_INT(wxPyAuiDockArt, wxAuiDefaultDockArt, GetFont);
508 IMP_PYCALLBACK_COLOUR_INT(wxPyAuiDockArt, wxAuiDefaultDockArt, GetColour);
509 IMP_PYCALLBACK__INTCOLOUR(wxPyAuiDockArt, wxAuiDefaultDockArt, SetColour);
514 DocStr(wxPyAuiDockArt,
515 "This version of the `AuiDockArt` class has been instrumented to be
516 subclassable in Python and to reflect all calls to the C++ base class
517 methods to the Python methods implemented in the derived class.", "");
519 class wxPyAuiDockArt : public wxAuiDefaultDockArt
522 %pythonAppend wxPyAuiDockArt setCallbackInfo(PyAuiDockArt)
525 void _setCallbackInfo(PyObject* self, PyObject* _class);
529 //---------------------------------------------------------------------------
531 %extend wxAuiNotebook {
532 %property(PageCount, GetPageCount, doc="See `GetPageCount`");
533 %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`");
537 %extend wxAuiNotebookEvent {
538 %property(OldSelection, GetOldSelection, SetOldSelection, doc="See `GetOldSelection` and `SetOldSelection`");
539 %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`");
543 %extend wxAuiTabContainer {
544 %property(ActivePage, GetActivePage, SetActivePage, doc="See `GetActivePage` and `SetActivePage`");
545 %property(PageCount, GetPageCount, doc="See `GetPageCount`");
546 %property(Pages, GetPages, doc="See `GetPages`");
550 %extend wxAuiManager {
551 %property(AllPanes, GetAllPanes, doc="See `GetAllPanes`");
552 %property(ArtProvider, GetArtProvider, SetArtProvider, doc="See `GetArtProvider` and `SetArtProvider`");
553 %property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`");
554 %property(ManagedWindow, GetManagedWindow, SetManagedWindow, doc="See `GetManagedWindow` and `SetManagedWindow`");
558 %extend wxAuiManagerEvent {
559 %property(Button, GetButton, SetButton, doc="See `GetButton` and `SetButton`");
560 %property(DC, GetDC, SetDC, doc="See `GetDC` and `SetDC`");
561 %property(Pane, GetPane, SetPane, doc="See `GetPane` and `SetPane`");
565 //---------------------------------------------------------------------------
568 // A wxTabArt class that knows how to forward virtuals to Python methods
569 class wxPyAuiTabArt : public wxAuiDefaultTabArt
572 wxPyAuiTabArt() : wxAuiDefaultTabArt() {}
575 virtual void DrawBackground( wxDC& dc,
580 wxPyBlock_t blocked = wxPyBeginBlockThreads();
581 if ((found = wxPyCBH_findCallback(m_myInst, "DrawBackground"))) {
582 PyObject* odc = wxPyMake_wxObject(&dc, false);
583 PyObject* ownd = wxPyMake_wxObject(wnd, false);
584 PyObject* orect = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
585 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", odc, ownd, orect));
590 wxPyEndBlockThreads(blocked);
592 wxAuiDefaultTabArt::DrawBackground(dc, wnd, rect);
595 virtual void DrawTab( wxDC& dc,
597 const wxAuiNotebookPage& pane,
598 const wxRect& in_rect,
599 int close_button_state,
600 wxRect* out_tab_rect,
601 wxRect* out_button_rect,
605 const char* errmsg = "DrawTab should return a sequence containing (tab_rect, button_rect, x_extent)";
606 wxPyBlock_t blocked = wxPyBeginBlockThreads();
607 if ((found = wxPyCBH_findCallback(m_myInst, "DrawTab"))) {
608 PyObject* odc = wxPyMake_wxObject(&dc, false);
609 PyObject* ownd = wxPyMake_wxObject(wnd, false);
610 PyObject* opane = wxPyConstructObject((void*)&pane, wxT("wxAuiNotebookPage"), 0);
611 PyObject* orect = wxPyConstructObject((void*)&in_rect, wxT("wxRect"), 0);
613 ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue(
615 odc, ownd, orect, opane,
616 close_button_state));
618 if (PySequence_Check(ro) && PyObject_Length(ro) == 3) {
619 PyObject* o1 = PySequence_GetItem(ro, 0);
620 PyObject* o2 = PySequence_GetItem(ro, 1);
621 PyObject* o3 = PySequence_GetItem(ro, 2);
622 if (!wxRect_helper(o1, &out_tab_rect))
623 PyErr_SetString(PyExc_TypeError, errmsg);
624 else if (!wxRect_helper(o2, &out_button_rect))
625 PyErr_SetString(PyExc_TypeError, errmsg);
626 else if (!PyInt_Check(o3))
627 PyErr_SetString(PyExc_TypeError, errmsg);
629 *x_extent = PyInt_AsLong(o3);
636 PyErr_SetString(PyExc_TypeError, errmsg);
646 wxPyEndBlockThreads(blocked);
648 wxAuiDefaultTabArt::DrawTab(dc, wnd, pane, in_rect, close_button_state, out_tab_rect, out_button_rect, x_extent);
652 virtual void DrawButton( wxDC& dc,
654 const wxRect& in_rect,
661 const char* errmsg = "DrawButton should return a wxRect";
662 wxPyBlock_t blocked = wxPyBeginBlockThreads();
663 if ((found = wxPyCBH_findCallback(m_myInst, "DrawButton"))) {
664 PyObject* odc = wxPyMake_wxObject(&dc, false);
665 PyObject* ownd = wxPyMake_wxObject(wnd, false);
666 PyObject* orect = wxPyConstructObject((void*)&in_rect, wxT("wxRect"), 0);
668 ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOiiiO)", odc, ownd, orect,
669 bitmap_id, button_state, orientation));
671 if (!wxRect_helper(ro, &out_rect))
672 PyErr_SetString(PyExc_TypeError, errmsg);
680 wxPyEndBlockThreads(blocked);
682 wxAuiDefaultTabArt::DrawButton(dc, wnd, in_rect, bitmap_id, button_state, orientation, out_rect);
686 virtual wxSize GetTabSize( wxDC& dc,
688 const wxString& caption,
689 const wxBitmap& bitmap,
691 int close_button_state,
695 wxSize rv, *prv = &rv;
696 const char* errmsg = "GetTabSize should return a sequence containing (size, x_extent)";
697 wxPyBlock_t blocked = wxPyBeginBlockThreads();
698 if ((found = wxPyCBH_findCallback(m_myInst, "GetTabSize"))) {
699 PyObject* odc = wxPyMake_wxObject(&dc, false);
700 PyObject* ownd = wxPyMake_wxObject(wnd, false);
701 PyObject* otext = wx2PyString(caption);
702 PyObject* obmp = wxPyMake_wxObject((wxObject*)&bitmap, false);
704 ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue(
705 "(OOOOii)", odc, ownd, otext, obmp, (int)active, close_button_state));
707 if (PySequence_Check(ro) && PyObject_Length(ro) == 2) {
708 PyObject* o1 = PySequence_GetItem(ro, 0);
709 PyObject* o2 = PySequence_GetItem(ro, 1);
710 if (!wxSize_helper(o1, &prv))
711 PyErr_SetString(PyExc_TypeError, errmsg);
712 else if (!PyInt_Check(o2))
713 PyErr_SetString(PyExc_TypeError, errmsg);
715 *x_extent = PyInt_AsLong(o2);
721 PyErr_SetString(PyExc_TypeError, errmsg);
731 wxPyEndBlockThreads(blocked);
733 rv = wxAuiDefaultTabArt::GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent);
738 // virtual int ShowDropDown(
740 // const wxAuiNotebookPageArray& items,
743 // virtual int GetIndentSize();
745 // virtual int GetBestTabCtrlSize(wxWindow* wnd,
746 // const wxAuiNotebookPageArray& pages,
747 // const wxSize& required_bmp_size);
748 // virtual wxAuiTabArt* Clone();
749 // virtual void SetFlags(unsigned int flags);
750 // virtual void SetSizingInfo(const wxSize& tab_ctrl_size,
751 // size_t tab_count);
752 // virtual int GetIndentSize();
756 DEC_PYCALLBACK__FONT(SetNormalFont);
757 DEC_PYCALLBACK__FONT(SetSelectedFont);
758 DEC_PYCALLBACK__FONT(SetMeasuringFont);
764 IMP_PYCALLBACK__FONT(wxPyAuiTabArt, wxAuiDefaultTabArt, SetNormalFont);
765 IMP_PYCALLBACK__FONT(wxPyAuiTabArt, wxAuiDefaultTabArt, SetSelectedFont);
766 IMP_PYCALLBACK__FONT(wxPyAuiTabArt, wxAuiDefaultTabArt, SetMeasuringFont);
770 DocStr(wxPyAuiTabArt,
771 "This version of the `TabArt` class has been instrumented to be
772 subclassable in Python and to reflect all calls to the C++ base class
773 methods to the Python methods implemented in the derived class.", "");
775 class wxPyAuiTabArt : public wxAuiDefaultTabArt
778 %pythonAppend wxPyAuiTabArt setCallbackInfo(PyAuiTabArt)
781 void _setCallbackInfo(PyObject* self, PyObject* _class);
785 //---------------------------------------------------------------------------