Changes to how overridable C++ methods are virtualized for Python.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-02-07 03:56:44 +00:00
parent e4c37d10dd
commit a7a0141800
25 changed files with 890 additions and 766 deletions

View File

@@ -381,6 +381,23 @@ typedef unsigned long wxUIntPtr;
%enddef
#endif
//---------------------------------------------------------------------------
// Generates a base_On* method that just wraps a call to the On*, and mark it
// deprecated. We need this because there is no longer any need for a
// base_On* method to be able to call the C++ base class method, since our
// virtualization code can now sense when an attempt is being made to call
// the base class version from the derived class override.
%define %MAKE_BASE_FUNC(Class, Method)
%pythoncode {
def base_##Method(*args, **kw):
return Class.Method(*args, **kw)
base_##Method = wx._deprecated(base_##Method,
"Please use Class.Method instead.")
}
%enddef
//---------------------------------------------------------------------------
// Forward declarations and %renames for some classes, so the autodoc strings
// will be able to use the right types even when the real class declaration is

View File

@@ -84,7 +84,8 @@ public:
wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
bool base_GiveFeedback(wxDragResult effect);
bool GiveFeedback(wxDragResult effect);
%MAKE_BASE_FUNC(DropSource, GiveFeedback);
};
@@ -151,11 +152,17 @@ public:
%cleardisown( wxDataObject *dataObject );
wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void base_OnLeave();
bool base_OnDrop(wxCoord x, wxCoord y);
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void OnLeave();
bool OnDrop(wxCoord x, wxCoord y);
%MAKE_BASE_FUNC(DropTarget, OnEnter);
%MAKE_BASE_FUNC(DropTarget, OnDragOver);
%MAKE_BASE_FUNC(DropTarget, OnLeave);
%MAKE_BASE_FUNC(DropTarget, OnDrop);
// may be called *only* from inside OnData() and will fill m_dataObject
// with the data from the drop source if it returns True
bool GetData();
@@ -213,12 +220,19 @@ public:
wxPyTextDropTarget();
void _setCallbackInfo(PyObject* self, PyObject* _class);
//bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0;
wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void base_OnLeave();
bool base_OnDrop(wxCoord x, wxCoord y);
wxDragResult base_OnData(wxCoord x, wxCoord y, wxDragResult def);
bool OnDropText(wxCoord x, wxCoord y, const wxString& text);
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void OnLeave();
bool OnDrop(wxCoord x, wxCoord y);
wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
%MAKE_BASE_FUNC(TextDropTarget, OnDropText);
%MAKE_BASE_FUNC(TextDropTarget, OnEnter);
%MAKE_BASE_FUNC(TextDropTarget, OnDragOver);
%MAKE_BASE_FUNC(TextDropTarget, OnLeave);
%MAKE_BASE_FUNC(TextDropTarget, OnDrop);
%MAKE_BASE_FUNC(TextDropTarget, OnData);
};
//---------------------------------------------------------------------------
@@ -275,12 +289,19 @@ public:
wxPyFileDropTarget();
void _setCallbackInfo(PyObject* self, PyObject* _class);
// bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) = 0;
wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void base_OnLeave();
bool base_OnDrop(wxCoord x, wxCoord y);
wxDragResult base_OnData(wxCoord x, wxCoord y, wxDragResult def);
bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void OnLeave();
bool OnDrop(wxCoord x, wxCoord y);
wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
%MAKE_BASE_FUNC(FileDropTarget, OnDropFiles);
%MAKE_BASE_FUNC(FileDropTarget, OnEnter);
%MAKE_BASE_FUNC(FileDropTarget, OnDragOver);
%MAKE_BASE_FUNC(FileDropTarget, OnLeave);
%MAKE_BASE_FUNC(FileDropTarget, OnDrop);
%MAKE_BASE_FUNC(FileDropTarget, OnData);
};

View File

@@ -154,6 +154,9 @@ public:
%pythonAppend Destroy "args[0].thisown = 0";
%extend { void Destroy() { delete self; } }
void DoLog(wxLogLevel level, const wxChar *szString, long t);
void DoLogString(const wxChar *szString, long t);
};
@@ -388,8 +391,10 @@ public:
wxLog::DoLogString(szString, t);
}
DEC_PYCALLBACK_VOID_(Flush);
PYPRIVATE;
};
IMP_PYCALLBACK_VOID_(wxPyLog, wxLog, Flush);
%}
// Now tell SWIG about it

View File

