Updated to SWIG 1.3.24 (plus a patch that corrects a bug and adds back

some things that were changed/removed from my patch I submitted to
them.)

Since it is now possible easily and simply share the SWIG type tables
across modules I reverted to always using the stock SWIG runtime
instead of my slightly hacked up version of it exported via the
wxPython C API.

The %name directive is now deprecated so replaced most uses of it with
a custom %Rename macro that uses %rename internally.  These will
evetually need to be replaced with a DocDecl macro when docstrings are
added.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-12-23 20:44:09 +00:00
parent 47261ba05f
commit 1b8c7ba607
76 changed files with 482 additions and 1650 deletions
+2 -1
View File
@@ -210,7 +210,8 @@ MustHaveApp(wxPyArtProvider);
MustHaveApp(wxPyArtProvider::GetBitmap);
MustHaveApp(wxPyArtProvider::GetIcon);
%name(ArtProvider) class wxPyArtProvider /*: public wxObject*/
%rename(ArtProvider) wxPyArtProvider;
class wxPyArtProvider /*: public wxObject*/
{
public:
+6 -2
View File
@@ -128,7 +128,9 @@ that a colour reduction may have to take place.", "",
%extend {
DocStr(wxBitmap(PyObject* listOfStrings),
"Construct a Bitmap from a list of strings formatted as XPM data.", "");
%name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) {
%RenameCtor(BitmapFromXPMData, wxBitmap(PyObject* listOfStrings))
{
char** cArray = NULL;
wxBitmap* bmp;
@@ -145,7 +147,9 @@ that a colour reduction may have to take place.", "",
function for monochrome bitmaps (depth 1) in portable programs: in
this case the bits parameter should contain an XBM image. For other
bit depths, the behaviour is platform dependent.", "");
%name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) {
%RenameCtor(BitmapFromBits, wxBitmap(PyObject* bits, int width, int height, int depth=1 ))
{
char* buf;
int length;
PyString_AsStringAndSize(bits, &buf, &length);
+6 -28
View File
@@ -42,7 +42,7 @@ swig_type_info* wxPyFindSwigType(const wxChar* className) {
if (! swigType) {
// it wasn't in the cache, so look it up from SWIG
name.Append(wxT(" *"));
swigType = SWIG_Python_TypeQuery(name.mb_str());
swigType = SWIG_TypeQuery(name.mb_str());
// if it still wasn't found, try looking for a mapped name
if (!swigType) {
@@ -53,7 +53,7 @@ swig_type_info* wxPyFindSwigType(const wxChar* className) {
(char*)(const char*)name.mbc_str())) != NULL) {
name = wxString(PyString_AsString(item), *wxConvCurrent);
name.Append(wxT(" *"));
swigType = SWIG_Python_TypeQuery(name.mb_str());
swigType = SWIG_TypeQuery(name.mb_str());
}
}
if (swigType) {
@@ -109,16 +109,13 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyConvertSwigPtr"));
#ifdef SWIG_COBJECT_TYPES
robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) swigType->name, NULL);
robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name);
#else
{
char result[1024];
char *r = result;
*(r++) = '_';
r = SWIG_Python_PackData(r, &ptr, sizeof(void *));
strcpy(r, swigType->name);
robj = PyString_FromString(result);
}
robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ?
PyString_FromString(result) : 0;
}
#endif
return robj;
@@ -132,25 +129,6 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
// even if they are located in another shared library.
static wxPyCoreAPI API = {
(p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister,
(p_SWIG_Python_TypeCheck_t)SWIG_Python_TypeCheck,
(p_SWIG_Python_TypeCast_t)SWIG_Python_TypeCast,
(p_SWIG_Python_TypeDynamicCast_t)SWIG_Python_TypeDynamicCast,
(p_SWIG_Python_TypeName_t)SWIG_Python_TypeName,
(p_SWIG_Python_TypePrettyName_t)SWIG_Python_TypePrettyName,
(p_SWIG_Python_TypeQuery_t)SWIG_Python_TypeQuery,
(p_SWIG_Python_TypeClientData_t)SWIG_Python_TypeClientData,
(p_SWIG_Python_newvarlink_t)SWIG_Python_newvarlink,
(p_SWIG_Python_addvarlink_t)SWIG_Python_addvarlink,
(p_SWIG_Python_ConvertPtr_t)SWIG_Python_ConvertPtr,
(p_SWIG_Python_ConvertPacked_t)SWIG_Python_ConvertPacked,
(p_SWIG_Python_PackData_t)SWIG_Python_PackData,
(p_SWIG_Python_UnpackData_t)SWIG_Python_UnpackData,
(p_SWIG_Python_NewPointerObj_t)SWIG_Python_NewPointerObj,
(p_SWIG_Python_NewPackedObj_t)SWIG_Python_NewPackedObj,
(p_SWIG_Python_InstallConstants_t)SWIG_Python_InstallConstants,
(p_SWIG_Python_MustGetPtr_t)SWIG_Python_MustGetPtr,
wxPyCheckSwigType,
wxPyConstructObject,
wxPyConvertSwigPtr,
+3 -2
View File
@@ -115,9 +115,10 @@ black/white (mask respected).",
// %extend {
// DocStr(wxCursor,
// "");
// %name(CursorFromBits) wxCursor(PyObject* bits, int width, int height,
// %RenameCtor(CursorFromBits, wxCursor(PyObject* bits, int width, int height,
// int hotSpotX=-1, int hotSpotY=-1,
// PyObject* maskBits=NULL) {
// PyObject* maskBits=NULL))
// {
// char* bitsbuf;
// char* maskbuf = NULL;
// int length;
+19 -19
View File
@@ -343,15 +343,15 @@ public:
// returns the number of days in this year (356 or 355 for Gregorian
// calendar usually :-)
%name(GetNumberOfDaysinYear)
static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian);
%Rename(GetNumberOfDaysinYear,
static wxDateTime_t, GetNumberOfDays(int year, Calendar cal = Gregorian));
// get the number of the days in the given month (default value for
// the year means the current one)
%name(GetNumberOfDaysInMonth)
static wxDateTime_t GetNumberOfDays(Month month,
%Rename(GetNumberOfDaysInMonth,
static wxDateTime_t, GetNumberOfDays(Month month,
int year = Inv_Year,
Calendar cal = Gregorian);
Calendar cal = Gregorian));
// get the full (default) or abbreviated month name in the current
// locale, returns empty string on error
@@ -400,19 +400,19 @@ public:
// constructors
wxDateTime();
%name(DateTimeFromTimeT)wxDateTime(time_t timet);
%name(DateTimeFromJDN)wxDateTime(double jdn);
%name(DateTimeFromHMS)wxDateTime(wxDateTime_t hour,
%RenameCtor(DateTimeFromTimeT, wxDateTime(time_t timet));
%RenameCtor(DateTimeFromJDN, wxDateTime(double jdn));
%RenameCtor(DateTimeFromHMS, wxDateTime(wxDateTime_t hour,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
%name(DateTimeFromDMY)wxDateTime(wxDateTime_t day,
wxDateTime_t millisec = 0));
%RenameCtor(DateTimeFromDMY, wxDateTime(wxDateTime_t day,
Month month = Inv_Month,
int year = Inv_Year,
wxDateTime_t hour = 0,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
wxDateTime_t millisec = 0));
~wxDateTime();
@@ -422,16 +422,16 @@ public:
wxDateTime& SetToCurrent();
// set to given time_t value
%name(SetTimeT)wxDateTime& Set(time_t timet);
%Rename(SetTimeT, wxDateTime&, Set(time_t timet));
// set to given JDN (beware of rounding errors)
%name(SetJDN)wxDateTime& Set(double jdn);
%Rename(SetJDN, wxDateTime&, Set(double jdn));
// set to given time, date = today
%name(SetHMS)wxDateTime& Set(wxDateTime_t hour,
%Rename(SetHMS, wxDateTime&, Set(wxDateTime_t hour,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
wxDateTime_t millisec = 0));
// from separate values for each component with explicit date
// (defaults for month and year are the current values)
@@ -681,15 +681,15 @@ public:
// arithmetics with dates (see also below for more operators)
// add a time span (positive or negative)
%name(AddTS) wxDateTime& Add(const wxTimeSpan& diff);
%Rename(AddTS, wxDateTime&, Add(const wxTimeSpan& diff));
// add a date span (positive or negative)
%name(AddDS) wxDateTime& Add(const wxDateSpan& diff);
%Rename(AddDS, wxDateTime&, Add(const wxDateSpan& diff));
// subtract a time span (positive or negative)
%name(SubtractTS) wxDateTime& Subtract(const wxTimeSpan& diff);
%Rename(SubtractTS, wxDateTime&, Subtract(const wxTimeSpan& diff));
// subtract a date span (positive or negative)
%name(SubtractDS) wxDateTime& Subtract(const wxDateSpan& diff);
%Rename(SubtractDS, wxDateTime&, Subtract(const wxDateSpan& diff));
// return the difference between two dates
wxTimeSpan Subtract(const wxDateTime& dt) const;
+23 -34
View File
@@ -95,7 +95,7 @@ Note: The present implementation for non-Windows platforms may fail to
find colour borders if the pixels do not match the colour
exactly. However the function will still return true.", "");
bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
%name(FloodFillPoint) bool FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE);
%Rename(FloodFillPoint, bool, FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE));
DocStr(
@@ -122,7 +122,7 @@ used for drawing the line. Note that the second point is *not* part of
the line and is not drawn by this function (this is consistent with
the behaviour of many other toolkits).", "");
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
%name(DrawLinePoint) void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
%Rename(DrawLinePoint, void, DrawLine(const wxPoint& pt1, const wxPoint& pt2));
DocStr(
@@ -131,7 +131,7 @@ the behaviour of many other toolkits).", "");
horizontal line the height and width of the window, centred on the
given point.", "");
void CrossHair(wxCoord x, wxCoord y);
%name(CrossHairPoint) void CrossHair(const wxPoint& pt);
%Rename(CrossHairPoint, void, CrossHair(const wxPoint& pt));
DocStr(
@@ -143,14 +143,14 @@ and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to
the end point.", "");
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc);
%name(DrawArcPoint) void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center);
%Rename(DrawArcPoint, void, DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center));
DocStr(
DrawCheckMark,
"Draws a check mark inside the given rectangle.", "");
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(DrawCheckMarkRect) void DrawCheckMark(const wxRect& rect);
%Rename(DrawCheckMarkRect, void, DrawCheckMark(const wxRect& rect));
DocStr(
DrawEllipticArc,
@@ -164,14 +164,14 @@ rectangle. Angles are specified in degrees (360 is a complete
circle). Positive values mean counter-clockwise motion. If start is
equal to end, a complete ellipse will be drawn.", "");
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double start, double end);
%name(DrawEllipticArcPointSize) void DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end);
%Rename(DrawEllipticArcPointSize, void, DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end));
DocStr(
DrawPoint,
"Draws a point using the current pen.", "");
void DrawPoint(wxCoord x, wxCoord y);
%name(DrawPointPoint) void DrawPoint(const wxPoint& pt);
%Rename(DrawPointPoint, void, DrawPoint(const wxPoint& pt));
DocStr(
@@ -180,8 +180,8 @@ equal to end, a complete ellipse will be drawn.", "");
size. The current pen is used for the outline and the current brush
for filling the shape.", "");
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(DrawRectangleRect)void DrawRectangle(const wxRect& rect);
%name(DrawRectanglePointSize) void DrawRectangle(const wxPoint& pt, const wxSize& sz);
%Rename(DrawRectangleRect,void, DrawRectangle(const wxRect& rect));
%Rename(DrawRectanglePointSize, void, DrawRectangle(const wxPoint& pt, const wxSize& sz));
DocStr(
@@ -198,8 +198,8 @@ means that the corner can be a sensible size relative to the size of
the rectangle, and also avoids the strange effects X produces when the
corners are too big for the rectangle.", "");
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius);
%name(DrawRoundedRectangleRect) void DrawRoundedRectangle(const wxRect& r, double radius);
%name(DrawRoundedRectanglePointSize) void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius);
%Rename(DrawRoundedRectangleRect, void, DrawRoundedRectangle(const wxRect& r, double radius));
%Rename(DrawRoundedRectanglePointSize, void, DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius));
DocStr(
@@ -210,7 +210,7 @@ shape.", "
:see: `DrawEllipse`");
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
%name(DrawCirclePoint) void DrawCircle(const wxPoint& pt, wxCoord radius);
%Rename(DrawCirclePoint, void, DrawCircle(const wxPoint& pt, wxCoord radius));
DocStr(
@@ -220,8 +220,8 @@ is used for the outline and the current brush for filling the shape.", "
:see: `DrawCircle`");
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(DrawEllipseRect) void DrawEllipse(const wxRect& rect);
%name(DrawEllipsePointSize) void DrawEllipse(const wxPoint& pt, const wxSize& sz);
%Rename(DrawEllipseRect, void, DrawEllipse(const wxRect& rect));
%Rename(DrawEllipsePointSize, void, DrawEllipse(const wxPoint& pt, const wxSize& sz));
DocStr(
@@ -230,7 +230,7 @@ is used for the outline and the current brush for filling the shape.", "
PostScript). This can be the simplest way of drawing bitmaps on a
window.", "");
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
%name(DrawIconPoint) void DrawIcon(const wxIcon& icon, const wxPoint& pt);
%Rename(DrawIconPoint, void, DrawIcon(const wxIcon& icon, const wxPoint& pt));
DocStr(
@@ -247,7 +247,7 @@ current text background colour to draw the background (all bits set to
:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`");
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false);
%name(DrawBitmapPoint) void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false);
%Rename(DrawBitmapPoint, void, DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false));
DocStr(
@@ -265,7 +265,7 @@ logical functions with this function in portable programs.", "
:see: `DrawRotatedText`");
void DrawText(const wxString& text, wxCoord x, wxCoord y);
%name(DrawTextPoint) void DrawText(const wxString& text, const wxPoint& pt);
%Rename(DrawTextPoint, void, DrawText(const wxString& text, const wxPoint& pt));
DocStr(
@@ -279,7 +279,7 @@ font. ``wx.SWISS_FONT`` is an example of a font which is.","
:see: `DrawText`");
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
%name(DrawRotatedTextPoint) void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle);
%Rename(DrawRotatedTextPoint, void, DrawRotatedText(const wxString& text, const wxPoint& pt, double angle));
DocDeclStr(
@@ -347,9 +347,9 @@ screen is damaged.", "
:see: `DestroyClippingRegion`, `wx.Region`");
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(SetClippingRegionPointSize) void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
%name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
%name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
%Rename(SetClippingRegionPointSize, void, SetClippingRegion(const wxPoint& pt, const wxSize& sz));
%Rename(SetClippingRegionAsRegion, void, SetClippingRegion(const wxRegion& region));
%Rename(SetClippingRect, void, SetClippingRegion(const wxRect& rect));
@@ -1243,6 +1243,7 @@ class wxBufferedDC : public wxMemoryDC
public:
%pythonAppend wxBufferedDC
"self.__dc = args[0] # save a ref so the other dc will not be deleted before self";
%nokwargs wxBufferedDC;
DocStr(
@@ -1272,7 +1273,7 @@ public:
// // TODO: Keep this one too?
// %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area )
// "val.__dc = args[0] # save a ref so the other dc will not be deleted before self";
// %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area );
// %RenameCtor(BufferedDCInternalBuffer, wxBufferedDC( wxDC *dc, const wxSize &area ));
// The buffer is blit to the real DC when the BufferedDC is destroyed.
@@ -1590,11 +1591,6 @@ MustHaveApp(wxPrinterDC);
class wxPrinterDC : public wxDC {
public:
wxPrinterDC(const wxPrintData& printData);
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device,
// const wxString& output,
// bool interactive = true,
// int orientation = wxPORTRAIT);
};
#else
@@ -1604,19 +1600,12 @@ public:
wxPrinterDC(const wxPrintData&)
{ wxPyRaiseNotImplemented(); }
// wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
// { wxPyRaiseNotImplemented(); }
};
%}
class wxPrinterDC : public wxDC {
public:
wxPrinterDC(const wxPrintData& printData);
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device,
// const wxString& output,
// bool interactive = true,
// int orientation = wxPORTRAIT);
};
#endif
+38 -12
View File
@@ -82,14 +82,16 @@ typedef unsigned long wxUIntPtr;
%define MAKE_CONST_WXSTRING(strname)
%{ static const wxString wxPy##strname(wx##strname); %}
%immutable;
%name(strname) const wxString wxPy##strname;
%rename(strname) wxPy##strname;
const wxString wxPy##strname;
%mutable;
%enddef
%define MAKE_CONST_WXSTRING2(strname, val)
%{ static const wxString wxPy##strname(val); %}
%immutable;
%name(strname) const wxString wxPy##strname;
%rename(strname) wxPy##strname;
const wxString wxPy##strname;
%mutable;
%enddef
@@ -163,12 +165,14 @@ typedef unsigned long wxUIntPtr;
#ifdef _DO_FULL_DOCS
%define DocDeclStrName(type, decl, docstr, details, newname)
%feature("docstring") decl docstr details;
%name(newname) type decl
%rename(newname) decl;
type decl
%enddef
#else
%define DocDeclStrName(type, decl, docstr, details, newname)
%feature("docstring") decl docstr;
%name(newname) type decl
%rename(newname) decl;
type decl
%enddef
#endif
@@ -183,7 +187,8 @@ typedef unsigned long wxUIntPtr;
// As above, but also give the decl a new %name
%define DocDeclAName(type, decl, astr, newname)
%feature("autodoc") decl astr;
%name(newname) type decl
%rename(newname) decl;
type decl
%enddef
@@ -210,13 +215,15 @@ typedef unsigned long wxUIntPtr;
%define DocDeclAStrName(type, decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr details;
%name(newname) type decl
%rename(newname) decl;
type decl
%enddef
#else
%define DocDeclAStrName(type, decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr;
%name(newname) type decl
%rename(newname) decl;
type decl
%enddef
#endif
@@ -241,12 +248,14 @@ typedef unsigned long wxUIntPtr;
#ifdef _DO_FULL_DOCS
%define DocCtorStrName(decl, docstr, details, newname)
%feature("docstring") decl docstr details;
%name(newname) decl
%rename(newname) decl;
decl
%enddef
#else
%define DocCtorStrName(decl, docstr, details, newname)
%feature("docstring") decl docstr;
%name(newname) decl
%rename(newname) decl;
decl
%enddef
#endif
@@ -262,7 +271,8 @@ typedef unsigned long wxUIntPtr;
// As above, but also give the decl a new %name
%define DocCtorAName(decl, astr, newname)
%feature("autodoc") decl astr;
%name(newname) decl
%rename(newname) decl;
decl
%enddef
@@ -290,13 +300,15 @@ typedef unsigned long wxUIntPtr;
%define DocCtorAStrName(decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr details;
%name(newname) decl
%rename(newname) decl;
decl
%enddef
#else
%define DocCtorAStrName(decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr;
%name(newname) decl
%rename(newname) decl;
decl
%enddef
#endif
@@ -308,6 +320,20 @@ typedef unsigned long wxUIntPtr;
}
%enddef
// A set of macros to make using %rename easier, since %name has been
// deprecated...
%define %Rename(newname, type, decl)
%rename(newname) decl;
type decl
%enddef
%define %RenameCtor(newname, decl)
%rename(newname) decl;
decl
%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
+2 -2
View File
@@ -70,7 +70,7 @@ public:
const wxString& filter = wxPyEmptyString,
int defaultFilter = 0,
const wxString& name = wxPyTreeCtrlNameStr);
%name(PreGenericDirCtrl)wxGenericDirCtrl();
%RenameCtor(PreGenericDirCtrl, wxGenericDirCtrl());
bool Create(wxWindow *parent, const wxWindowID id = -1,
@@ -150,7 +150,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
%name(PreDirFilterListCtrl)wxDirFilterListCtrl();
%RenameCtor(PreDirFilterListCtrl, wxDirFilterListCtrl());
bool Create(wxGenericDirCtrl* parent, const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
+8 -4
View File
@@ -55,7 +55,8 @@ IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
%}
%name(DropSource) class wxPyDropSource {
%rename(DropSource) wxPyDropSource;
class wxPyDropSource {
public:
%pythonAppend wxPyDropSource "self._setCallbackInfo(self, DropSource, 0)"
#ifndef __WXGTK__
@@ -115,7 +116,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
%}
%name(DropTarget) class wxPyDropTarget // : public wxDropTarget
%rename(DropTarget) wxPyDropTarget;
class wxPyDropTarget // : public wxDropTarget
{
public:
%pythonAppend wxPyDropTarget
@@ -178,7 +180,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop);
%}
%name(TextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget {
%rename(TextDropTarget) wxPyTextDropTarget;
class wxPyTextDropTarget : public wxPyDropTarget {
public:
%pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)"
@@ -238,7 +241,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop);
%}
%name(FileDropTarget) class wxPyFileDropTarget : public wxPyDropTarget
%rename(FileDropTarget) wxPyFileDropTarget;
class wxPyFileDropTarget : public wxPyDropTarget
{
public:
%pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)"
+10 -9
View File
@@ -26,22 +26,23 @@
MustHaveApp(wxGenericDragImage);
%name (DragImage) class wxGenericDragImage : public wxObject
%rename (DragImage) wxGenericDragImage;
class wxGenericDragImage : public wxObject
{
public:
wxGenericDragImage(const wxBitmap& image,
const wxCursor& cursor = wxNullCursor);
%name(DragIcon)wxGenericDragImage(const wxIcon& image,
const wxCursor& cursor = wxNullCursor);
%RenameCtor(DragIcon, wxGenericDragImage(const wxIcon& image,
const wxCursor& cursor = wxNullCursor));
%name(DragString)wxGenericDragImage(const wxString& str,
const wxCursor& cursor = wxNullCursor);
%RenameCtor(DragString, wxGenericDragImage(const wxString& str,
const wxCursor& cursor = wxNullCursor));
%name(DragTreeItem)wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id);
%RenameCtor(DragTreeItem, wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id));
%name(DragListItem)wxGenericDragImage(const wxPyListCtrl& listCtrl, long id);
%RenameCtor(DragListItem, wxGenericDragImage(const wxPyListCtrl& listCtrl, long id));
~wxGenericDragImage();
@@ -57,8 +58,8 @@ public:
// Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. This is full screen only. fullScreenRect gives the
// position of the window on the screen, to restrict the drag to.
%name(BeginDragBounded) bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
wxWindow* boundingWindow);
%Rename(BeginDragBounded, bool, BeginDrag(const wxPoint& hotspot, wxWindow* window,
wxWindow* boundingWindow));
// End drag
+4 -2
View File
@@ -88,7 +88,8 @@ IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext
%name(CPPFileSystemHandler) class wxFileSystemHandler //: public wxObject
%rename(CPPFileSystemHandler) wxFileSystemHandler;
class wxFileSystemHandler //: public wxObject
{
public:
//wxFileSystemHandler();
@@ -96,7 +97,8 @@ public:
%name(FileSystemHandler) class wxPyFileSystemHandler : public wxFileSystemHandler
%rename(FileSystemHandler) wxPyFileSystemHandler;
class wxPyFileSystemHandler : public wxFileSystemHandler
{
public:
%pythonAppend wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)";
+20 -16
View File
@@ -449,19 +449,21 @@ public:
wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
~wxFont();
%name(FontFromNativeInfo) wxFont(const wxNativeFontInfo& info);
%RenameCtor(FontFromNativeInfo, wxFont(const wxNativeFontInfo& info));
%extend {
%name(FontFromNativeInfoString) wxFont(const wxString& info) {
%RenameCtor(FontFromNativeInfoString, wxFont(const wxString& info))
{
wxNativeFontInfo nfi;
nfi.FromString(info);
return new wxFont(nfi);
}
%name(Font2) wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxPyEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
%RenameCtor(Font2, wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxPyEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
{
return wxFont::New(pointSize, family, flags, face, encoding);
}
}
@@ -469,13 +471,14 @@ public:
// There is a real ctor for this on wxMSW, but not the others, so just use
// the factory funciton in all cases.
%extend {
%name(FontFromPixelSize) wxFont(const wxSize& pixelSize,
int family,
int style,
int weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
%RenameCtor(FontFromPixelSize, wxFont(const wxSize& pixelSize,
int family,
int style,
int weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
{
return wxFontBase::New(pixelSize, family,
style, weight, underlined,
face, encoding);
@@ -521,7 +524,7 @@ public:
virtual void SetUnderlined( bool underlined );
virtual void SetEncoding(wxFontEncoding encoding);
void SetNativeFontInfo(const wxNativeFontInfo& info);
%name(SetNativeFontInfoFromString) void SetNativeFontInfo(const wxString& info);
%Rename(SetNativeFontInfoFromString, void, SetNativeFontInfo(const wxString& info));
void SetNativeFontInfoUserDesc(const wxString& info);
// translate the fonts into human-readable string (i.e. GetStyleString()
@@ -565,7 +568,8 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc
MustHaveApp(wxPyFontEnumerator);
%name(FontEnumerator) class wxPyFontEnumerator {
%rename(FontEnumerator) wxPyFontEnumerator;
class wxPyFontEnumerator {
public:
%pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)"
+1 -1
View File
@@ -42,7 +42,7 @@ public:
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyGaugeNameStr);
%name(PreGauge)wxGauge();
%RenameCtor(PreGauge, wxGauge());
bool Create(wxWindow* parent, wxWindowID id=-1, int range=100,
const wxPoint& pos = wxDefaultPosition,
+20 -19
View File
@@ -221,12 +221,13 @@ are created automatically when the sizer's Add method is called.", "");
%extend {
DocStr(wxGBSizerItem( wxWindow *window, const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL ),
"Construct a `wx.GBSizerItem` for a window.", "");
%name(GBSizerItemWindow) wxGBSizerItem( wxWindow *window,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
PyObject* userData=NULL )
%RenameCtor(GBSizerItemWindow, wxGBSizerItem( wxWindow *window,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
PyObject* userData=NULL ))
{
wxPyUserData* data = NULL;
if ( userData ) {
@@ -240,12 +241,12 @@ are created automatically when the sizer's Add method is called.", "");
DocStr(wxGBSizerItem( wxSizer *sizer,const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL ),
"Construct a `wx.GBSizerItem` for a sizer", "");
%name(GBSizerItemSizer) wxGBSizerItem( wxSizer *sizer,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
PyObject* userData=NULL )
%RenameCtor(GBSizerItemSizer, wxGBSizerItem( wxSizer *sizer,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
PyObject* userData=NULL ))
{
wxPyUserData* data = NULL;
if ( userData ) {
@@ -259,13 +260,13 @@ are created automatically when the sizer's Add method is called.", "");
DocStr(wxGBSizerItem( int width,int height,const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL),
"Construct a `wx.GBSizerItem` for a spacer.", "");
%name(GBSizerItemSpacer) wxGBSizerItem( int width,
int height,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
PyObject* userData=NULL)
%RenameCtor(GBSizerItemSpacer, wxGBSizerItem( int width,
int height,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
PyObject* userData=NULL))
{
wxPyUserData* data = NULL;
if ( userData ) {
+10 -10
View File
@@ -113,15 +113,15 @@ enum wxStockCursor
DocStr( wxSize,
"wx.Size is a useful data structure used to represent the size of
something. It simply contians integer width and height proprtites.
In most places in wxPython where a wx.Size is expected a
(width,height) tuple can be used instead.", "");
something. It simply contians integer width and height
proprtites. In most places in wxPython where a wx.Size is
expected a (width, height) tuple can be used instead.", "");
class wxSize
{
public:
%name(width) int x;
%name(height)int y;
%Rename(width, int, x);
%Rename(height,int, y);
%pythoncode { x = width; y = height }
DocCtorStr(
@@ -532,7 +532,7 @@ bottom, otherwise it is moved to the left or top respectively.", "",
DocStr( Inside, "Return True if the point is (not strcitly) inside the rect.", "");
%name(InsideXY)bool Inside(int x, int y) const;
%Rename(InsideXY, bool, Inside(int x, int y) const);
bool Inside(const wxPoint& pt) const;
DocDeclStr(
@@ -626,8 +626,8 @@ class wxPoint2D
public:
DocStr(wxPoint2D, "Create a w.Point2D object.", "");
wxPoint2D( double x=0.0 , double y=0.0 );
%name(Point2DCopy) wxPoint2D( const wxPoint2D &pt );
%name(Point2DFromPoint) wxPoint2D( const wxPoint &pt );
%RenameCtor(Point2DCopy, wxPoint2D( const wxPoint2D &pt ));
%RenameCtor(Point2DFromPoint, wxPoint2D( const wxPoint &pt ));
DocDeclAStr(
void, GetFloor( int *OUTPUT , int *OUTPUT ) const,
@@ -677,8 +677,8 @@ public:
bool, operator!=(const wxPoint2D& pt) const,
"Test for inequality", "");
%name(x)double m_x;
%name(y)double m_y;
%Rename(x, double, m_x);
%Rename(y, double, m_y);
%extend {
void Set( double x=0 , double y=0 ) {
+9 -7
View File
@@ -30,15 +30,17 @@ public:
~wxIcon();
// alternate constructors
%name(EmptyIcon) wxIcon();
%name(IconFromLocation) wxIcon(const wxIconLocation& loc);
%RenameCtor(EmptyIcon, wxIcon());
%RenameCtor(IconFromLocation, wxIcon(const wxIconLocation& loc));
%extend {
%name(IconFromBitmap) wxIcon(const wxBitmap& bmp) {
%RenameCtor(IconFromBitmap, wxIcon(const wxBitmap& bmp))
{
wxIcon* icon = new wxIcon();
icon->CopyFromBitmap(bmp);
return icon;
}
%name(IconFromXPMData) wxIcon(PyObject* listOfStrings) {
%RenameCtor(IconFromXPMData, wxIcon(PyObject* listOfStrings))
{
char** cArray = NULL;
wxIcon* icon;
@@ -136,10 +138,10 @@ public:
wxIconBundle();
// initializes the bundle with the icon(s) found in the file
%name(IconBundleFromFile) wxIconBundle( const wxString& file, long type );
%RenameCtor(IconBundleFromFile, wxIconBundle( const wxString& file, long type ));
// initializes the bundle with a single icon
%name(IconBundleFromIcon)wxIconBundle( const wxIcon& icon );
%RenameCtor(IconBundleFromIcon, wxIconBundle( const wxIcon& icon ));
~wxIconBundle();
@@ -151,7 +153,7 @@ public:
// adds all the icons contained in the file to the collection,
// if the collection already contains icons with the same
// width and height, they are replaced
%name(AddIconFromFile)void AddIcon( const wxString& file, long type );
%Rename(AddIconFromFile,void, AddIcon( const wxString& file, long type ));
// returns the icon with the given size; if no such icon exists,
// returns the icon with size wxSYS_ICON_[XY]; if no such icon exists,
+39 -15
View File
@@ -76,15 +76,32 @@ success flag and rgb values.", "");
class wxImage : public wxObject {
public:
wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
DocCtorStr(
wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ),
"", "");
~wxImage();
// Alternate constructors
%name(ImageFromMime) wxImage(const wxString& name, const wxString& mimetype, int index = -1);
%name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
%name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
DocCtorStrName(
wxImage(const wxString& name, const wxString& mimetype, int index = -1),
"", "",
ImageFromMime);
DocCtorStrName(
wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1),
"", "",
ImageFromStream);
DocCtorStrName(
wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 ),
"", "",
ImageFromStreamMime);
%extend {
%name(EmptyImage) wxImage(int width=0, int height=0, bool clear = true) {
%rename(EmptyImage) wxImage(int width=0, int height=0, bool clear = true);
wxImage(int width=0, int height=0, bool clear = true)
{
if (width > 0 && height > 0)
return new wxImage(width, height, clear);
else
@@ -92,11 +109,15 @@ public:
}
MustHaveApp(wxImage(const wxBitmap &bitmap));
%name(ImageFromBitmap) wxImage(const wxBitmap &bitmap) {
%rename(ImageFromBitmap) wxImage(const wxBitmap &bitmap);
wxImage(const wxBitmap &bitmap)
{
return new wxImage(bitmap.ConvertToImage());
}
%name(ImageFromData) wxImage(int width, int height, unsigned char* data) {
%rename(ImageFromData) wxImage(int width, int height, unsigned char* data);
wxImage(int width, int height, unsigned char* data)
{
// Copy the source data so the wxImage can clean it up later
unsigned char* copy = (unsigned char*)malloc(width*height*3);
if (copy == NULL) {
@@ -106,8 +127,11 @@ public:
memcpy(copy, data, width*height*3);
return new wxImage(width, height, copy, false);
}
%name(ImageFromDataWithAlpha) wxImage(int width, int height,
unsigned char* data, unsigned char* alpha) {
%rename(ImageFromDataWithAlpha) wxImage(int width, int height, unsigned char* data, unsigned char* alpha);
wxImage(int width, int height, unsigned char* data, unsigned char* alpha)
{
// Copy the source data so the wxImage can clean it up later
unsigned char* dcopy = (unsigned char*)malloc(width*height*3);
if (dcopy == NULL) {
@@ -190,14 +214,14 @@ The method will then fill up the whole image with the colour given.", "");
static int GetImageCount( const wxString& name, long type = wxBITMAP_TYPE_ANY );
bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
%name(LoadMimeFile)bool LoadFile( const wxString& name, const wxString& mimetype, int index = -1 );
%Rename(LoadMimeFile, bool, LoadFile( const wxString& name, const wxString& mimetype, int index = -1 ));
bool SaveFile( const wxString& name, int type );
%name(SaveMimeFile)bool SaveFile( const wxString& name, const wxString& mimetype );
%Rename(SaveMimeFile, bool, SaveFile( const wxString& name, const wxString& mimetype ));
%name(CanReadStream) static bool CanRead( wxInputStream& stream );
%name(LoadStream) bool LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 );
%name(LoadMimeStream) bool LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 );
%Rename(CanReadStream, static bool, CanRead( wxInputStream& stream ));
%Rename(LoadStream, bool, LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 ));
%Rename(LoadMimeStream, bool, LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 ));
bool Ok();
int GetWidth();
@@ -341,7 +365,7 @@ The method will then fill up the whole image with the colour given.", "");
wxImage ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const;
void SetOption(const wxString& name, const wxString& value);
%name(SetOptionInt)void SetOption(const wxString& name, int value);
%Rename(SetOptionInt, void, SetOption(const wxString& name, int value));
wxString GetOption(const wxString& name) const;
int GetOptionInt(const wxString& name) const;
bool HasOption(const wxString& name) const;
+3 -3
View File
@@ -47,12 +47,12 @@ public:
~wxImageList();
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
%name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour);
%name(AddIcon)int Add(const wxIcon& icon);
%Rename(AddWithColourMask,int, Add(const wxBitmap& bitmap, const wxColour& maskColour));
%Rename(AddIcon,int, Add(const wxIcon& icon));
#ifdef __WXMSW__
bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
#else
// %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon);
// %Rename(ReplaceIcon,bool, Replace(int index, const wxIcon& icon));
// int Add(const wxBitmap& bitmap);
bool Replace(int index, const wxBitmap& bitmap);
#endif
+4 -4
View File
@@ -42,7 +42,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListBoxNameStr);
%name(PreListBox)wxListBox();
%RenameCtor(PreListBox, wxListBox());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
@@ -95,7 +95,7 @@ public:
// set the specified item at the first visible item or scroll to max
// range.
void SetFirstItem(int n);
%name(SetFirstItemStr) void SetFirstItem(const wxString& s);
%Rename(SetFirstItemStr, void, SetFirstItem(const wxString& s));
// ensures that the given item is visible scrolling the listbox if
// necessary
@@ -156,7 +156,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListBoxNameStr);
%name(PreCheckListBox)wxCheckListBox();
%RenameCtor(PreCheckListBox, wxCheckListBox());
bool Create(wxWindow *parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
@@ -176,7 +176,7 @@ public:
// return the index of the item at this position or wxNOT_FOUND
int HitTest(const wxPoint& pt) const;
%name(HitTestXY)int HitTest(wxCoord x, wxCoord y) const;
%Rename(HitTestXY, int, HitTest(wxCoord x, wxCoord y) const);
};
//---------------------------------------------------------------------------
+11 -10
View File
@@ -406,7 +406,8 @@ IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage);
MustHaveApp(wxPyListCtrl);
%name(ListCtrl)class wxPyListCtrl : public wxControl {
%rename(ListCtrl) wxPyListCtrl;
class wxPyListCtrl : public wxControl {
public:
%pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)"
@@ -418,7 +419,7 @@ public:
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListCtrlNameStr);
%name(PreListCtrl)wxPyListCtrl();
%RenameCtor(PreListCtrl, wxPyListCtrl());
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
@@ -494,7 +495,7 @@ public:
bool SetItem(wxListItem& info) ;
// Sets a string field at a particular column
%name(SetStringItem)long SetItem(long index, int col, const wxString& label, int imageId = -1);
%Rename(SetStringItem, long, SetItem(long index, int col, const wxString& label, int imageId = -1));
// Gets the item state
int GetItemState(long item, long stateMask) const ;
@@ -637,11 +638,11 @@ public:
// Find an item whose data matches this data, starting from the item after 'start'
// or the beginning if 'start' is -1.
%name(FindItemData) long FindItem(long start, long data);
%Rename(FindItemData, long, FindItem(long start, long data));
// Find an item nearest this position in the specified direction, starting from
// the item after 'start' or the beginning if 'start' is -1.
%name(FindItemAtPos) long FindItem(long start, const wxPoint& pt, int direction);
%Rename(FindItemAtPos, long, FindItem(long start, const wxPoint& pt, int direction));
DocDeclAStr(
@@ -655,16 +656,16 @@ details in the second return value (see wxLIST_HITTEST_... flags.)", "");
long InsertItem(wxListItem& info);
// Insert a string item
%name(InsertStringItem) long InsertItem(long index, const wxString& label);
%Rename(InsertStringItem, long, InsertItem(long index, const wxString& label));
// Insert an image item
%name(InsertImageItem) long InsertItem(long index, int imageIndex);
%Rename(InsertImageItem, long, InsertItem(long index, int imageIndex));
// Insert an image/string item
%name(InsertImageStringItem) long InsertItem(long index, const wxString& label, int imageIndex);
%Rename(InsertImageStringItem, long, InsertItem(long index, const wxString& label, int imageIndex));
// For list view mode (only), inserts a column.
%name(InsertColumnInfo) long InsertColumn(long col, wxListItem& info);
%Rename(InsertColumnInfo, long, InsertColumn(long col, wxListItem& info));
long InsertColumn(long col,
const wxString& heading,
@@ -802,7 +803,7 @@ public:
long style = wxLC_REPORT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListCtrlNameStr);
%name(PreListView)wxListView();
%RenameCtor(PreListView, wxListView());
bool Create( wxWindow *parent,
wxWindowID id = -1,
+13 -13
View File
@@ -302,22 +302,22 @@ const wxString wxSysErrorMsg(unsigned long nErrCode = 0);
%}
%name(LogFatalError) void wxPyLogFatalError(const wxString& msg);
%name(LogError) void wxPyLogError(const wxString& msg);
%name(LogWarning) void wxPyLogWarning(const wxString& msg);
%name(LogMessage) void wxPyLogMessage(const wxString& msg);
%name(LogInfo) void wxPyLogInfo(const wxString& msg);
%name(LogDebug) void wxPyLogDebug(const wxString& msg);
%name(LogVerbose) void wxPyLogVerbose(const wxString& msg);
%name(LogStatus) void wxPyLogStatus(const wxString& msg);
%name(LogStatusFrame) void wxPyLogStatusFrame(wxFrame *pFrame, const wxString& msg);
%name(LogSysError) void wxPyLogSysError(const wxString& msg);
%Rename(LogFatalError, void, wxPyLogFatalError(const wxString& msg));
%Rename(LogError, void, wxPyLogError(const wxString& msg));
%Rename(LogWarning, void, wxPyLogWarning(const wxString& msg));
%Rename(LogMessage, void, wxPyLogMessage(const wxString& msg));
%Rename(LogInfo, void, wxPyLogInfo(const wxString& msg));
%Rename(LogDebug, void, wxPyLogDebug(const wxString& msg));
%Rename(LogVerbose, void, wxPyLogVerbose(const wxString& msg));
%Rename(LogStatus, void, wxPyLogStatus(const wxString& msg));
%Rename(LogStatusFrame, void, wxPyLogStatusFrame(wxFrame *pFrame, const wxString& msg));
%Rename(LogSysError, void, wxPyLogSysError(const wxString& msg));
%name(LogGeneric) void wxPyLogGeneric(unsigned long level, const wxString& msg);
%Rename(LogGeneric, void, wxPyLogGeneric(unsigned long level, const wxString& msg));
%nokwargs wxPyLogTrace;
%name(LogTrace) void wxPyLogTrace(unsigned long mask, const wxString& msg);
%name(LogTrace) void wxPyLogTrace(const wxString& mask, const wxString& msg);
%Rename(LogTrace, void, wxPyLogTrace(unsigned long mask, const wxString& msg));
%Rename(LogTrace, void, wxPyLogTrace(const wxString& mask, const wxString& msg));
// wxLogFatalError helper: show the (fatal) error to the user in a safe way,
+3 -3
View File
@@ -47,7 +47,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxPyFrameNameStr);
%name(PreMDIParentFrame)wxMDIParentFrame();
%RenameCtor(PreMDIParentFrame, wxMDIParentFrame());
bool Create(wxWindow *parent,
const wxWindowID id=-1,
@@ -95,7 +95,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
%name(PreMDIChildFrame)wxMDIChildFrame();
%RenameCtor(PreMDIChildFrame, wxMDIChildFrame());
// Turn it back on again
%typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
@@ -126,7 +126,7 @@ public:
%typemap(out) wxMDIClientWindow*; // turn off this typemap
wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
%name(PreMDIClientWindow)wxMDIClientWindow();
%RenameCtor(PreMDIClientWindow, wxMDIClientWindow());
// Turn it back on again
%typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
+17 -17
View File
@@ -50,20 +50,20 @@ public:
const wxString& text,
const wxString& help = wxPyEmptyString);
// append a submenu
%name(AppendMenu) wxMenuItem* Append(int id,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxPyEmptyString);
%Rename(AppendMenu, wxMenuItem*, Append(int id,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
// the most generic form of Append() - append anything
%name(AppendItem) wxMenuItem* Append(wxMenuItem *item);
%Rename(AppendItem, wxMenuItem*, Append(wxMenuItem *item));
// insert a break in the menu (only works when appending the items, not
// inserting them)
virtual void Break();
// insert an item before given position
%name(InsertItem) wxMenuItem* Insert(size_t pos, wxMenuItem *item);
%Rename(InsertItem, wxMenuItem*, Insert(size_t pos, wxMenuItem *item));
// insert an item before given position
wxMenuItem* Insert(size_t pos,
@@ -88,14 +88,14 @@ public:
const wxString& help = wxPyEmptyString);
// insert a submenu
%name(InsertMenu) wxMenuItem* Insert(size_t pos,
%Rename(InsertMenu, wxMenuItem*, Insert(size_t pos,
int id,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxPyEmptyString);
const wxString& help = wxPyEmptyString));
// prepend an item to the menu
%name(PrependItem) wxMenuItem* Prepend(wxMenuItem *item);
%Rename(PrependItem, wxMenuItem*, Prepend(wxMenuItem *item));
// prepend any item to the menu
wxMenuItem* Prepend(int id,
@@ -117,26 +117,26 @@ public:
const wxString& help = wxPyEmptyString);
// prepend a submenu
%name(PrependMenu) wxMenuItem* Prepend(int id,
%Rename(PrependMenu, wxMenuItem*, Prepend(int id,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxPyEmptyString);
const wxString& help = wxPyEmptyString));
// detach an item from the menu, but don't delete it so that it can be
// added back later (but if it's not, the caller is responsible for
// deleting it!)
wxMenuItem *Remove(int id);
%name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item);
%Rename(RemoveItem, wxMenuItem*, Remove(wxMenuItem *item));
// delete an item from the menu (submenus are not destroyed by this
// function, see Destroy)
bool Delete(int id);
%name(DeleteItem) bool Delete(wxMenuItem *item);
%Rename(DeleteItem, bool, Delete(wxMenuItem *item));
// delete the item from menu and destroy it (if it's a submenu)
%extend { void Destroy() { delete self; } }
%name(DestroyId) bool Destroy(int id);
%name(DestroyItem) bool Destroy(wxMenuItem *item);
%Rename(DestroyId, bool, Destroy(int id));
%Rename(DestroyItem, bool, Destroy(wxMenuItem *item));
// get the items
@@ -150,7 +150,7 @@ public:
// search
int FindItem(const wxString& item) const;
%name(FindItemById) wxMenuItem* FindItem(int id /*, wxMenu **menu = NULL*/) const;
%Rename(FindItemById, wxMenuItem*, FindItem(int id /*, wxMenu **menu = NULL*/) const);
// find by position
wxMenuItem* FindItemByPosition(size_t position) const;
@@ -263,7 +263,7 @@ public:
// find item by id (in any menu), returns NULL if not found
//
// if menu is !NULL, it will be filled with wxMenu this item belongs to
%name(FindItemById) virtual wxMenuItem* FindItem(int id /*, wxMenu **menu = NULL*/) const;
%Rename(FindItemById, virtual wxMenuItem*, FindItem(int id /*, wxMenu **menu = NULL*/) const);
// find menu by its caption, return wxNOT_FOUND on failure
int FindMenu(const wxString& title) const;
+2 -2
View File
@@ -48,11 +48,11 @@ public:
// the array elements correspond to the parameters of the ctor above in
// the same order
%name(FileTypeInfoSequence)wxFileTypeInfo(const wxArrayString& sArray);
%Rename(FileTypeInfoSequence,, wxFileTypeInfo(const wxArrayString& sArray));
// invalid item - use this to terminate the array passed to
// wxMimeTypesManager::AddFallbacks
%name(NullFileTypeInfo)wxFileTypeInfo();
%Rename(NullFileTypeInfo,, wxFileTypeInfo());
// test if this object can be used
+4 -4
View File
@@ -62,9 +62,9 @@ public:
wxWindow *GetWindow();
%name(MoveXY)void Move(int x, int y);
%Rename(MoveXY, void, Move(int x, int y));
void Move(const wxPoint& pt);
%name(SetSizeWH) void SetSize(int width, int height);
%Rename(SetSizeWH, void, SetSize(int width, int height));
void SetSize(const wxSize& size);
void Show(int show = true);
void Hide();
@@ -159,7 +159,7 @@ public:
void Save(wxConfigBase& config);
void AddFilesToMenu();
%name(AddFilesToThisMenu)void AddFilesToMenu(wxMenu* menu);
%Rename(AddFilesToThisMenu, void, AddFilesToMenu(wxMenu* menu));
// Accessors
wxString GetHistoryFile(int i) const;
@@ -184,7 +184,7 @@ public:
const wxString& path = wxPyEmptyString);
// default ctor, use Create() after it
%name(PreSingleInstanceChecker) wxSingleInstanceChecker();
%RenameCtor(PreSingleInstanceChecker, wxSingleInstanceChecker());
~wxSingleInstanceChecker();
+4 -4
View File
@@ -36,7 +36,7 @@ public:
// const wxSize& size = wxDefaultSize,
// long style = 0,
// const wxString& name = wxPyEmptyString);
// %name(PreBookCtrlBase)wxBookCtrlBase();
// %RenameCtor(PreBookCtrlBase, wxBookCtrlBase());
// bool Create(wxWindow *parent,
// wxWindowID id,
// const wxPoint& pos = wxDefaultPosition,
@@ -179,7 +179,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyNOTEBOOK_NAME);
%name(PreNotebook)wxNotebook();
%RenameCtor(PreNotebook, wxNotebook());
// Turn it back on again
%typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); }
@@ -307,7 +307,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyEmptyString);
%name(PreListbook)wxListbook();
%RenameCtor(PreListbook, wxListbook());
bool Create(wxWindow *parent,
wxWindowID id=-1,
@@ -371,7 +371,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyEmptyString);
%name(PreChoicebook)wxChoicebook();
%RenameCtor(PreChoicebook, wxChoicebook());
// quasi ctor
bool Create(wxWindow *parent,
+2 -2
View File
@@ -37,7 +37,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxPyPanelNameStr);
%name(PrePanel)wxPanel();
%RenameCtor(PrePanel, wxPanel());
// Turn it back on again
%typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); }
@@ -96,7 +96,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxHSCROLL | wxVSCROLL,
const wxString& name = wxPyPanelNameStr);
%name(PreScrolledWindow)wxScrolledWindow();
%RenameCtor(PreScrolledWindow, wxScrolledWindow());
// Turn it back on again
%typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); }
+8 -6
View File
@@ -35,7 +35,7 @@ public:
%pythonAppend wxPopupWindow() ""
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
%name(PrePopupWindow)wxPopupWindow();
%RenameCtor(PrePopupWindow, wxPopupWindow());
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
@@ -81,14 +81,15 @@ MustHaveApp(wxPyPopupTransientWindow);
// wxPopupTransientWindow: a wxPopupWindow which disappears automatically
// when the user clicks mouse outside it or if it loses focus in any other way
%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
%rename(PopupTransientWindow) wxPyPopupTransientWindow;
class wxPyPopupTransientWindow : public wxPopupWindow
{
public:
%pythonAppend wxPyPopupTransientWindow "self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow)"
%pythonAppend wxPyPopupTransientWindow() ""
wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
%name(PrePopupTransientWindow)wxPyPopupTransientWindow();
%RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
@@ -124,14 +125,15 @@ public:
class wxPopupWindow : public wxWindow {
public:
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
%name(PrePopupWindow)wxPopupWindow();
%RenameCtor(PrePopupWindow, wxPopupWindow());
};
%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
%rename(PopupTransientWindow) wxPyPopupTransientWindow;
class wxPyPopupTransientWindow : public wxPopupWindow
{
public:
wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
%name(PrePopupTransientWindow)wxPyPopupTransientWindow();
%RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
};
+2 -1
View File
@@ -376,7 +376,8 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage);
MustHaveApp(wxPyPrintout);
// Now define the custom class for SWIGging
%name(Printout) class wxPyPrintout : public wxObject {
%rename(Printout) wxPyPrintout;
class wxPyPrintout : public wxObject {
public:
%pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)"
+2 -1
View File
@@ -78,7 +78,8 @@ IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate);
%}
%name(Process)class wxPyProcess : public wxEvtHandler {
%rename(Process) wxPyProcess;
class wxPyProcess : public wxEvtHandler {
public:
// kill the process with the given PID
static wxKillError Kill(int pid,
+1 -1
View File
@@ -113,7 +113,7 @@ public:
const wxValidator& validator=wxDefaultValidator,
const wxString& name = wxPyControlNameStr);
%name(PrePyControl) wxPyControl();
%RenameCtor(PrePyControl, wxPyControl());
void _setCallbackInfo(PyObject* self, PyObject* _class);
+3 -3
View File
@@ -142,7 +142,7 @@ public:
long style = 0,
const wxString& name = wxPyPanelNameStr);
%name(PrePyWindow) wxPyWindow();
%RenameCtor(PrePyWindow, wxPyWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
@@ -287,7 +287,7 @@ public:
long style = 0,
const wxString& name = wxPyPanelNameStr);
%name(PrePyPanel) wxPyPanel();
%RenameCtor(PrePyPanel, wxPyPanel());
void _setCallbackInfo(PyObject* self, PyObject* _class);
@@ -424,7 +424,7 @@ public:
long style = 0,
const wxString& name = wxPyPanelNameStr);
%name(PrePyScrolledWindow) wxPyScrolledWindow();
%RenameCtor(PrePyScrolledWindow, wxPyScrolledWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
+4 -4
View File
@@ -41,7 +41,7 @@ public:
long style = wxRA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyRadioBoxNameStr);
%name(PreRadioBox)wxRadioBox();
%RenameCtor(PreRadioBox, wxRadioBox());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
@@ -70,8 +70,8 @@ public:
%pythoncode { SetItemLabel = SetString };
// change the individual radio button state
%name(EnableItem) virtual void Enable(int n, bool enable = true);
%name(ShowItem) virtual void Show(int n, bool show = true);
%Rename(EnableItem, virtual void, Enable(int n, bool enable = true));
%Rename(ShowItem, virtual void, Show(int n, bool show = true));
#ifndef __WXGTK__
// layout parameters
@@ -111,7 +111,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyRadioButtonNameStr);
%name(PreRadioButton)wxRadioButton();
%RenameCtor(PreRadioButton, wxRadioButton());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
+21 -21
View File
@@ -46,12 +46,12 @@ MustHaveApp(wxRegion);
class wxRegion : public wxGDIObject {
public:
wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
%name(RegionFromBitmap)wxRegion(const wxBitmap& bmp);
%name(RegionFromBitmapColour)wxRegion(const wxBitmap& bmp,
const wxColour& transColour,
int tolerance = 0);
%name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
int fillStyle = wxWINDING_RULE);
%RenameCtor(RegionFromBitmap, wxRegion(const wxBitmap& bmp));
%RenameCtor(RegionFromBitmapColour, wxRegion(const wxBitmap& bmp,
const wxColour& transColour,
int tolerance = 0));
%RenameCtor(RegionFromPoints, wxRegion(int points, wxPoint* points_array,
int fillStyle = wxWINDING_RULE));
~wxRegion();
@@ -60,29 +60,29 @@ public:
bool Offset(wxCoord x, wxCoord y);
wxRegionContain Contains(wxCoord x, wxCoord y);
%name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
%name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
%name(ContainsRectDim)wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
%Rename(ContainsPoint, wxRegionContain, Contains(const wxPoint& pt));
%Rename(ContainsRect, wxRegionContain, Contains(const wxRect& rect));
%Rename(ContainsRectDim, wxRegionContain, Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h));
wxRect GetBox();
bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(IntersectRect)bool Intersect(const wxRect& rect);
%name(IntersectRegion)bool Intersect(const wxRegion& region);
%Rename(IntersectRect, bool, Intersect(const wxRect& rect));
%Rename(IntersectRegion, bool, Intersect(const wxRegion& region));
bool IsEmpty();
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(UnionRect)bool Union(const wxRect& rect);
%name(UnionRegion)bool Union(const wxRegion& region);
%Rename(UnionRect, bool, Union(const wxRect& rect));
%Rename(UnionRegion, bool, Union(const wxRegion& region));
bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(SubtractRect)bool Subtract(const wxRect& rect);
%name(SubtractRegion)bool Subtract(const wxRegion& region);
%Rename(SubtractRect, bool, Subtract(const wxRect& rect));
%Rename(SubtractRegion, bool, Subtract(const wxRegion& region));
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
%name(XorRect)bool Xor(const wxRect& rect);
%name(XorRegion)bool Xor(const wxRegion& region);
%Rename(XorRect, bool, Xor(const wxRect& rect));
%Rename(XorRegion, bool, Xor(const wxRegion& region));
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
@@ -92,10 +92,10 @@ public:
// with this region. If the bitmap has a mask then it will be used,
// otherwise the colour to be treated as transparent may be specified,
// along with an optional tolerance value.
%name(UnionBitmap)bool Union(const wxBitmap& bmp);
%name(UnionBitmapColour)bool Union(const wxBitmap& bmp,
const wxColour& transColour,
int tolerance = 0);
%Rename(UnionBitmap, bool, Union(const wxBitmap& bmp));
%Rename(UnionBitmapColour, bool, Union(const wxBitmap& bmp,
const wxColour& transColour,
int tolerance = 0));
};
+2 -2
View File
@@ -61,7 +61,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const wxString& name = wxPySashNameStr);
%name(PreSashWindow)wxSashWindow();
%RenameCtor(PreSashWindow, wxSashWindow());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
@@ -249,7 +249,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const wxString& name = wxPySashLayoutNameStr);
%name(PreSashLayoutWindow)wxSashLayoutWindow();
%RenameCtor(PreSashLayoutWindow, wxSashLayoutWindow());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
+1 -1
View File
@@ -33,7 +33,7 @@ public:
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyScrollBarNameStr);
%name(PreScrollBar)wxScrollBar();
%RenameCtor(PreScrollBar, wxScrollBar());
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
+1 -1
View File
@@ -195,7 +195,7 @@ public:
// to implement SetSystemColour/Font/Metric
static void SetOption(const wxString& name, const wxString& value);
%name(SetOptionInt) static void SetOption(const wxString& name, int value);
%Rename(SetOptionInt, static void, SetOption(const wxString& name, int value));
static wxString GetOption(const wxString& name) ;
static int GetOptionInt(const wxString& name) ;
static bool HasOption(const wxString& name) ;
+14 -9
View File
@@ -51,8 +51,9 @@ methods are called.
int border, PyObject* userData=NULL ),
"Constructs a `wx.SizerItem` for tracking a window.", "");
%name(SizerItemWindow) wxSizerItem( wxWindow *window, int proportion, int flag,
int border, PyObject* userData=NULL ) {
%RenameCtor(SizerItemWindow, wxSizerItem( wxWindow *window, int proportion, int flag,
int border, PyObject* userData=NULL ))
{
wxPyUserData* data = NULL;
if ( userData ) {
bool blocked = wxPyBeginBlockThreads();
@@ -67,8 +68,10 @@ methods are called.
wxSizerItem( int width, int height, int proportion, int flag,
int border, PyObject* userData=NULL),
"Constructs a `wx.SizerItem` for tracking a spacer.", "");
%name(SizerItemSpacer) wxSizerItem( int width, int height, int proportion, int flag,
int border, PyObject* userData=NULL) {
%RenameCtor(SizerItemSpacer, wxSizerItem( int width, int height, int proportion, int flag,
int border, PyObject* userData=NULL))
{
wxPyUserData* data = NULL;
if ( userData ) {
bool blocked = wxPyBeginBlockThreads();
@@ -81,9 +84,11 @@ methods are called.
DocStr(
wxSizerItem( wxSizer *sizer, int proportion, int flag,
int border, PyObject* userData=NULL ),
"Constructs a `wx.SizerItem` for tracking a subsizer", "");
%name(SizerItemSizer) wxSizerItem( wxSizer *sizer, int proportion, int flag,
int border, PyObject* userData=NULL ) {
"Constructs a `wx.SizerItem` for tracking a subsizer", "");
%RenameCtor(SizerItemSizer, wxSizerItem( wxSizer *sizer, int proportion, int flag,
int border, PyObject* userData=NULL ))
{
wxPyUserData* data = NULL;
if ( userData ) {
bool blocked = wxPyBeginBlockThreads();
@@ -139,8 +144,8 @@ added, if needed.", "");
DocStr(SetRatio,
"Set the ratio item attribute.", "");
%name(SetRatioWH) void SetRatio( int width, int height );
%name(SetRatioSize) void SetRatio( wxSize size );
%Rename(SetRatioWH, void, SetRatio( int width, int height ));
%Rename(SetRatioSize, void, SetRatio( wxSize size ));
void SetRatio( float ratio );
DocDeclStr(
+1 -1
View File
@@ -41,7 +41,7 @@ public:
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPySliderNameStr);
%name(PreSlider)wxSlider();
%RenameCtor(PreSlider, wxSlider());
bool Create(wxWindow* parent, wxWindowID id=-1,
int value=0, int minValue=0, int maxValue=100,
+3 -2
View File
@@ -85,7 +85,8 @@ public:
else
return new wxSound(fileName);
}
%name(SoundFromData) wxSound(PyObject* data) {
%RenameCtor(SoundFromData, wxSound(PyObject* data))
{
unsigned char* buffer; int size;
wxSound *sound = NULL;
@@ -135,7 +136,7 @@ public:
bool Play(unsigned flags = wxSOUND_ASYNC) const;
// Plays sound from filename:
%name(PlaySound) static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC);
%Rename(PlaySound, static bool, Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC));
#ifndef __WXMAC__
static void Stop();
+3 -3
View File
@@ -50,7 +50,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxSP_HORIZONTAL,
const wxString& name = wxPySPIN_BUTTON_NAME);
%name(PreSpinButton)wxSpinButton();
%RenameCtor(PreSpinButton, wxSpinButton());
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
@@ -97,7 +97,7 @@ public:
long style = wxSP_ARROW_KEYS,
int min = 0, int max = 100, int initial = 0,
const wxString& name = wxPySpinCtrlNameStr);
%name(PreSpinCtrl)wxSpinCtrl();
%RenameCtor(PreSpinCtrl, wxSpinCtrl());
bool Create(wxWindow *parent,
wxWindowID id = -1,
@@ -110,7 +110,7 @@ public:
virtual int GetValue() const;
virtual void SetValue( int value );
%name(SetValueString) void SetValue(const wxString& text);
%Rename(SetValueString, void, SetValue(const wxString& text));
virtual void SetRange( int minVal, int maxVal );
virtual int GetMin() const;
+4 -4
View File
@@ -37,7 +37,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticBoxNameStr);
%name(PreStaticBox)wxStaticBox();
%RenameCtor(PreStaticBox, wxStaticBox());
// Turn it back on again
%typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
@@ -70,7 +70,7 @@ public:
const wxSize &size = wxDefaultSize,
long style = wxLI_HORIZONTAL,
const wxString& name = wxPyStaticTextNameStr);
%name(PreStaticLine)wxStaticLine();
%RenameCtor(PreStaticLine, wxStaticLine());
bool Create( wxWindow *parent, wxWindowID id=-1,
const wxPoint &pos = wxDefaultPosition,
@@ -105,7 +105,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticTextNameStr);
%name(PreStaticText)wxStaticText();
%RenameCtor(PreStaticText, wxStaticText());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
@@ -134,7 +134,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticBitmapNameStr);
%name(PreStaticBitmap)wxStaticBitmap();
%RenameCtor(PreStaticBitmap, wxStaticBitmap());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxBitmap& bitmap = wxNullBitmap,
+1 -1
View File
@@ -43,7 +43,7 @@ public:
wxStatusBar(wxWindow* parent, wxWindowID id = -1,
long style = wxDEFAULT_STATUSBAR_STYLE,
const wxString& name = wxPyStatusLineNameStr);
%name(PreStatusBar)wxStatusBar();
%RenameCtor(PreStatusBar, wxStatusBar());
// Turn it back on again
%typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); }
+3 -1
View File
@@ -68,7 +68,9 @@ enum wxSeekMode
};
%name(InputStream) class wxPyInputStream {
%rename(InputStream) wxPyInputStream;
class wxPyInputStream
{
public:
%extend {
wxPyInputStream(PyObject* p) {
+2 -1
View File
@@ -97,7 +97,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTaskBarIcon, wxTaskBarIcon);
MustHaveApp(wxPyTaskBarIcon);
%name(TaskBarIcon)class wxPyTaskBarIcon : public wxEvtHandler
%rename(TaskBarIcon) wxPyTaskBarIcon;
class wxPyTaskBarIcon : public wxEvtHandler
{
public:
%pythonAppend wxPyTaskBarIcon "self._setCallbackInfo(self, TaskBarIcon, 0)"
+1 -1
View File
@@ -174,7 +174,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyTextCtrlNameStr);
%name(PreTextCtrl)wxTextCtrl();
%RenameCtor(PreTextCtrl, wxTextCtrl());
// Turn it back on again
%typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+1 -1
View File
@@ -66,7 +66,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyToggleButtonNameStr);
%name(PreToggleButton)wxToggleButton();
%RenameCtor(PreToggleButton, wxToggleButton());
bool Create(wxWindow *parent,
wxWindowID id=-1,
+2 -1
View File
@@ -62,7 +62,8 @@ void wxPyTimer::base_Notify() {
MustHaveApp(wxPyTimer);
%name(Timer) class wxPyTimer : public wxEvtHandler
%rename(Timer) wxPyTimer;
class wxPyTimer : public wxEvtHandler
{
public:
// Don't let the OOR or callback info hold references to the object so
+4 -4
View File
@@ -303,8 +303,8 @@ public:
shortHelp, longHelp, clientData)
}
%name(AddToolItem) wxToolBarToolBase *AddTool (wxToolBarToolBase *tool);
%name(InsertToolItem) wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool);
%Rename(AddToolItem, wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool));
%Rename(InsertToolItem, wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool));
wxToolBarToolBase *AddControl(wxControl *control);
wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
@@ -353,7 +353,7 @@ public:
void SetToolLongHelp(int id, const wxString& helpString);
wxString GetToolLongHelp(int id);
%name(SetMarginsXY) void SetMargins(int x, int y);
%Rename(SetMarginsXY, void, SetMargins(int x, int y));
void SetMargins(const wxSize& size);
void SetToolPacking(int packing);
void SetToolSeparation(int separation);
@@ -399,7 +399,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxPyToolBarNameStr);
%name(PreToolBar)wxToolBar();
%RenameCtor(PreToolBar, wxToolBar());
// Turn it back on again
%typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
+3 -3
View File
@@ -168,7 +168,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
%name(PreFrame)wxFrame();
%RenameCtor(PreFrame, wxFrame());
// Turn it back on again
%typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
@@ -287,7 +287,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxPyDialogNameStr);
%name(PreDialog)wxDialog();
%RenameCtor(PreDialog, wxDialog());
// Turn it back on again
%typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
@@ -352,7 +352,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
%name(PreMiniFrame)wxMiniFrame();
%RenameCtor(PreMiniFrame, wxMiniFrame());
bool Create(wxWindow* parent, const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,

Some files were not shown because too many files have changed in this diff Show More