From da1ed74c85f53a75a193c7dcbd2013aa266a222c Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 13 Oct 2008 13:24:43 +0000 Subject: [PATCH] automated changes: many (pure) virtual specifiers added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/debugrpt.h | 2 +- interface/wx/filesys.h | 2 +- interface/wx/glcanvas.h | 2 +- interface/wx/graphics.h | 126 ++++++++++++------------- interface/wx/grid.h | 16 ++-- interface/wx/html/htmlfilt.h | 4 +- interface/wx/html/htmlpars.h | 6 +- interface/wx/htmllbox.h | 2 +- interface/wx/mediactrl.h | 2 +- interface/wx/memory.h | 22 ++--- interface/wx/module.h | 4 +- interface/wx/print.h | 2 +- interface/wx/protocol/protocol.h | 6 +- interface/wx/renderer.h | 26 +++-- interface/wx/richtext/richtextbuffer.h | 6 +- interface/wx/sizer.h | 4 +- interface/wx/socket.h | 16 ++-- interface/wx/stackwalk.h | 2 +- interface/wx/stream.h | 2 +- interface/wx/tipdlg.h | 2 +- interface/wx/variant.h | 54 +++++------ interface/wx/vlbox.h | 4 +- interface/wx/vscroll.h | 12 +-- interface/wx/window.h | 4 +- 24 files changed, 160 insertions(+), 168 deletions(-) diff --git a/interface/wx/debugrpt.h b/interface/wx/debugrpt.h index 3e63e6aa82..310b39a967 100644 --- a/interface/wx/debugrpt.h +++ b/interface/wx/debugrpt.h @@ -167,7 +167,7 @@ public: (@c dbghlp32.dll can be installed under older systems to make minidumps available). */ - bool AddDump(Context ctx); + virtual bool AddDump(Context ctx); /** The same as calling AddContext(Context_Exception). diff --git a/interface/wx/filesys.h b/interface/wx/filesys.h index 35f6324ece..602ffe3bf6 100644 --- a/interface/wx/filesys.h +++ b/interface/wx/filesys.h @@ -358,7 +358,7 @@ public: Must be overridden in derived handlers. */ - virtual bool CanOpen(const wxString& location); + virtual bool CanOpen(const wxString& location) = 0; /** Works like ::wxFindFirstFile(). diff --git a/interface/wx/glcanvas.h b/interface/wx/glcanvas.h index d2dab4c085..9a744d9fb4 100644 --- a/interface/wx/glcanvas.h +++ b/interface/wx/glcanvas.h @@ -264,6 +264,6 @@ public: so that the output of the previous OpenGL commands is displayed on the window. Returns @false if an error occurred. */ - bool SwapBuffers(); + virtual bool SwapBuffers(); }; diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h index fa2ddf3160..36ff2ca5ad 100644 --- a/interface/wx/graphics.h +++ b/interface/wx/graphics.h @@ -37,14 +37,13 @@ public: Appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1). */ - void AddArcToPoint(wxDouble x1, wxDouble y1, wxDouble x2, - wxDouble y2, - wxDouble r); + virtual void AddArcToPoint(wxDouble x1, wxDouble y1, wxDouble x2, + wxDouble y2, wxDouble r); /** Appends a circle around (x,y) with radius r as a new closed subpath. */ - void AddCircle(wxDouble x, wxDouble y, wxDouble r); + virtual void AddCircle(wxDouble x, wxDouble y, wxDouble r); //@{ /** @@ -62,7 +61,7 @@ public: /** Appends an ellipse fitting into the passed in rectangle. */ - void AddEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h); + virtual void AddEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h); //@{ /** @@ -75,7 +74,7 @@ public: /** Adds another path. */ - void AddPath(const wxGraphicsPath& path); + virtual void AddPath(const wxGraphicsPath& path); /** Adds a quadratic Bezier curve from the current point, using a control point and @@ -87,19 +86,18 @@ public: /** Appends a rectangle as a new closed subpath. */ - void AddRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h); + virtual void AddRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h); /** Appends a rounded rectangle as a new closed subpath. */ - void AddRoundedRectangle(wxDouble x, wxDouble y, wxDouble w, - wxDouble h, - wxDouble radius); + virtual void AddRoundedRectangle(wxDouble x, wxDouble y, wxDouble w, + wxDouble h, wxDouble radius); /** Closes the current sub-path. */ - void CloseSubpath(); + virtual void CloseSubpath(); //@{ /** @@ -132,7 +130,7 @@ public: Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo). */ - void* GetNativePath() const; + virtual void* GetNativePath() const; //@{ /** @@ -145,14 +143,14 @@ public: /** Transforms each point of this path by the matrix. */ - void Transform(const wxGraphicsMatrix& matrix); + virtual void Transform(const wxGraphicsMatrix& matrix); /** Gives back the native path returned by GetNativePath() because there might be some deallocations necessary (eg on cairo the native path returned by GetNativePath is newly allocated each time). */ - void UnGetNativePath(void* p) const; + virtual void UnGetNativePath(void* p) const; }; @@ -264,23 +262,23 @@ public: /** Clips drawings to the region */ - void Clip(const wxRegion& region); + virtual void Clip(const wxRegion& region) = 0; /** Clips drawings to the rectangle. */ - void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h); + virtual void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h) = 0; /** Concatenates the passed in transform with the current transform of this context */ - void ConcatTransform(const wxGraphicsMatrix& matrix); + virtual void ConcatTransform(const wxGraphicsMatrix& matrix) = 0; /** Creates a native brush from a wxBrush. */ - wxGraphicsBrush CreateBrush(const wxBrush& brush) const; + virtual wxGraphicsBrush CreateBrush(const wxBrush& brush) const; /** Creates a native graphics font from a wxFont and a text colour. @@ -295,14 +293,14 @@ public: @see wxGraphicsRenderer:: CreateContextFromNativeContext */ - wxGraphicsContext* CreateFromNative(void* context); + static wxGraphicsContext* CreateFromNative(void* context); /** Creates a wxGraphicsContext from a native window. @see wxGraphicsRenderer:: CreateContextFromNativeWindow */ - wxGraphicsContext* CreateFromNativeWindow(void* window); + static wxGraphicsContext* CreateFromNativeWindow(void* window); /** Creates a native brush, having a linear gradient, starting at (x1,y1) with @@ -333,19 +331,17 @@ public: /** Creates a native pen from a wxPen. */ - wxGraphicsPen CreatePen(const wxPen& pen) const; + virtual wxGraphicsPen CreatePen(const wxPen& pen) const; /** Creates a native brush, having a radial gradient originating at (xo,yc) with color oColour and ends on a circle around (xc,yc) with radius r and color cColour */ - wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, - wxDouble yo, - wxDouble xc, - wxDouble yc, - wxDouble radius, - const wxColour& oColor, - const wxColour& cColor) const; + virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, + wxDouble radius, + const wxColour& oColor, + const wxColour& cColor) const; /** Draws the bitmap. In case of a mono bitmap, this is treated as a mask and the @@ -357,7 +353,7 @@ public: /** Draws an ellipse. */ - void DrawEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h); + virtual void DrawEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h); /** Draws the icon. @@ -386,9 +382,8 @@ public: /** Draws a rounded rectangle. */ - void DrawRoundedRectangle(wxDouble x, wxDouble y, wxDouble w, - wxDouble h, - wxDouble radius); + virtual void DrawRoundedRectangle(wxDouble x, wxDouble y, wxDouble w, + wxDouble h, wxDouble radius); //@{ /** @@ -409,7 +404,7 @@ public: Returns the native context (CGContextRef for Core Graphics, Graphics pointer for GDIPlus and cairo_t pointer for cairo). */ - void* GetNativeContext(); + virtual void* GetNativeContext() = 0; /** Fills the @a widths array with the widths from the beginning of @@ -426,30 +421,29 @@ public: descender, and @a externalLeading is any extra vertical space added to the font by the font designer (usually is zero). */ - void GetTextExtent(const wxString& text, wxDouble* width, - wxDouble* height, - wxDouble* descent, - wxDouble* externalLeading) const; + virtual void GetTextExtent(const wxString& text, wxDouble* width, + wxDouble* height, wxDouble* descent, + wxDouble* externalLeading) const = 0; /** Gets the current transformation matrix of this context. */ - wxGraphicsMatrix GetTransform() const; + virtual wxGraphicsMatrix GetTransform() const = 0; /** Resets the clipping to original shape. */ - void ResetClip(); + virtual void ResetClip() = 0; /** Rotates the current transformation matrix (radians), */ - void Rotate(wxDouble angle); + virtual void Rotate(wxDouble angle) = 0; /** Scales the current transformation matrix. */ - void Scale(wxDouble xScale, wxDouble yScale); + virtual void Scale(wxDouble xScale, wxDouble yScale) = 0; //@{ /** @@ -478,7 +472,7 @@ public: /** Sets the current transformation matrix of this context */ - void SetTransform(const wxGraphicsMatrix& matrix); + virtual void SetTransform(const wxGraphicsMatrix& matrix) = 0; /** Strokes a single line. @@ -499,12 +493,12 @@ public: /** Strokes along a path with the current pen. */ - void StrokePath(const wxGraphicsPath& path); + virtual void StrokePath(const wxGraphicsPath& path) = 0; /** Translates the current transformation matrix. */ - void Translate(wxDouble dx, wxDouble dy); + virtual void Translate(wxDouble dx, wxDouble dy) = 0; }; @@ -555,7 +549,7 @@ public: /** Creates a native brush from a wxBrush. */ - wxGraphicsBrush CreateBrush(const wxBrush& brush); + virtual wxGraphicsBrush CreateBrush(const wxBrush& brush) = 0; /** @@ -563,12 +557,12 @@ public: eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a cairo_t pointer for cairo. */ - wxGraphicsContext* CreateContextFromNativeContext(void* context); + virtual wxGraphicsContext* CreateContextFromNativeContext(void* context) = 0; /** Creates a wxGraphicsContext from a native window. */ - wxGraphicsContext* CreateContextFromNativeWindow(void* window); + virtual wxGraphicsContext* CreateContextFromNativeWindow(void* window) = 0; /** Creates a native graphics font from a wxFont and a text colour. @@ -600,24 +594,22 @@ public: /** Creates a native graphics path which is initially empty. */ - wxGraphicsPath CreatePath(); + virtual wxGraphicsPath CreatePath() = 0; /** Creates a native pen from a wxPen. */ - wxGraphicsPen CreatePen(const wxPen& pen); + virtual wxGraphicsPen CreatePen(const wxPen& pen) = 0; /** Creates a native brush, having a radial gradient originating at (xo,yc) with color oColour and ends on a circle around (xc,yc) with radius r and color cColour */ - wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, - wxDouble yo, - wxDouble xc, - wxDouble yc, - wxDouble radius, - const wxColour& oColour, - const wxColour& cColour); + virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, + wxDouble radius, + const wxColour& oColour, + const wxColour& cColour) = 0; /** Returns the default renderer on this platform. On OS X this is the Core @@ -710,20 +702,20 @@ public: /** Returns the component values of the matrix via the argument pointers. */ - void Get(wxDouble* a = NULL, wxDouble* b = NULL, wxDouble* c = NULL, - wxDouble* d = NULL, wxDouble* tx = NULL, - wxDouble* ty = NULL) const; + virtual void Get(wxDouble* a = NULL, wxDouble* b = NULL, wxDouble* c = NULL, + wxDouble* d = NULL, wxDouble* tx = NULL, + wxDouble* ty = NULL) const; /** Returns the native representation of the matrix. For CoreGraphics this is a CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for Cairo a cairo_matrix_t pointer. */ - void* GetNativeMatrix() const; + virtual void* GetNativeMatrix() const; /** Inverts the matrix. */ - void Invert(); + virtual void Invert(); /** Returns @true if the elements of the transformation matrix are equal. @@ -733,17 +725,17 @@ public: /** Return @true if this is the identity matrix. */ - bool IsIdentity() const; + virtual bool IsIdentity() const; /** Rotates this matrix (radians). */ - void Rotate(wxDouble angle); + virtual void Rotate(wxDouble angle); /** Scales this matrix. */ - void Scale(wxDouble xScale, wxDouble yScale); + virtual void Scale(wxDouble xScale, wxDouble yScale); /** Sets the matrix to the respective values (default values are the identity @@ -757,16 +749,16 @@ public: Applies this matrix to a distance (ie. performs all transforms except translations) */ - void TransformDistance(wxDouble* dx, wxDouble* dy) const; + virtual void TransformDistance(wxDouble* dx, wxDouble* dy) const; /** Applies this matrix to a point. */ - void TransformPoint(wxDouble* x, wxDouble* y) const; + virtual void TransformPoint(wxDouble* x, wxDouble* y) const; /** Translates this matrix. */ - void Translate(wxDouble dx, wxDouble dy); + virtual void Translate(wxDouble dx, wxDouble dy); }; diff --git a/interface/wx/grid.h b/interface/wx/grid.h index bd4284dc55..0ed7fb3ef4 100644 --- a/interface/wx/grid.h +++ b/interface/wx/grid.h @@ -476,12 +476,12 @@ public: Fetch the value from the table and prepare the edit control to begin editing. Set the focus to the edit control. */ - void BeginEdit(int row, int col, wxGrid* grid); + virtual void BeginEdit(int row, int col, wxGrid* grid) = 0; /** Create a new object which is the copy of this one. */ - wxGridCellEditor* Clone() const; + virtual wxGridCellEditor* Clone() const = 0; /** Creates the actual edit control. @@ -498,7 +498,7 @@ public: Complete the editing of the current cell. Returns @true if the value has changed. If necessary, the control may be destroyed. */ - bool EndEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid) = 0; /** Some types of controls on some platforms may need some help @@ -521,7 +521,7 @@ public: /** Reset the value in the control back to its starting value. */ - void Reset(); + virtual void Reset() = 0; /** Size and position the edit control. @@ -800,7 +800,7 @@ public: /** */ - wxGridCellRenderer* Clone() const; + virtual wxGridCellRenderer* Clone() const = 0; /** Draw the given cell on the provided DC inside the given rectangle @@ -810,9 +810,9 @@ public: prepare the DC using the given attribute: it will draw the rectangle with the background colour from attr and set the text colour and font. */ - void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, - const wxRect& rect, int row, int col, - bool isSelected); + virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, + const wxRect& rect, int row, int col, + bool isSelected) = 0; /** Get the preferred size of the cell for its contents. diff --git a/interface/wx/html/htmlfilt.h b/interface/wx/html/htmlfilt.h index 94cd977d33..695ab88d7c 100644 --- a/interface/wx/html/htmlfilt.h +++ b/interface/wx/html/htmlfilt.h @@ -29,12 +29,12 @@ public: Returns @true if this filter is capable of reading file @e file. Example: */ - bool CanRead(const wxFSFile& file); + virtual bool CanRead(const wxFSFile& file) const = 0; /** Reads the file and returns string with HTML document. Example: */ - wxString ReadFile(const wxFSFile& file); + virtual wxString ReadFile(const wxFSFile& file) const = 0; }; diff --git a/interface/wx/html/htmlpars.h b/interface/wx/html/htmlpars.h index ae1a20d7e0..a5d783a74a 100644 --- a/interface/wx/html/htmlpars.h +++ b/interface/wx/html/htmlpars.h @@ -27,7 +27,7 @@ public: Returns list of supported tags. The list is in uppercase and tags are delimited by ','. Example : @c "I,B,FONT,P" */ - virtual wxString GetSupportedTags(); + virtual wxString GetSupportedTags() = 0; /** This is the core method of each handler. It is called each time @@ -36,7 +36,7 @@ public: @return @true if ParseInner was called, @false otherwise. */ - virtual bool HandleTag(const wxHtmlTag& tag); + virtual bool HandleTag(const wxHtmlTag& tag) = 0; /** This method calls parser's wxHtmlParser::DoParsing method @@ -155,7 +155,7 @@ public: representation in derived parser (but it must be derived from wxObject!). See wxHtmlWinParser for details. */ - virtual wxObject* GetProduct(); + virtual wxObject* GetProduct() = 0; /** Returns pointer to the source being parsed. diff --git a/interface/wx/htmllbox.h b/interface/wx/htmllbox.h index df0755ad32..190d8d6372 100644 --- a/interface/wx/htmllbox.h +++ b/interface/wx/htmllbox.h @@ -125,7 +125,7 @@ protected: that the returned HTML fragment will render with the same height or else you'll see some artifacts when the user selects an item. */ - wxString OnGetItem(size_t n) const; + virtual wxString OnGetItem(size_t n) const = 0; }; diff --git a/interface/wx/mediactrl.h b/interface/wx/mediactrl.h index e572a1361e..72b7bd1fba 100644 --- a/interface/wx/mediactrl.h +++ b/interface/wx/mediactrl.h @@ -295,7 +295,7 @@ public: video, if there is any. See @ref mediactrl_video_size for more information. */ - wxSize GetBestSize(); + wxSize GetBestSize() const; /** Obtains the playback rate, or speed of the media. @c 1.0 represents normal diff --git a/interface/wx/memory.h b/interface/wx/memory.h index d4d27991ca..d7556f5186 100644 --- a/interface/wx/memory.h +++ b/interface/wx/memory.h @@ -42,7 +42,7 @@ public: @return @true if the function succeeded, @false otherwise. */ - bool Dump(); + static bool Dump(); /** Returns @true if the memory allocator checks all previous memory blocks for @@ -52,7 +52,7 @@ public: @see SetCheckPrevious() */ - bool GetCheckPrevious(); + static bool GetCheckPrevious(); /** Returns @true if debug mode is on. @@ -63,7 +63,7 @@ public: @see SetDebugMode() */ - bool GetDebugMode(); + static bool GetDebugMode(); /** Gets the debug level (default 1). @@ -78,7 +78,7 @@ public: @see SetLevel() */ - int GetLevel(); + static int GetLevel(); /** Returns the output stream associated with the debug context. @@ -117,7 +117,7 @@ public: @see PrintStatistics() */ - bool PrintClasses(); + static bool PrintClasses(); /** Performs a statistics analysis from the currently set checkpoint, writing @@ -130,7 +130,7 @@ public: @see PrintStatistics() */ - bool PrintStatistics(bool detailed = true); + static bool PrintStatistics(bool detailed = true); /** Tells the memory allocator to check all previous memory blocks for errors. @@ -138,7 +138,7 @@ public: @see GetCheckPrevious() */ - void SetCheckPrevious(bool check); + static void SetCheckPrevious(bool check); /** Sets the current checkpoint: Dump and PrintStatistics operations will @@ -149,7 +149,7 @@ public: If @true, the checkpoint is reset to include all memory allocations since the program started. */ - void SetCheckpoint(bool all = false); + static void SetCheckpoint(bool all = false); /** Sets the debug mode on or off. @@ -165,7 +165,7 @@ public: @see GetDebugMode() */ - void SetDebugMode(bool debug); + static void SetDebugMode(bool debug); /** Sets the current debug file and creates a stream. @@ -189,7 +189,7 @@ public: @see GetLevel() */ - void SetLevel(int level); + static void SetLevel(int level); /** Installs a function to be called at the end of wxWidgets shutdown. @@ -198,7 +198,7 @@ public: The shutdown function must be take no parameters and return nothing. */ - void SetShutdownNotifyFunction(wxShutdownNotifyFunction func); + static void SetShutdownNotifyFunction(wxShutdownNotifyFunction func); /** Sets the debugging stream to be the debugger (Windows) or standard error (other diff --git a/interface/wx/module.h b/interface/wx/module.h index 4e72b4ec6f..f8f1717c89 100644 --- a/interface/wx/module.h +++ b/interface/wx/module.h @@ -118,12 +118,12 @@ public: /** Provide this function with appropriate cleanup for your module. */ - virtual void OnExit(); + virtual void OnExit() = 0; /** Provide this function with appropriate initialization for your module. If the function returns @false, wxWidgets will exit immediately. */ - virtual bool OnInit(); + virtual bool OnInit() = 0; }; diff --git a/interface/wx/print.h b/interface/wx/print.h index e4516cf456..072ba8d842 100644 --- a/interface/wx/print.h +++ b/interface/wx/print.h @@ -799,7 +799,7 @@ public: Called by the framework when a page should be printed. Returning @false cancels the print job. */ - bool OnPrintPage(int pageNum); + virtual bool OnPrintPage(int pageNum) = 0; /** Set the device origin of the associated wxDC so that the current logical point diff --git a/interface/wx/protocol/protocol.h b/interface/wx/protocol/protocol.h index d0edb4f930..1cf2f89122 100644 --- a/interface/wx/protocol/protocol.h +++ b/interface/wx/protocol/protocol.h @@ -45,7 +45,7 @@ public: @return Returns @true, if successful, else @false. */ - bool Abort(); + virtual bool Abort() = 0; /** Returns the type of the content of the last opened stream. It is a mime-type. @@ -57,7 +57,7 @@ public: @see wxProtocolError */ - wxProtocolError GetError(); + virtual wxProtocolError GetError() = 0; /** Creates a new input stream on the specified path. @@ -74,7 +74,7 @@ public: @see wxInputStream */ - wxInputStream* GetInputStream(const wxString& path); + virtual wxInputStream* GetInputStream(const wxString& path) = 0; /** Tries to reestablish a previous opened connection (close and renegotiate diff --git a/interface/wx/renderer.h b/interface/wx/renderer.h index 8b7e7d9e81..e4548ba4da 100644 --- a/interface/wx/renderer.h +++ b/interface/wx/renderer.h @@ -340,10 +340,9 @@ public: The optimal width to contain the the unabreviated label text or bitmap, the sort arrow if present, and internal margins. */ - virtual int DrawHeaderButton(wxWindow* win, wxDC& dc, - const wxRect& rect, int flags = 0, - wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, - wxHeaderButtonParams* params = NULL); + virtual int DrawHeaderButton(wxWindow* win, wxDC& dc, const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, wxHeaderButtonParams* params = NULL) = 0; /** Draw the contents of a header control button (label, sort arrows, @@ -356,10 +355,9 @@ public: The optimal width to contain the the unabreviated label text or bitmap, the sort arrow if present, and internal margins. */ - virtual int DrawHeaderButtonContents(wxWindow *win, wxDC& dc, + virtual int DrawHeaderButtonContents(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0, - wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, - wxHeaderButtonParams* params = NULL); + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, wxHeaderButtonParams* params = NULL) = 0; /** Draw a selection rectangle underneath the text as used e.g. in a @@ -396,9 +394,9 @@ public: Draw a sash. The @a orient parameter defines whether the sash should be vertical or horizontal and how the @a position should be interpreted. */ - virtual void DrawSplitterSash(wxWindow* win, wxDC& dc, - const wxSize& size, wxCoord position, - wxOrientation orient, int flags = 0); + virtual void DrawSplitterSash(wxWindow* win, wxDC& dc, const wxSize& size, + wxCoord position, wxOrientation orient, + int flags = 0) = 0; /** Draw the expanded/collapsed icon for a tree control item. @@ -432,20 +430,20 @@ public: /** Returns the size of a check box. */ - virtual wxSize GetCheckBoxSize(wxWindow *win); + virtual wxSize GetCheckBoxSize(wxWindow* win) = 0; /** Returns the height of a header button, either a fixed platform height if available, or a generic height based on the window's font. */ - virtual int GetHeaderButtonHeight(wxWindow* win); + virtual int GetHeaderButtonHeight(wxWindow* win) = 0; /** Get the splitter parameters, see wxSplitterRenderParams. */ - virtual wxSplitterRenderParams GetSplitterParams(const wxWindow* win); + virtual wxSplitterRenderParams GetSplitterParams(const wxWindow* win) = 0; /** This function is used for version checking: Load() @@ -458,7 +456,7 @@ public: but it has to be in the derived, not base, class, to detect mismatches between the renderers versions and so you have to implement it anew in all renderers. */ - virtual wxRendererVersion GetVersion() const; + virtual wxRendererVersion GetVersion() const = 0; /** Load the renderer from the specified DLL, the returned pointer must be diff --git a/interface/wx/richtext/richtextbuffer.h b/interface/wx/richtext/richtextbuffer.h index 9f7717b344..f86e30529a 100644 --- a/interface/wx/richtext/richtextbuffer.h +++ b/interface/wx/richtext/richtextbuffer.h @@ -1043,12 +1043,14 @@ protected: /** Override to load content from @a stream into @a buffer. */ - bool DoLoadFile(wxRichTextBuffer* buffer, wxInputStream& stream); + virtual bool DoLoadFile(wxRichTextBuffer* buffer, + wxInputStream& stream) = 0; /** Override to save content to @a stream from @a buffer. */ - bool DoSaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream); + virtual bool DoSaveFile(wxRichTextBuffer* buffer, + wxOutputStream& stream) = 0; }; diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 660df2f9ad..99aab341a6 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1011,7 +1011,7 @@ public: This method is abstract and has to be overwritten by any derived class. Here, the sizer will do the actual calculation of its children's minimal sizes. */ - virtual wxSize CalcMin(); + virtual wxSize CalcMin() = 0; /** Detaches all children from the sizer. @@ -1355,7 +1355,7 @@ public: Here, the sizer will do the actual calculation of its children's positions and sizes. */ - virtual void RecalcSizes(); + virtual void RecalcSizes() = 0; /** Removes a child window from the sizer, but does @b not destroy it diff --git a/interface/wx/socket.h b/interface/wx/socket.h index dddc204a8e..0a4f3bc93a 100644 --- a/interface/wx/socket.h +++ b/interface/wx/socket.h @@ -197,7 +197,7 @@ public: @return @true on success, @false if something went wrong. */ - virtual bool AnyAddress(); + virtual bool AnyAddress() = 0; /** Internally, this is the same as setting the IP address to @b INADDR_BROADCAST. @@ -206,7 +206,7 @@ public: @return @true on success, @false if something went wrong. */ - virtual bool BroadcastAddress(); + virtual bool BroadcastAddress() = 0; /** Set the address to hostname, which can be a host name or an IP-style address @@ -215,24 +215,24 @@ public: @return @true on success, @false if something goes wrong (invalid hostname or invalid IP address). */ - virtual bool Hostname(const wxString& hostname); + virtual bool Hostname(const wxString& hostname) = 0; /** Returns the hostname which matches the IP address. */ - virtual wxString Hostname(); + virtual wxString Hostname() const = 0; /** Returns a wxString containing the IP address. */ - virtual wxString IPAddress(); + virtual wxString IPAddress() const = 0; /** Determines if current address is set to localhost. @return @true if address is localhost, @false if internet address. */ - virtual bool IsLocalHost(); + virtual bool IsLocalHost() const = 0; /** Set address to localhost. @@ -243,14 +243,14 @@ public: @return @true on success, @false if something went wrong. */ - virtual bool LocalHost(); + virtual bool LocalHost() = 0; /** Set the port to that corresponding to the specified service. @return @true on success, @false if something goes wrong (invalid @a service). */ - virtual bool Service(const wxString& service); + virtual bool Service(const wxString& service) = 0; /** Set the port to that corresponding to the specified service. diff --git a/interface/wx/stackwalk.h b/interface/wx/stackwalk.h index dff93c8e2a..d3697da841 100644 --- a/interface/wx/stackwalk.h +++ b/interface/wx/stackwalk.h @@ -77,7 +77,7 @@ protected: /** This function must be overrided to process the given frame. */ - void OnStackFrame(const wxStackFrame& frame); + virtual void OnStackFrame(const wxStackFrame& frame) = 0; }; diff --git a/interface/wx/stream.h b/interface/wx/stream.h index 2d2b1466de..828fad1374 100644 --- a/interface/wx/stream.h +++ b/interface/wx/stream.h @@ -537,7 +537,7 @@ public: list << *p << _T("\n"); @endcode */ - const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; + virtual const wxChar * const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL) const = 0; //@{ /** diff --git a/interface/wx/tipdlg.h b/interface/wx/tipdlg.h index f5c2d4fdc5..f4c0e72f93 100644 --- a/interface/wx/tipdlg.h +++ b/interface/wx/tipdlg.h @@ -48,7 +48,7 @@ public: Return the text of the current tip and pass to the next one. This function is pure virtual, it should be implemented in the derived classes. */ - wxString GetTip(); + virtual wxString GetTip() = 0; /** Returns a modified tip. diff --git a/interface/wx/variant.h b/interface/wx/variant.h index 98f4f0dd74..3da7997746 100644 --- a/interface/wx/variant.h +++ b/interface/wx/variant.h @@ -97,75 +97,75 @@ public: Default constructor. */ wxVariant(); - + /** Constructs a variant directly with a wxVariantData object. wxVariant will take ownership of the wxVariantData and will not increase its reference count. */ - wxVariant(wxVariantData* data, const wxString& name = ""); - + wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); + /** Constructs a variant from another variant by increasing the reference count. */ wxVariant(const wxVariant& variant); - + /** Constructs a variant from a wide string literal. */ - wxVariant(const wxChar* value, const wxString& name = ""); - + wxVariant(const wxChar* value, const wxString& name = wxEmptyString); + /** Constructs a variant from a string. */ - wxVariant(const wxString& value, const wxString& name = ""); - + wxVariant(const wxString& value, const wxString& name = wxEmptyString); + /** Constructs a variant from a wide char. */ - wxVariant(wxChar value, const wxString& name = ""); - + wxVariant(wxChar value, const wxString& name = wxEmptyString); + /** Constructs a variant from a long. */ - wxVariant(long value, const wxString& name = ""); - + wxVariant(long value, const wxString& name = wxEmptyString); + /** Constructs a variant from a bool. */ - wxVariant(bool value, const wxString& name = ""); - + wxVariant(bool value, const wxString& name = wxEmptyString); + /** Constructs a variant from a double. */ - wxVariant(double value, const wxString& name = ""); - + wxVariant(double value, const wxString& name = wxEmptyString); + /** Constructs a variant from a list of variants */ - wxVariant(const wxVariantList& value, const wxString& name = ""); - + wxVariant(const wxVariantList& value, const wxString& name = wxEmptyString); + /** Constructs a variant from a void pointer. */ - wxVariant(void* value, const wxString& name = ""); - + wxVariant(void* value, const wxString& name = wxEmptyString); + /** Constructs a variant from a pointer to an wxObject derived class. */ - wxVariant(wxObject* value, const wxString& name = ""); - + wxVariant(wxObject* value, const wxString& name = wxEmptyString); + /** Constructs a variant from a wxDateTime. */ - wxVariant(wxDateTime& val, const wxString& name = ""); - + wxVariant(wxDateTime& val, const wxString& name = wxEmptyString); + /** Constructs a variant from a wxArrayString. */ - wxVariant(wxArrayString& val, const wxString& name = ""); + wxVariant(wxArrayString& val, const wxString& name = wxEmptyString); /** Destructor. @@ -514,12 +514,12 @@ public: /** Returns @true if this object is equal to @a data. */ - bool Eq(wxVariantData& data) const; + virtual bool Eq(wxVariantData& data) const = 0; /** Returns the string type of the data. */ - wxString GetType() const; + virtual wxString GetType() const = 0; /** If the data is a wxObject returns a pointer to the objects wxClassInfo diff --git a/interface/wx/vlbox.h b/interface/wx/vlbox.h index 2a9ddd9926..e1f9ee5904 100644 --- a/interface/wx/vlbox.h +++ b/interface/wx/vlbox.h @@ -327,12 +327,12 @@ protected: @todo Change this function signature to non-const. */ - virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const = 0; /** The derived class must implement this method to return the height of the specified item (in pixels). */ - virtual wxCoord OnMeasureItem(size_t n) const; + virtual wxCoord OnMeasureItem(size_t n) const = 0; }; diff --git a/interface/wx/vscroll.h b/interface/wx/vscroll.h index fd087d9d22..13a13229fb 100644 --- a/interface/wx/vscroll.h +++ b/interface/wx/vscroll.h @@ -96,13 +96,13 @@ public: @see GetOrientationTargetSize() */ - virtual int GetNonOrientationTargetSize() const; + virtual int GetNonOrientationTargetSize() const = 0; /** This function need to be overridden to return the orientation that this helper is working with, either @c wxHORIZONTAL or @c wxVERTICAL. */ - virtual wxOrientation GetOrientation() const; + virtual wxOrientation GetOrientation() const = 0; /** This function needs to be overridden in the in the derived class to @@ -112,7 +112,7 @@ public: @see GetNonOrientationTargetSize() */ - virtual int GetOrientationTargetSize() const; + virtual int GetOrientationTargetSize() const = 0; /** This function will return the target window this helper class is @@ -192,7 +192,7 @@ protected: This function must be overridden in the derived class, and should return the size of the given unit in pixels. */ - virtual wxCoord OnGetUnitSize(size_t unit) const; + virtual wxCoord OnGetUnitSize(size_t unit) const = 0; }; @@ -328,7 +328,7 @@ protected: This function must be overridden in the derived class, and should return the height of the given row in pixels. */ - virtual wxCoord OnGetRowHeight(size_t row) const; + virtual wxCoord OnGetRowHeight(size_t row) const = 0; }; @@ -466,7 +466,7 @@ protected: This function must be overridden in the derived class, and should return the width of the given column in pixels. */ - virtual wxCoord OnGetColumnWidth(size_t column) const; + virtual wxCoord OnGetColumnWidth(size_t column) const = 0; }; diff --git a/interface/wx/window.h b/interface/wx/window.h index 9dd975e787..0aca1090ce 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -965,7 +965,7 @@ public: @param origin Help event origin, see also wxHelpEvent::GetOrigin. */ - virtual wxString GetHelpTextAtPoint(const wxPoint point, + virtual wxString GetHelpTextAtPoint(const wxPoint& point, wxHelpEvent::Origin origin) const; /** @@ -2662,7 +2662,7 @@ public: @see RegisterHotKey() */ - bool UnregisterHotKey(int hotkeyId); + virtual bool UnregisterHotKey(int hotkeyId); /** Unreserve an ID or range of IDs that was reserved by NewControlId(). -- 2.47.2