@@ -393,9 +393,6 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
}
void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
}
IMP_PYCALLBACK_BOOL_INTINT(wxPyPrintout, wxPrintout, OnBeginDocument);
@@ -452,15 +449,22 @@ public:
void SetIsPreview(bool p);
bool base_OnBeginDocument(int startPage, int endPage);
void base_OnEndDocument();
void base_OnBeginPrinting();
void base_OnEndPrinting();
void base_OnPreparePrinting();
bool base_HasPage(int page);
bool OnBeginDocument(int startPage, int endPage);
void OnEndDocument();
void OnBeginPrinting();
void OnEndPrinting();
void OnPreparePrinting();
bool HasPage(int page);
DocDeclA(
void, base_GetPageInfo(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT),
"base_GetPageInfo() -> (minPage, maxPage, pageFrom, pageTo)");
void, GetPageInfo(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT),
"GetPageInfo() -> (minPage, maxPage, pageFrom, pageTo)");
%MAKE_BASE_FUNC(Printout, OnBeginDocument);
%MAKE_BASE_FUNC(Printout, OnEndDocument);
%MAKE_BASE_FUNC(Printout, OnBeginPrinting);
%MAKE_BASE_FUNC(Printout, OnEndPrinting);
%MAKE_BASE_FUNC(Printout, OnPreparePrinting);
%MAKE_BASE_FUNC(Printout, GetPageInfo);
};
//---------------------------------------------------------------------------
@@ -617,8 +621,7 @@ public:
%{
#define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
bool base_##CBNAME(wxPreviewCanvas* a, wxDC& b)
bool CBNAME(wxPreviewCanvas* a, wxDC& b)
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
@@ -637,10 +640,7 @@ public:
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
return PCLASS::CBNAME(a, b); \
}
}
@@ -706,13 +706,21 @@ public:
void _setCallbackInfo(PyObject* self, PyObject* _class);
bool base_SetCurrentPage(int pageNum);
bool base_PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
bool base_DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
bool base_RenderPage(int pageNum);
void base_SetZoom(int percent);
bool base_Print(bool interactive);
void base_DetermineScaling();
bool SetCurrentPage(int pageNum);
bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
bool RenderPage(int pageNum);
void SetZoom(int percent);
bool Print(bool interactive);
void DetermineScaling();
%MAKE_BASE_FUNC(PyPrintPreview, SetCurrentPage);
%MAKE_BASE_FUNC(PyPrintPreview, PaintPage);
%MAKE_BASE_FUNC(PyPrintPreview, DrawBlankPage);
%MAKE_BASE_FUNC(PyPrintPreview, RenderPage);
%MAKE_BASE_FUNC(PyPrintPreview, SetZoom);
%MAKE_BASE_FUNC(PyPrintPreview, Print);
%MAKE_BASE_FUNC(PyPrintPreview, DetermineScaling);
};
@@ -769,9 +777,13 @@ public:
void SetPreviewCanvas(wxPreviewCanvas* canvas);
void SetControlBar(wxPreviewControlBar* bar);
void base_Initialize();
void base_CreateCanvas();
void base_CreateControlBar();
void Initialize();
void CreateCanvas();
void CreateControlBar();
%MAKE_BASE_FUNC(PyPreviewFrame, Initialize);
%MAKE_BASE_FUNC(PyPreviewFrame, CreateCanvas);
%MAKE_BASE_FUNC(PyPreviewFrame, CreateControlBar);
};
@@ -825,8 +837,11 @@ public:
void SetPrintPreview(wxPrintPreview* preview);
void base_CreateButtons();
void base_SetZoomControl(int zoom);
void CreateButtons();
void SetZoomControl(int zoom);
%MAKE_BASE_FUNC(PreviewControlBar, CreateButtons);
%MAKE_BASE_FUNC(PreviewControlBar, SetZoomControl);
};
//---------------------------------------------------------------------------

View File

@@ -104,8 +104,9 @@ public:
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_OnTerminate(int pid, int status);
void OnTerminate(int pid, int status);
%MAKE_BASE_FUNC(Process, OnTerminate);
// call Redirect before passing the object to wxExecute() to redirect the
// launched process stdin/stdout, then use GetInputStream() and
// GetOutputStream() to get access to them

View File

