X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d07d2bc9d05408c58b76c53a0a291915b88e5064..f78e4942ec0f3f6abd2992502e2d6c5c2e8e55f6:/wxPython/src/_gdicmn.i diff --git a/wxPython/src/_gdicmn.i b/wxPython/src/_gdicmn.i index 860d306be4..5b62dd38d2 100644 --- a/wxPython/src/_gdicmn.i +++ b/wxPython/src/_gdicmn.i @@ -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( @@ -132,8 +132,8 @@ public: // None/NULL is now handled properly by the typemap, so these are not needed. // %extend { -// bool __eq__(const wxSize* other) { return other ? (*self == *other) : False; } -// bool __ne__(const wxSize* other) { return other ? (*self != *other) : True; } +// bool __eq__(const wxSize* other) { return other ? (*self == *other) : false; } +// bool __ne__(const wxSize* other) { return other ? (*self != *other) : true; } // } DocDeclStr( @@ -427,7 +427,12 @@ public: wxRect(const wxPoint& pos, const wxSize& size), "Create a new Rect from a position and size.", "", RectPS); - + + DocCtorStrName( + wxRect(const wxSize& size), + "Create a new Rect from a size only.", "", + RectS); + ~wxRect(); int GetX() const; @@ -480,13 +485,13 @@ public: DocDeclStr( wxRect&, Inflate(wxCoord dx, wxCoord dy), "Increase the rectangle size by dx in x direction and dy in y -direction. Both or one of) parameters may be negative to decrease the +direction. Both (or one of) parameters may be negative to decrease the rectangle size.", ""); DocDeclStr( wxRect&, Deflate(wxCoord dx, wxCoord dy), "Decrease the rectangle size by dx in x direction and dy in y -direction. Both or one of) parameters may be negative to increase the +direction. Both (or one of) parameters may be negative to increase the rectngle size. This method is the opposite of Inflate.", ""); DocDeclStrName( @@ -501,9 +506,14 @@ bottom, otherwise it is moved to the left or top respectively.", "", "Same as OffsetXY but uses dx,dy from Point", ""); DocDeclStr( - wxRect&, Intersect(const wxRect& rect), - "Return the intersectsion of this rectangle and rect.", ""); + wxRect, Intersect(const wxRect& rect), + "Returns the intersectsion of this rectangle and rect.", ""); + DocDeclStr( + wxRect , Union(const wxRect& rect), + "Returns the union of this rectangle and rect.", ""); + + DocDeclStr( wxRect, operator+(const wxRect& rect) const, "Add the properties of rect to this rectangle and return the result.", ""); @@ -522,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( @@ -576,6 +586,8 @@ bottom, otherwise it is moved to the left or top respectively.", "", }; +MustHaveApp(wxIntersectRect); + DocAStr(wxIntersectRect, "IntersectRect(Rect r1, Rect r2) -> Rect", "Calculate and return the intersection of r1 and r2.", ""); @@ -592,7 +604,7 @@ DocAStr(wxIntersectRect, if (dest != wxRect(0,0,0,0)) { bool blocked = wxPyBeginBlockThreads(); wxRect* newRect = new wxRect(dest); - obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), True); + obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), true); wxPyEndBlockThreads(blocked); return obj; } @@ -614,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, @@ -665,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 ) {