nobody at rubyforge.org
2007-Mar-29 22:14 UTC
[Wxruby-development] [929] branches/wxruby2/wxwidgets_282/swig/classes: Fix virtual methods that shouldn''t be (Bug 9682); Add missing methods and
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } #msg dt { float: left; width: 6em; font-weight: bold; } #msg dt:after { content:'':'';} #msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: bold} #msg dl a:link { color:#fc3; } #msg dl a:active { color:#ff0; } #msg dl a:visited { color:#cc6; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; } #msg ul, pre { overflow: auto; } #header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } #patch { width: 100%; } #patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;} #patch .propset h4, #patch .binary h4 {margin:0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;} #patch .propset .diff, #patch .binary .diff {padding:10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[929] branches/wxruby2/wxwidgets_282/swig/classes: Fix virtual methods that shouldn''t be (Bug 9682); Add missing methods and</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>929</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-03-29 18:14:16 -0400 (Thu, 29 Mar 2007)</dd> </dl> <h3>Log Message</h3> <pre>Fix virtual methods that shouldn''t be (Bug 9682); Add missing methods and remove deprecated ones; disambiguate and unignore some others for SWIG</pre> <h3>Modified Paths</h3> <ul> <li><a href="#brancheswxruby2wxwidgets_282swigclassesDCi">branches/wxruby2/wxwidgets_282/swig/classes/DC.i</a></li> <li><a href="#brancheswxruby2wxwidgets_282swigclassesincludewxDCh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="brancheswxruby2wxwidgets_282swigclassesDCi"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/swig/classes/DC.i (928 => 929)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/swig/classes/DC.i        2007-03-29 21:56:43 UTC (rev 928) +++ branches/wxruby2/wxwidgets_282/swig/classes/DC.i        2007-03-29 22:14:16 UTC (rev 929) </span><span class="lines">@@ -1,18 +1,11 @@ </span><del>-# Copyright 2004-2005 by Kevin Smith </del><ins>+# Copyright 2004-2007 by Kevin Smith </ins><span class="cx"> # released under the MIT-style wxruby2 license </span><span class="cx"> </span><span class="cx"> %include "../common.i" </span><span class="cx"> </span><span class="cx"> %module(directors="1") wxDC </span><span class="cx"> </span><del>-// avoid directors for pure virtuals -// for some reason, ignoring just this one avoids errors for the rest!? -%feature("nodirector") wxDC::GetCharHeight; - -// Not sure why these are ignored -%ignore wxDC::CacheEnabled; -%ignore wxDC::ClearCache; -%ignore wxDC::EnableCache; </del><ins>+// raises ''void value is not ignored as it should be'' compile error </ins><span class="cx"> %ignore wxDC::StartPage; </span><span class="cx"> </span><span class="cx"> // wxList version is now ''type-safe'' so we won''t be using that version instead </span><span class="lines">@@ -20,6 +13,12 @@ </span><span class="cx"> %ignore DrawPolygon(const wxList * points , wxCoord xoffset = 0, wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE) ; </span><span class="cx"> </span><span class="cx"> </span><ins>+%rename(GetDimensions) wxDC::GetSize(wxCoord * width , wxCoord * height); +%rename(GetDimensionsMM) wxDC::GetSizeMM(wxCoord *width , wxCoord *height) const; +%rename(GetTextSize) wxDC::GetTextExtent(const wxString& string) const; +%rename(GetMultiLineTextSize) wxDC::GetMultiLineTextExtent(const wxString& string) const; + + </ins><span class="cx"> %import "include/wxObject.h" </span><span class="cx"> </span><span class="cx"> %include "include/wxDC.h" </span></span></pre></div> <a id="brancheswxruby2wxwidgets_282swigclassesincludewxDCh"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h (928 => 929)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h        2007-03-29 21:56:43 UTC (rev 928) +++ branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h        2007-03-29 22:14:16 UTC (rev 929) </span><span class="lines">@@ -1,79 +1,81 @@ </span><del>-// Copyright 2004-2005 by Kevin Smith </del><ins>+// Copyright 2004-2007 by Kevin Smith </ins><span class="cx"> // released under the MIT-style wxruby2 license </span><span class="cx"> </span><span class="cx"> #if !defined(_wxDC_h_) </span><span class="cx"> #define _wxDC_h_ </span><ins>+ </ins><span class="cx"> class wxDC : public wxObject </span><span class="cx"> { </span><span class="cx"> public: </span><span class="cx"> wxDC() ; </span><span class="cx"> virtual ~wxDC() ; </span><del>- virtual bool Blit(wxCoord xdest , wxCoord ydest , wxCoord width , wxCoord height , wxDC* source , wxCoord xsrc , wxCoord ysrc , int logicalFunc = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1) = 0; - static bool CacheEnabled() ; </del><ins>+ bool Blit(wxCoord xdest , wxCoord ydest , wxCoord width , wxCoord height , wxDC* source , wxCoord xsrc , wxCoord ysrc , int logicalFunc = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); </ins><span class="cx"> void CalcBoundingBox(wxCoord x , wxCoord y ) ; </span><del>- virtual void Clear() = 0; - static void ClearCache() ; - virtual void CrossHair(wxCoord x , wxCoord y ) = 0; </del><ins>+ void Clear(); + virtual void ComputeScaleAndOrigin(); + void CrossHair(wxCoord x , wxCoord y ); </ins><span class="cx"> void DestroyClippingRegion() ; </span><span class="cx"> wxCoord DeviceToLogicalX(wxCoord x ) ; </span><span class="cx"> wxCoord DeviceToLogicalXRel(wxCoord x ) ; </span><span class="cx"> wxCoord DeviceToLogicalY(wxCoord y ) ; </span><span class="cx"> wxCoord DeviceToLogicalYRel(wxCoord y ) ; </span><del>- virtual void DrawArc(wxCoord x1 , wxCoord y1 , wxCoord x2 , wxCoord y2 , wxCoord xc , wxCoord yc ) = 0; - virtual void DrawBitmap(const wxBitmap& bitmap , wxCoord x , wxCoord y , bool transparent ) = 0; </del><ins>+ void DrawArc(wxCoord x1 , wxCoord y1 , wxCoord x2 , wxCoord y2 , wxCoord xc , wxCoord yc ); + void DrawBitmap(const wxBitmap& bitmap , wxCoord x , wxCoord y , bool transparent ); </ins><span class="cx"> void DrawCheckMark(wxCoord x , wxCoord y , wxCoord width , wxCoord height ) ; </span><span class="cx"> void DrawCheckMark(const wxRect & rect ) ; </span><span class="cx"> void DrawCircle(wxCoord x , wxCoord y , wxCoord radius ) ; </span><span class="cx"> void DrawCircle(const wxPoint& pt , wxCoord radius ) ; </span><del>- virtual void DrawEllipse(wxCoord x , wxCoord y , wxCoord width , wxCoord height ) = 0; - virtual void DrawEllipse(const wxPoint& pt , const wxSize& size ) = 0; - virtual void DrawEllipse(const wxRect& rect ) = 0; - virtual void DrawEllipticArc(wxCoord x , wxCoord y , wxCoord width , wxCoord height , double start , double end ) = 0; - virtual void DrawIcon(const wxIcon& icon , wxCoord x , wxCoord y ) = 0; - virtual void DrawLine(wxCoord x1 , wxCoord y1 , wxCoord x2 , wxCoord y2 ) = 0; - virtual void DrawLines(int n , wxPoint points[] , wxCoord xoffset = 0, wxCoord yoffset = 0) = 0; - virtual void DrawLines(wxList * points , wxCoord xoffset = 0, wxCoord yoffset = 0) = 0; - virtual void DrawPolygon(int n , wxPoint points[] , wxCoord xoffset = 0, wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE) = 0; - virtual void DrawPolygon(wxList * points , wxCoord xoffset = 0, wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE) = 0; - virtual void DrawPoint(wxCoord x , wxCoord y ) = 0; - virtual void DrawRectangle(wxCoord x , wxCoord y , wxCoord width , wxCoord height ) = 0; - virtual void DrawRotatedText(const wxString& text , wxCoord x , wxCoord y , double angle ) = 0; - virtual void DrawRoundedRectangle(wxCoord x , wxCoord y , wxCoord width , wxCoord height , double radius ) = 0; </del><ins>+ void DrawEllipse(wxCoord x , wxCoord y , wxCoord width , wxCoord height ); + void DrawEllipse(const wxPoint& pt , const wxSize& size ); + void DrawEllipse(const wxRect& rect ); + void DrawEllipticArc(wxCoord x , wxCoord y , wxCoord width , wxCoord height , double start , double end ); + void DrawIcon(const wxIcon& icon , wxCoord x , wxCoord y ); + virtual void DrawLabel(const wxString& text, const wxBitmap& image, const wxRect& rect, int alignment = wxALIGN_LEFT | wxALIGN_TOP, int indexAccel = -1, wxRect *rectBounding = NULL); + void DrawLabel(const wxString& text, const wxRect& rect, int alignment = wxALIGN_LEFT | wxALIGN_TOP, int indexAccel = -1); + void DrawLine(wxCoord x1 , wxCoord y1 , wxCoord x2 , wxCoord y2 ); + void DrawLines(int n , wxPoint points[] , wxCoord xoffset = 0, wxCoord yoffset = 0); + void DrawLines(wxList * points , wxCoord xoffset = 0, wxCoord yoffset = 0); + void DrawPolygon(int n , wxPoint points[] , wxCoord xoffset = 0, wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE); + void DrawPolygon(wxList * points , wxCoord xoffset = 0, wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE); + void DrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE); + void DrawPoint(wxCoord x , wxCoord y ); + void DrawRectangle(wxCoord x , wxCoord y , wxCoord width , wxCoord height ); + void DrawRotatedText(const wxString& text , wxCoord x , wxCoord y , double angle ); + void DrawRoundedRectangle(wxCoord x , wxCoord y , wxCoord width , wxCoord height , double radius ); </ins><span class="cx"> void DrawSpline(int n, wxPoint points[] ) ; </span><span class="cx"> void DrawSpline(wxList * points ) ; </span><span class="cx"> void DrawSpline(wxCoord x1 , wxCoord y1 , wxCoord x2 , wxCoord y2 , wxCoord x3 , wxCoord y3 ) ; </span><del>- virtual void DrawText(const wxString& text , wxCoord x , wxCoord y ) = 0; - static void EnableCache(bool enableCache ) ; </del><ins>+ void DrawText(const wxString& text , wxCoord x , wxCoord y ); </ins><span class="cx"> void EndDoc() ; </span><span class="cx"> void EndPage() ; </span><span class="cx"> bool FloodFill(wxCoord x , wxCoord y , const wxColour& colour , int style = wxFLOOD_SURFACE) ; </span><del>- //wxBrush& GetBackground(); </del><span class="cx"> const wxBrush& GetBackground() const; </span><span class="cx"> int GetBackgroundMode() const; </span><del>- //wxBrush& GetBrush(); </del><span class="cx"> const wxBrush& GetBrush() const; </span><del>- virtual wxCoord GetCharHeight() = 0; - virtual wxCoord GetCharWidth() = 0; </del><ins>+ wxCoord GetCharHeight(); + wxCoord GetCharWidth(); </ins><span class="cx"> void GetClippingBox(wxCoord *x , wxCoord *y , wxCoord *width , wxCoord *height ) ; </span><del>- //wxFont& GetFont(); </del><span class="cx"> const wxFont& GetFont() const; </span><span class="cx"> wxLayoutDirection GetLayoutDirection() const; </span><span class="cx"> int GetLogicalFunction() ; </span><span class="cx"> int GetMapMode() ; </span><del>-// bool GetOptimization() ; - //wxPen& GetPen(); </del><ins>+ void GetMultiLineTextExtent(const wxString& text, +                                                         wxCoord *width, +                                                         wxCoord *height, +                                                         wxCoord *heightLine = NULL, +                                                         wxFont *font = NULL) const; + wxSize GetMultiLineTextExtent(const wxString& string) const; + bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; </ins><span class="cx"> const wxPen& GetPen() const; </span><del>- virtual bool GetPixel(wxCoord x , wxCoord y , wxColour * colour ) = 0; - virtual void GetSize(wxCoord * width , wxCoord * height ) = 0; - //wxColour& GetTextBackground(); </del><ins>+ bool GetPixel(wxCoord x , wxCoord y , wxColour * colour ); + wxSize GetPPI() const; + void GetSize(wxCoord * width , wxCoord * height ); + wxSize GetSize() const; + void GetSizeMM(wxCoord *width, wxCoord *height) const; + wxSize GetSizeMM() const; </ins><span class="cx"> const wxColour& GetTextBackground() const; </span><del>- virtual void GetTextExtent(const wxString& string , wxCoord * w , wxCoord * h , wxCoord * descent = NULL, wxCoord * externalLeading = NULL, wxFont * font = NULL) = 0; - virtual void GetMultiLineTextExtent(const wxString& text, - wxCoord *width, - wxCoord *height, - wxCoord *heightLine = NULL, - wxFont *font = NULL); - //wxColour& GetTextForeground(); </del><ins>+ void GetTextExtent(const wxString& string , wxCoord * w , wxCoord * h , wxCoord * descent = NULL, wxCoord * externalLeading = NULL, wxFont * font = NULL); + wxSize GetTextExtent(const wxString& string) const; </ins><span class="cx"> const wxColour& GetTextForeground() const; </span><span class="cx"> void GetUserScale(double *x , double *y ) ; </span><span class="cx"> void GradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour); </span><span class="lines">@@ -91,20 +93,18 @@ </span><span class="cx"> void ResetBoundingBox() ; </span><span class="cx"> void SetAxisOrientation(bool xLeftRight , bool yBottomUp ) ; </span><span class="cx"> void SetDeviceOrigin(wxCoord x , wxCoord y ) ; </span><del>- virtual void SetBackground(const wxBrush& brush ) = 0; - virtual void SetBackgroundMode(int mode ) = 0; </del><ins>+ void SetBackground(const wxBrush& brush ); + void SetBackgroundMode(int mode ); + void SetBrush(const wxBrush& brush ); </ins><span class="cx"> void SetClippingRegion(wxCoord x , wxCoord y , wxCoord width , wxCoord height ) ; </span><span class="cx"> void SetClippingRegion(const wxPoint& pt , const wxSize& sz ) ; </span><span class="cx"> void SetClippingRegion(const wxRect& rect ) ; </span><span class="cx"> void SetClippingRegion(const wxRegion& region ) ; </span><del>- void SetLayoutDirection(wxLayoutDirection dir); - virtual void SetPalette(const wxPalette& palette ) = 0; - virtual void SetBrush(const wxBrush& brush ) = 0; - virtual void SetFont(const wxFont& font ) = 0; - virtual void SetLogicalFunction(int function ) = 0; </del><ins>+ void SetFont(const wxFont& font ); + void SetLogicalFunction(int function ); </ins><span class="cx"> void SetMapMode(int int ) ; </span><del>-// void SetOptimization(bool optimize ) ; - virtual void SetPen(const wxPen& pen ) = 0; </del><ins>+ void SetPalette(const wxPalette& palette ); + void SetPen(const wxPen& pen ); </ins><span class="cx"> void SetTextBackground(const wxColour& colour ) ; </span><span class="cx"> void SetTextForeground(const wxColour& colour ) ; </span><span class="cx"> void SetUserScale(double xScale , double yScale ) ; </span></span></pre> </div> </div> </body> </html>
Apparently Analagous Threads
- [708] trunk/wxruby2/swig/classes/DC.i: Un-ignore get_multi_line_text_extent (Roy Sutton)
- [922] branches/wxruby2/wxwidgets_282: Changes, additions and deprecations 2.6 -> 2.8 Wx API
- [724] trunk/wxruby2: Initial commit of HtmlWindow functionality
- [883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
- enum arguments not recognized