@@ -136,41 +136,63 @@ public:
void SetBestSize(const wxSize& size);
bool DoEraseBackground(wxDC* dc);
void base_DoMoveWindow(int x, int y, int width, int height);
void base_DoSetSize(int x, int y, int width, int height,
void DoMoveWindow(int x, int y, int width, int height);
void DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void base_DoSetClientSize(int width, int height);
void base_DoSetVirtualSize( int x, int y );
void DoSetClientSize(int width, int height);
void DoSetVirtualSize( int x, int y );
DocDeclA(
void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetSize() -> (width, height)");
void, DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetSize() -> (width, height)");
DocDeclA(
void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetClientSize() -> (width, height)");
void, DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetClientSize() -> (width, height)");
DocDeclA(
void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetPosition() -> (x,y)");
void, DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"DoGetPosition() -> (x,y)");
wxSize base_DoGetVirtualSize() const;
wxSize base_DoGetBestSize() const;
wxSize DoGetVirtualSize() const;
wxSize DoGetBestSize() const;
void base_InitDialog();
bool base_TransferDataToWindow();
bool base_TransferDataFromWindow();
bool base_Validate();
void InitDialog();
bool TransferDataToWindow();
bool TransferDataFromWindow();
bool Validate();
bool base_AcceptsFocus() const;
bool base_AcceptsFocusFromKeyboard() const;
wxSize base_GetMaxSize() const;
bool AcceptsFocus() const;
bool AcceptsFocusFromKeyboard() const;
wxSize GetMaxSize() const;
void base_AddChild(wxWindow* child);
void base_RemoveChild(wxWindow* child);
void AddChild(wxWindow* child);
void RemoveChild(wxWindow* child);
bool base_ShouldInheritColours() const;
wxVisualAttributes base_GetDefaultAttributes();
bool ShouldInheritColours() const;
wxVisualAttributes GetDefaultAttributes();
void base_OnInternalIdle();
void OnInternalIdle();
%MAKE_BASE_FUNC(PyScrolledWindow, DoMoveWindow);
%MAKE_BASE_FUNC(PyScrolledWindow, DoSetSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoSetClientSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoSetVirtualSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetClientSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetPosition);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetVirtualSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetBestSize);
%MAKE_BASE_FUNC(PyScrolledWindow, InitDialog);
%MAKE_BASE_FUNC(PyScrolledWindow, TransferDataToWindow);
%MAKE_BASE_FUNC(PyScrolledWindow, TransferDataFromWindow);
%MAKE_BASE_FUNC(PyScrolledWindow, Validate);
%MAKE_BASE_FUNC(PyScrolledWindow, AcceptsFocus);
%MAKE_BASE_FUNC(PyScrolledWindow, AcceptsFocusFromKeyboard);
%MAKE_BASE_FUNC(PyScrolledWindow, GetMaxSize);
%MAKE_BASE_FUNC(PyScrolledWindow, AddChild);
%MAKE_BASE_FUNC(PyScrolledWindow, RemoveChild);
%MAKE_BASE_FUNC(PyScrolledWindow, ShouldInheritColours);
%MAKE_BASE_FUNC(PyScrolledWindow, GetDefaultAttributes);
%MAKE_BASE_FUNC(PyScrolledWindow, OnInternalIdle);
};

View File

@@ -163,42 +163,64 @@ public:
void SetBestSize(const wxSize& size);
bool DoEraseBackground(wxDC* dc);
void base_DoMoveWindow(int x, int y, int width, int height);
void base_DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void base_DoSetClientSize(int width, int height);
void base_DoSetVirtualSize( int x, int y );
void DoMoveWindow(int x, int y, int width, int height);
void DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void DoSetClientSize(int width, int height);
void DoSetVirtualSize( int x, int y );
DocDeclA(
void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetSize() -> (width, height)");
void, DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetSize() -> (width, height)");
DocDeclA(
void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetClientSize() -> (width, height)");
void, DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetClientSize() -> (width, height)");
DocDeclA(
void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetPosition() -> (x,y)");
void, DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"DoGetPosition() -> (x,y)");
wxSize base_DoGetVirtualSize() const;
wxSize base_DoGetBestSize() const;
wxSize DoGetVirtualSize() const;
wxSize DoGetBestSize() const;
void base_InitDialog();
bool base_TransferDataToWindow();
bool base_TransferDataFromWindow();
bool base_Validate();
void InitDialog();
bool TransferDataToWindow();
bool TransferDataFromWindow();
bool Validate();
bool base_AcceptsFocus() const;
bool base_AcceptsFocusFromKeyboard() const;
wxSize base_GetMaxSize() const;
bool AcceptsFocus() const;
bool AcceptsFocusFromKeyboard() const;
wxSize GetMaxSize() const;
void base_AddChild(wxWindow* child);
void base_RemoveChild(wxWindow* child);
void AddChild(wxWindow* child);
void RemoveChild(wxWindow* child);
bool base_ShouldInheritColours() const;
wxVisualAttributes base_GetDefaultAttributes();
bool ShouldInheritColours() const;
wxVisualAttributes GetDefaultAttributes();
void base_OnInternalIdle();
void OnInternalIdle();
%MAKE_BASE_FUNC(PyWindow, DoMoveWindow);
%MAKE_BASE_FUNC(PyWindow, DoSetSize);
%MAKE_BASE_FUNC(PyWindow, DoSetClientSize);
%MAKE_BASE_FUNC(PyWindow, DoSetVirtualSize);
%MAKE_BASE_FUNC(PyWindow, DoGetSize);
%MAKE_BASE_FUNC(PyWindow, DoGetClientSize);
%MAKE_BASE_FUNC(PyWindow, DoGetPosition);
%MAKE_BASE_FUNC(PyWindow, DoGetVirtualSize);
%MAKE_BASE_FUNC(PyWindow, DoGetBestSize);
%MAKE_BASE_FUNC(PyWindow, InitDialog);
%MAKE_BASE_FUNC(PyWindow, TransferDataToWindow);
%MAKE_BASE_FUNC(PyWindow, TransferDataFromWindow);
%MAKE_BASE_FUNC(PyWindow, Validate);
%MAKE_BASE_FUNC(PyWindow, AcceptsFocus);
%MAKE_BASE_FUNC(PyWindow, AcceptsFocusFromKeyboard);
%MAKE_BASE_FUNC(PyWindow, GetMaxSize);
%MAKE_BASE_FUNC(PyWindow, AddChild);
%MAKE_BASE_FUNC(PyWindow, RemoveChild);
%MAKE_BASE_FUNC(PyWindow, ShouldInheritColours);
%MAKE_BASE_FUNC(PyWindow, GetDefaultAttributes);
%MAKE_BASE_FUNC(PyWindow, OnInternalIdle);
};
//---------------------------------------------------------------------------
@@ -324,42 +346,63 @@ public:
void SetBestSize(const wxSize& size);
bool DoEraseBackground(wxDC* dc);
void base_DoMoveWindow(int x, int y, int width, int height);
void base_DoSetSize(int x, int y, int width, int height,
void DoMoveWindow(int x, int y, int width, int height);
void DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void base_DoSetClientSize(int width, int height);
void base_DoSetVirtualSize( int x, int y );
void DoSetClientSize(int width, int height);
void DoSetVirtualSize( int x, int y );
DocDeclA(
void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetSize() -> (width, height)");
void, DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetSize() -> (width, height)");
DocDeclA(
void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetClientSize() -> (width, height)");
void, DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetClientSize() -> (width, height)");
DocDeclA(
void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetPosition() -> (x,y)");
void, DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"DoGetPosition() -> (x,y)");
wxSize base_DoGetVirtualSize() const;
wxSize base_DoGetBestSize() const;
wxSize DoGetVirtualSize() const;
wxSize DoGetBestSize() const;
void base_InitDialog();
bool base_TransferDataToWindow();
bool base_TransferDataFromWindow();
bool base_Validate();
void InitDialog();
bool TransferDataToWindow();
bool TransferDataFromWindow();
bool Validate();
bool base_AcceptsFocus() const;
bool base_AcceptsFocusFromKeyboard() const;
wxSize base_GetMaxSize() const;
bool AcceptsFocus() const;
bool AcceptsFocusFromKeyboard() const;
wxSize GetMaxSize() const;
void base_AddChild(wxWindow* child);
void base_RemoveChild(wxWindow* child);
void AddChild(wxWindow* child);
void RemoveChild(wxWindow* child);
bool base_ShouldInheritColours() const ;
wxVisualAttributes base_GetDefaultAttributes();
bool ShouldInheritColours() const ;
wxVisualAttributes GetDefaultAttributes();
void base_OnInternalIdle();
void OnInternalIdle();
%MAKE_BASE_FUNC(PyPanel, DoMoveWindow);
%MAKE_BASE_FUNC(PyPanel, DoSetSize);
%MAKE_BASE_FUNC(PyPanel, DoSetClientSize);
%MAKE_BASE_FUNC(PyPanel, DoSetVirtualSize);
%MAKE_BASE_FUNC(PyPanel, DoGetSize);
%MAKE_BASE_FUNC(PyPanel, DoGetClientSize);
%MAKE_BASE_FUNC(PyPanel, DoGetPosition);
%MAKE_BASE_FUNC(PyPanel, DoGetVirtualSize);
%MAKE_BASE_FUNC(PyPanel, DoGetBestSize);
%MAKE_BASE_FUNC(PyPanel, InitDialog);
%MAKE_BASE_FUNC(PyPanel, TransferDataToWindow);
%MAKE_BASE_FUNC(PyPanel, TransferDataFromWindow);
%MAKE_BASE_FUNC(PyPanel, Validate);
%MAKE_BASE_FUNC(PyPanel, AcceptsFocus);
%MAKE_BASE_FUNC(PyPanel, AcceptsFocusFromKeyboard);
%MAKE_BASE_FUNC(PyPanel, GetMaxSize);
%MAKE_BASE_FUNC(PyPanel, AddChild);
%MAKE_BASE_FUNC(PyPanel, RemoveChild);
%MAKE_BASE_FUNC(PyPanel, ShouldInheritColours);
%MAKE_BASE_FUNC(PyPanel, GetDefaultAttributes);
%MAKE_BASE_FUNC(PyPanel, OnInternalIdle);
};
//---------------------------------------------------------------------------
@@ -478,41 +521,63 @@ public:
void SetBestSize(const wxSize& size);
bool DoEraseBackground(wxDC* dc);
void base_DoMoveWindow(int x, int y, int width, int height);
void base_DoSetSize(int x, int y, int width, int height,
void DoMoveWindow(int x, int y, int width, int height);
void DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void base_DoSetClientSize(int width, int height);
void base_DoSetVirtualSize( int x, int y );
void DoSetClientSize(int width, int height);
void DoSetVirtualSize( int x, int y );
DocDeclA(
void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetSize() -> (width, height)");
void, DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetSize() -> (width, height)");
DocDeclA(
void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetClientSize() -> (width, height)");
void, DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetClientSize() -> (width, height)");
DocDeclA(
void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetPosition() -> (x,y)");
void, DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"DoGetPosition() -> (x,y)");
wxSize base_DoGetVirtualSize() const;
wxSize base_DoGetBestSize() const;
wxSize DoGetVirtualSize() const;
wxSize DoGetBestSize() const;
void base_InitDialog();
bool base_TransferDataToWindow();
bool base_TransferDataFromWindow();
bool base_Validate();
void InitDialog();
bool TransferDataToWindow();
bool TransferDataFromWindow();
bool Validate();
bool base_AcceptsFocus() const;
bool base_AcceptsFocusFromKeyboard() const;
wxSize base_GetMaxSize() const;
bool AcceptsFocus() const;
bool AcceptsFocusFromKeyboard() const;
wxSize GetMaxSize() const;
void base_AddChild(wxWindow* child);
void base_RemoveChild(wxWindow* child);
void AddChild(wxWindow* child);
void RemoveChild(wxWindow* child);
bool base_ShouldInheritColours() const;
wxVisualAttributes base_GetDefaultAttributes();
bool ShouldInheritColours() const;
wxVisualAttributes GetDefaultAttributes();
void base_OnInternalIdle();
void OnInternalIdle();
%MAKE_BASE_FUNC(PyScrolledWindow, DoMoveWindow);
%MAKE_BASE_FUNC(PyScrolledWindow, DoSetSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoSetClientSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoSetVirtualSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetClientSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetPosition);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetVirtualSize);
%MAKE_BASE_FUNC(PyScrolledWindow, DoGetBestSize);
%MAKE_BASE_FUNC(PyScrolledWindow, InitDialog);
%MAKE_BASE_FUNC(PyScrolledWindow, TransferDataToWindow);
%MAKE_BASE_FUNC(PyScrolledWindow, TransferDataFromWindow);
%MAKE_BASE_FUNC(PyScrolledWindow, Validate);
%MAKE_BASE_FUNC(PyScrolledWindow, AcceptsFocus);
%MAKE_BASE_FUNC(PyScrolledWindow, AcceptsFocusFromKeyboard);
%MAKE_BASE_FUNC(PyScrolledWindow, GetMaxSize);
%MAKE_BASE_FUNC(PyScrolledWindow, AddChild);
%MAKE_BASE_FUNC(PyScrolledWindow, RemoveChild);
%MAKE_BASE_FUNC(PyScrolledWindow, ShouldInheritColours);
%MAKE_BASE_FUNC(PyScrolledWindow, GetDefaultAttributes);
%MAKE_BASE_FUNC(PyScrolledWindow, OnInternalIdle);
};

View File

@@ -32,7 +32,7 @@ enum {
%{
//IMP_PYCALLBACK__(wxPyTimer, wxTimer, Notify);
IMP_PYCALLBACK__(wxPyTimer, wxTimer, Notify);
IMPLEMENT_ABSTRACT_CLASS(wxPyTimer, wxTimer);
@@ -41,21 +41,6 @@ wxPyTimer::wxPyTimer(wxEvtHandler *owner, int id)
{
if (owner == NULL) SetOwner(this);
}
void wxPyTimer::Notify() {
bool found;
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "Notify")))
wxPyCBH_callCallback(m_myInst, Py_BuildValue("()"));
wxPyEndBlockThreads(blocked);
if (! found)
wxTimer::Notify();
}
void wxPyTimer::base_Notify() {
wxTimer::Notify();
}
%}
@@ -101,7 +86,7 @@ public:
// override this in your wxTimer-derived class if you want to process timer
// messages in it, use non default ctor or SetOwner() otherwise
//virtual void Notify();
virtual void Notify();
// return True if the timer is running
virtual bool IsRunning() const;

View File

@@ -114,11 +114,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a, b, c); \
return rval; \
} \
wxGridCellAttr *base_##CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \
return PCLASS::CBNAME(a, b, c); \
}
}
#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \
@@ -133,10 +129,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(attr, a, b); \
} \
void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \
PCLASS::CBNAME(attr, a, b); \
}
}
@@ -152,10 +145,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(attr, val); \
} \
void base_##CBNAME(wxGridCellAttr *attr, int val) { \
PCLASS::CBNAME(attr, val); \
}
}
@@ -228,10 +218,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
wxString base_##CBNAME(int a, int b) { \
return PCLASS::CBNAME(a, b); \
}
}
#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \
@@ -248,10 +235,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a,b,c); \
return rval; \
} \
bool base_##CBNAME(int a, int b, const wxString& c) { \
return PCLASS::CBNAME(a,b,c); \
}
}
@@ -267,11 +251,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a,b); \
return rval; \
} \
long base_##CBNAME(int a, int b) { \
return PCLASS::CBNAME(a,b); \
}
}
#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \
@@ -285,10 +265,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a,b); \
return rval; \
} \
bool base_##CBNAME(int a, int b) { \
return PCLASS::CBNAME(a,b); \
}
}
@@ -310,10 +287,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
double base_##CBNAME(int a, int b) { \
return PCLASS::CBNAME(a, b); \
}
}
@@ -326,11 +300,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(); \
} \
void base_##CBNAME() { \
PCLASS::CBNAME(); \
}
}
@@ -345,10 +315,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a,b); \
return rval; \
} \
bool base_##CBNAME(size_t a, size_t b) { \
return PCLASS::CBNAME(a,b); \
}
}
@@ -363,10 +330,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a); \
return rval; \
} \
bool base_##CBNAME(size_t a) { \
return PCLASS::CBNAME(a); \
}
}
#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \
@@ -386,10 +350,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(a); \
return rval; \
} \
wxString base_##CBNAME(int a) { \
return PCLASS::CBNAME(a); \
}
}
#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \
@@ -404,10 +365,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(a,c); \
} \
void base_##CBNAME(int a, const wxString& c) { \
PCLASS::CBNAME(a,c); \
}
}
@@ -423,10 +381,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
if (! found) \
rval = PCLASS::CBNAME(); \
return rval; \
} \
bool base_##CBNAME() { \
return PCLASS::CBNAME(); \
}
}
@@ -439,10 +394,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(a,b); \
} \
void base_##CBNAME(size_t a, int b) { \
PCLASS::CBNAME(a,b); \
}
}
@@ -456,10 +408,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(a,b,c); \
} \
void base_##CBNAME(int a, int b, long c) { \
PCLASS::CBNAME(a,b,c); \
}
}
@@ -473,10 +422,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(a,b,c); \
} \
void base_##CBNAME(int a, int b, double c) { \
PCLASS::CBNAME(a,b,c); \
}
}
@@ -489,11 +435,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
wxPyEndBlockThreads(blocked); \
if (! found) \
PCLASS::CBNAME(a,b,c); \
} \
void base_##CBNAME(int a, int b, bool c) { \
PCLASS::CBNAME(a,b,c); \
}
}
@@ -688,7 +630,8 @@ public:
wxPyGridCellRenderer();
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_SetParameters(const wxString& params);
void SetParameters(const wxString& params);
%MAKE_BASE_FUNC(PyGridCellRenderer, SetParameters);
};
//---------------------------------------------------------------------------
@@ -878,9 +821,6 @@ public:
if (! found)
wxGridCellEditor::Show(show, attr);
}
void base_Show(bool show, wxGridCellAttr *attr) {
wxGridCellEditor::Show(show, attr);
}
void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
@@ -899,9 +839,6 @@ public:
if (! found)
wxGridCellEditor::PaintBackground(rectCell, attr);
}
void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
wxGridCellEditor::PaintBackground(rectCell, attr);
}
DEC_PYCALLBACK___pure(Reset);
@@ -939,15 +876,25 @@ public:
wxPyGridCellEditor();
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_SetSize(const wxRect& rect);
void base_Show(bool show, wxGridCellAttr *attr = NULL);
void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
bool base_IsAcceptedKey(wxKeyEvent& event);
void base_StartingKey(wxKeyEvent& event);
void base_StartingClick();
void base_HandleReturn(wxKeyEvent& event);
void base_Destroy();
void base_SetParameters(const wxString& params);
void SetSize(const wxRect& rect);
void Show(bool show, wxGridCellAttr *attr = NULL);
void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
bool IsAcceptedKey(wxKeyEvent& event);
void StartingKey(wxKeyEvent& event);
void StartingClick();
void HandleReturn(wxKeyEvent& event);
void Destroy();
void SetParameters(const wxString& params);
%MAKE_BASE_FUNC(PyGridCellEditor, SetSize);
%MAKE_BASE_FUNC(PyGridCellEditor, Show);
%MAKE_BASE_FUNC(PyGridCellEditor, PaintBackground);
%MAKE_BASE_FUNC(PyGridCellEditor, IsAcceptedKey);
%MAKE_BASE_FUNC(PyGridCellEditor, StartingKey);
%MAKE_BASE_FUNC(PyGridCellEditor, StartingClick);
%MAKE_BASE_FUNC(PyGridCellEditor, HandleReturn);
%MAKE_BASE_FUNC(PyGridCellEditor, Destroy);
%MAKE_BASE_FUNC(PyGridCellEditor, SetParameters);
};
//---------------------------------------------------------------------------
@@ -1144,11 +1091,16 @@ public:
wxPyGridCellAttrProvider();
void _setCallbackInfo(PyObject* self, PyObject* _class);
wxGridCellAttr *base_GetAttr(int row, int col,
wxGridCellAttr *GetAttr(int row, int col,
wxGridCellAttr::wxAttrKind kind);
void base_SetAttr(wxGridCellAttr *attr, int row, int col);
void base_SetRowAttr(wxGridCellAttr *attr, int row);
void base_SetColAttr(wxGridCellAttr *attr, int col);
void SetAttr(wxGridCellAttr *attr, int row, int col);
void SetRowAttr(wxGridCellAttr *attr, int row);
void SetColAttr(wxGridCellAttr *attr, int col);
%MAKE_BASE_FUNC(PyGridCellAttrProvider, GetAttr);
%MAKE_BASE_FUNC(PyGridCellAttrProvider, SetAttr);
%MAKE_BASE_FUNC(PyGridCellAttrProvider, SetRowAttr);
%MAKE_BASE_FUNC(PyGridCellAttrProvider, SetColAttr);
};
@@ -1367,26 +1319,46 @@ public:
%pythonAppend Destroy "args[0].thisown = 0"
%extend { void Destroy() { delete self; } }
wxString base_GetTypeName( int row, int col );
bool base_CanGetValueAs( int row, int col, const wxString& typeName );
bool base_CanSetValueAs( int row, int col, const wxString& typeName );
void base_Clear();
bool base_InsertRows( size_t pos = 0, size_t numRows = 1 );
bool base_AppendRows( size_t numRows = 1 );
bool base_DeleteRows( size_t pos = 0, size_t numRows = 1 );
bool base_InsertCols( size_t pos = 0, size_t numCols = 1 );
bool base_AppendCols( size_t numCols = 1 );
bool base_DeleteCols( size_t pos = 0, size_t numCols = 1 );
wxString base_GetRowLabelValue( int row );
wxString base_GetColLabelValue( int col );
void base_SetRowLabelValue( int row, const wxString& value );
void base_SetColLabelValue( int col, const wxString& value );
bool base_CanHaveAttributes();
wxGridCellAttr *base_GetAttr( int row, int col,
wxString GetTypeName( int row, int col );
bool CanGetValueAs( int row, int col, const wxString& typeName );
bool CanSetValueAs( int row, int col, const wxString& typeName );
void Clear();
bool InsertRows( size_t pos = 0, size_t numRows = 1 );
bool AppendRows( size_t numRows = 1 );
bool DeleteRows( size_t pos = 0, size_t numRows = 1 );
bool InsertCols( size_t pos = 0, size_t numCols = 1 );
bool AppendCols( size_t numCols = 1 );
bool DeleteCols( size_t pos = 0, size_t numCols = 1 );
wxString GetRowLabelValue( int row );
wxString GetColLabelValue( int col );
void SetRowLabelValue( int row, const wxString& value );
void SetColLabelValue( int col, const wxString& value );
bool CanHaveAttributes();
wxGridCellAttr *GetAttr( int row, int col,
wxGridCellAttr::wxAttrKind kind );
void base_SetAttr(wxGridCellAttr* attr, int row, int col);
void base_SetRowAttr(wxGridCellAttr *attr, int row);
void base_SetColAttr(wxGridCellAttr *attr, int col);
void SetAttr(wxGridCellAttr* attr, int row, int col);
void SetRowAttr(wxGridCellAttr *attr, int row);
void SetColAttr(wxGridCellAttr *attr, int col);
%MAKE_BASE_FUNC(PyGridTableBase, GetTypeName);
%MAKE_BASE_FUNC(PyGridTableBase, CanGetValueAs);
%MAKE_BASE_FUNC(PyGridTableBase, CanSetValueAs);
%MAKE_BASE_FUNC(PyGridTableBase, Clear);
%MAKE_BASE_FUNC(PyGridTableBase, InsertRows);
%MAKE_BASE_FUNC(PyGridTableBase, AppendRows);
%MAKE_BASE_FUNC(PyGridTableBase, DeleteRows);
%MAKE_BASE_FUNC(PyGridTableBase, InsertCols);
%MAKE_BASE_FUNC(PyGridTableBase, AppendCols);
%MAKE_BASE_FUNC(PyGridTableBase, DeleteCols);
%MAKE_BASE_FUNC(PyGridTableBase, GetRowLabelValue);
%MAKE_BASE_FUNC(PyGridTableBase, GetColLabelValue);
%MAKE_BASE_FUNC(PyGridTableBase, SetRowLabelValue);
%MAKE_BASE_FUNC(PyGridTableBase, SetColLabelValue);
%MAKE_BASE_FUNC(PyGridTableBase, CanHaveAttributes);
%MAKE_BASE_FUNC(PyGridTableBase, GetAttr);
%MAKE_BASE_FUNC(PyGridTableBase, SetAttr);
%MAKE_BASE_FUNC(PyGridTableBase, SetRowAttr);
%MAKE_BASE_FUNC(PyGridTableBase, SetColAttr);
};

View File

@@ -177,6 +177,18 @@ int wxPyApp::OnExit() {
}
void wxPyApp::ExitMainLoop() {
bool found;
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "ExitMainLoop")))
wxPyCBH_callCallback(m_myInst, Py_BuildValue("()"));
wxPyEndBlockThreads(blocked);
if (! found)
wxApp::ExitMainLoop();
}
#ifdef __WXDEBUG__
void wxPyApp::OnAssert(const wxChar *file,
int line,
@@ -468,6 +480,7 @@ void wxPyApp::_BootstrapApp()
PyObject* method = m_myInst.GetLastFound();
PyObject* argTuple = PyTuple_New(0);
retval = PyEval_CallObject(method, argTuple);
m_myInst.clearRecursionGuard(method);
Py_DECREF(argTuple);
Py_DECREF(method);
if (retval == NULL)
@@ -1717,45 +1730,80 @@ PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name)
static
PyObject* PyMethod_GetDefiningClass(PyObject* method, const char* name)
PyObject* PyMethod_GetDefiningClass(PyObject* method, PyObject* nameo)
{
PyObject* mgc = PyMethod_GET_CLASS(method);
#if PYTHON_API_VERSION <= 1010 // prior to Python 2.2, the easy way
return mgc;
#else // 2.2 and after, the hard way...
PyObject* nameo = PyString_FromString(name);
PyObject* klass = PyFindClassWithAttr(mgc, nameo);
Py_DECREF(nameo);
return klass;
return PyFindClassWithAttr(mgc, nameo);
#endif
}
// To avoid recursion when an overridden virtual method wants to call the base
// class version, temporarily set an attribute in the instance with the same
// name as the method. Then the PyObject_GetAttr in the next findCallback
// will return this attribute and the PyMethod_Check will fail.
void wxPyCallbackHelper::setRecursionGuard(PyObject* method) const
{
PyFunctionObject* func = (PyFunctionObject*)PyMethod_Function(method);
PyObject_SetAttr(m_self, func->func_name, Py_None);
}
void wxPyCallbackHelper::clearRecursionGuard(PyObject* method) const
{
PyFunctionObject* func = (PyFunctionObject*)PyMethod_Function(method);
if (PyObject_HasAttr(m_self, func->func_name)) {
PyObject_DelAttr(m_self, func->func_name);
}
}
// bool wxPyCallbackHelper::hasRecursionGuard(PyObject* method) const
// {
// PyFunctionObject* func = (PyFunctionObject*)PyMethod_Function(method);
// if (PyObject_HasAttr(m_self, func->func_name)) {
// PyObject* attr = PyObject_GetAttr(m_self, func->func_name);
// bool retval = (attr == Py_None);
// Py_DECREF(attr);
// return retval;
// }
// return false;
// }
bool wxPyCallbackHelper::findCallback(const char* name) const {
wxPyCallbackHelper* self = (wxPyCallbackHelper*)this; // cast away const
PyObject *method, *klass;
PyObject* nameo = PyString_FromString(name);
self->m_lastFound = NULL;
// If the object (m_self) has an attibute of the given name...
if (m_self && PyObject_HasAttrString(m_self, (char*)name)) {
PyObject *method, *klass;
method = PyObject_GetAttrString(m_self, (char*)name);
if (m_self && PyObject_HasAttr(m_self, nameo)) {
method = PyObject_GetAttr(m_self, nameo);
// ...and if that attribute is a method, and if that method's class is
// not from a base class...
// not from the registered class or a base class...
if (PyMethod_Check(method) &&
(klass = PyMethod_GetDefiningClass(method, (char*)name)) != NULL &&
((klass == m_class) || PyObject_IsSubclass(klass, m_class))) {
(klass = PyMethod_GetDefiningClass(method, nameo)) != NULL &&
(klass != m_class) &&
PyObject_IsSubclass(klass, m_class)) {
// ...then we'll save a pointer to the method so callCallback can call it.
// ...then we'll save a pointer to the method so callCallback can
// call it. But first, set a recursion guard in case the
// overridden method wants to call the base class version.
setRecursionGuard(method);
self->m_lastFound = method;
}
else {
Py_DECREF(method);
}
}
Py_DECREF(nameo);
return m_lastFound != NULL;
}
@@ -1784,6 +1832,8 @@ PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) const {
PyObject* method = m_lastFound;
result = PyEval_CallObject(method, argTuple);
clearRecursionGuard(method);
Py_DECREF(argTuple);
Py_DECREF(method);
if (!result) {

View File

@@ -50,7 +50,6 @@ MAKE_CONST_WXSTRING2(HtmlPrintingTitleStr, wxT("Printing"))
// TODO: Split this file into multiple %included files that coresponds to the
// wx/html include files (more or less.)
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
%newgroup
@@ -730,7 +729,7 @@ public:
}
void OnLinkClicked(const wxHtmlLinkInfo& link);
void base_OnLinkClicked(const wxHtmlLinkInfo& link);
//- void base_OnLinkClicked(const wxHtmlLinkInfo& link);
wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
const wxString& url,
@@ -760,9 +759,9 @@ void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
if (! found)
wxHtmlWindow::OnLinkClicked(link);
}
void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) {
wxHtmlWindow::OnLinkClicked(link);
}
// void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) {
// wxHtmlWindow::OnLinkClicked(link);
// }
wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
@@ -939,12 +938,16 @@ public:
// Converts current page to text:
wxString ToText();
void base_OnLinkClicked(const wxHtmlLinkInfo& link);
void base_OnSetTitle(const wxString& title);
void base_OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y);
void base_OnCellClicked(wxHtmlCell *cell,
wxCoord x, wxCoord y,
const wxMouseEvent& event);
void OnLinkClicked(const wxHtmlLinkInfo& link);
void OnSetTitle(const wxString& title);
void OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y);
void OnCellClicked(wxHtmlCell *cell,
wxCoord x, wxCoord y,
const wxMouseEvent& event);
%MAKE_BASE_FUNC(HtmlWindow, OnLinkClicked);
%MAKE_BASE_FUNC(HtmlWindow, OnSetTitle);
%MAKE_BASE_FUNC(HtmlWindow, OnCellMouseHover);
%MAKE_BASE_FUNC(HtmlWindow, OnCellClicked);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

View File

@@ -242,36 +242,64 @@ public:
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_DoMoveWindow(int x, int y, int width, int height);
void base_DoSetSize(int x, int y, int width, int height,
void DoMoveWindow(int x, int y, int width, int height);
void DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void base_DoSetClientSize(int width, int height);
void base_DoSetVirtualSize( int x, int y );
void DoSetClientSize(int width, int height);
void DoSetVirtualSize( int x, int y );
DocDeclA(
void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetSize() -> (width, height)");
void, DoGetSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetSize() -> (width, height)");
DocDeclA(
void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetClientSize() -> (width, height)");
void, DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
"DoGetClientSize() -> (width, height)");
DocDeclA(
void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"base_DoGetPosition() -> (x,y)");
void, DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
"DoGetPosition() -> (x,y)");
wxSize base_DoGetVirtualSize() const;
wxSize base_DoGetBestSize() const;
wxSize DoGetVirtualSize() const;
wxSize DoGetBestSize() const;
void base_InitDialog();
bool base_TransferDataToWindow();
bool base_TransferDataFromWindow();
bool base_Validate();
void InitDialog();
bool TransferDataToWindow();
bool TransferDataFromWindow();
bool Validate();
bool base_AcceptsFocus() const;
bool base_AcceptsFocusFromKeyboard() const;
wxSize base_GetMaxSize() const;
bool AcceptsFocus() const;
bool AcceptsFocusFromKeyboard() const;
wxSize GetMaxSize() const;
void base_AddChild(wxWindow* child);
void base_RemoveChild(wxWindow* child);
void AddChild(wxWindow* child);
void RemoveChild(wxWindow* child);
bool ShouldInheritColours() const;
wxVisualAttributes GetDefaultAttributes();
void OnInternalIdle();
%MAKE_BASE_FUNC(PyWizardPage, DoMoveWindow);
%MAKE_BASE_FUNC(PyWizardPage, DoSetSize);
%MAKE_BASE_FUNC(PyWizardPage, DoSetClientSize);
%MAKE_BASE_FUNC(PyWizardPage, DoSetVirtualSize);
%MAKE_BASE_FUNC(PyWizardPage, DoGetSize);
%MAKE_BASE_FUNC(PyWizardPage, DoGetClientSize);
%MAKE_BASE_FUNC(PyWizardPage, DoGetPosition);
%MAKE_BASE_FUNC(PyWizardPage, DoGetVirtualSize);
%MAKE_BASE_FUNC(PyWizardPage, DoGetBestSize);
%MAKE_BASE_FUNC(PyWizardPage, InitDialog);
%MAKE_BASE_FUNC(PyWizardPage, TransferDataToWindow);
%MAKE_BASE_FUNC(PyWizardPage, TransferDataFromWindow);
%MAKE_BASE_FUNC(PyWizardPage, Validate);
%MAKE_BASE_FUNC(PyWizardPage, AcceptsFocus);
%MAKE_BASE_FUNC(PyWizardPage, AcceptsFocusFromKeyboard);
%MAKE_BASE_FUNC(PyWizardPage, GetMaxSize);
%MAKE_BASE_FUNC(PyWizardPage, AddChild);
%MAKE_BASE_FUNC(PyWizardPage, RemoveChild);
%MAKE_BASE_FUNC(PyWizardPage, ShouldInheritColours);
%MAKE_BASE_FUNC(PyWizardPage, GetDefaultAttributes);
%MAKE_BASE_FUNC(PyWizardPage, OnInternalIdle);
};
//----------------------------------------------------------------------