From: Francesco Montorsi Date: Mon, 13 Oct 2008 11:29:37 +0000 (+0000) Subject: access-specifier fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/551266a969c28562e73c96941f2c7d83fa3eb282?ds=inline access-specifier fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/html/htmltag.h b/interface/wx/html/htmltag.h index 6a951001f8..5af20e14eb 100644 --- a/interface/wx/html/htmltag.h +++ b/interface/wx/html/htmltag.h @@ -13,11 +13,11 @@ It is used by @ref overview_handlers "tag handlers". @library{wxhtml} - @category{FIXME} + @category{html} */ class wxHtmlTag { -public: +protected: /** Constructor. You will probably never have to construct a wxHtmlTag object yourself. Feel free to ignore the constructor parameters. @@ -27,6 +27,7 @@ public: int end_pos, wxHtmlTagsCache* cache, wxHtmlEntitiesParser* entParser); +public: /** Returns a string containing all parameters. Example : tag contains @c FONT SIZE=+2 COLOR="#000000". Call to diff --git a/interface/wx/html/htmlwin.h b/interface/wx/html/htmlwin.h index 5af32056fe..b15356dda6 100644 --- a/interface/wx/html/htmlwin.h +++ b/interface/wx/html/htmlwin.h @@ -44,7 +44,7 @@ public: /** Constructor. The parameters are the same as wxScrolled::wxScrolled() constructor. - + @param style Window style. See wxHtmlWindow. */ @@ -67,10 +67,10 @@ public: /** Appends HTML fragment to currently displayed text and refreshes the window. - + @param source HTML code fragment - + @return @false if an error occurred, @true otherwise. */ bool AppendToPage(const wxString& source); @@ -138,9 +138,9 @@ public: /** Loads HTML page from file and displays it. - + @return @false if an error occurred, @true otherwise - + @see LoadPage() */ bool LoadFile(const wxFileName& filename); @@ -148,52 +148,17 @@ public: /** Unlike SetPage this function first loads HTML page from @a location and then displays it. See example: - + @param location The address of document. See wxFileSystem for details on address format and behaviour of "opener". - + @return @false if an error occurred, @true otherwise - + @see LoadFile() */ virtual bool LoadPage(const wxString& location); - /** - This method is called when a mouse button is clicked inside wxHtmlWindow. - The default behaviour is to emit a wxHtmlCellEvent - and, if the event was not processed or skipped, call - OnLinkClicked() if the cell contains an - hypertext link. - Overloading this method is deprecated; intercept the event instead. - - @param cell - The cell inside which the mouse was clicked, always a simple - (i.e. non-container) cell - @param x, y - The logical coordinates of the click point - @param event - The mouse event containing other information about the click - - @return @true if a link was clicked, @false otherwise. - */ - virtual bool OnCellClicked(wxHtmlCell cell, wxCoord x, wxCoord y, - const wxMouseEvent& event); - - /** - This method is called when a mouse moves over an HTML cell. - Default behaviour is to emit a wxHtmlCellEvent. - Overloading this method is deprecated; intercept the event instead. - - @param cell - The cell inside which the mouse is currently, always a simple - (i.e. non-container) cell - @param x, y - The logical coordinates of the click point - */ - virtual void OnCellMouseHover(wxHtmlCell cell, wxCoord x, - wxCoord y); - /** Called when user clicks on hypertext link. Default behaviour is to emit a wxHtmlLinkEvent and, if the event was not processed @@ -211,42 +176,42 @@ public: You can override OnOpeningURL to selectively block some URLs (e.g. for security reasons) or to redirect them elsewhere. Default behaviour is to always return @c wxHTML_OPEN. - + @param type Indicates type of the resource. Is one of - - - - - - + + + + + + wxHTML_URL_PAGE - - - - + + + + Opening a HTML page. - - - - - + + + + + wxHTML_URL_IMAGE - - - - + + + + Opening an image. - - - - - + + + + + wxHTML_URL_OTHER - - - - + + + + Opening a resource that doesn't fall into any other category. @param url @@ -269,7 +234,7 @@ public: if given, otherwise it saves info into currently selected path. The values are stored in sub-path @c wxHtmlWindow Read values: all things set by SetFonts, SetBorders. - + @param cfg wxConfig from which you want to read the configuration. @param path @@ -280,7 +245,7 @@ public: /** Selects all text in the window. - + @see SelectLine(), SelectWord() */ void SelectAll(); @@ -290,7 +255,7 @@ public: is relative to the top of displayed page, not to window's origin, use wxScrolled::CalcUnscrolledPosition() to convert physical coordinate. - + @see SelectAll(), SelectWord() */ void SelectLine(const wxPoint& pos); @@ -300,7 +265,7 @@ public: is relative to the top of displayed page, not to window's origin, use wxScrolled::CalcUnscrolledPosition() to convert physical coordinate. - + @see SelectAll(), SelectLine() */ void SelectWord(const wxPoint& pos); @@ -314,7 +279,7 @@ public: /** This function sets the space between border of window and HTML contents. See image: - + @param b indentation from borders in pixels */ @@ -322,7 +287,7 @@ public: /** This function sets font sizes and faces. - + @param normal_face This is face name for normal (i.e. non-fixed) font. It can be either empty string (then the default face is chosen) or @@ -343,13 +308,13 @@ public: /** Sets HTML page and display it. This won't @b load the page!! It will display the @e source. See example: - + If you want to load a document from some location use LoadPage() instead. - + @param source The HTML document source to be displayed. - + @return @false if an error occurred, @true otherwise. */ virtual bool SetPage(const wxString& source); @@ -396,7 +361,7 @@ public: Regardless of whether the path is given or not, the function creates sub-path @c wxHtmlWindow. Saved values: all things set by SetFonts, SetBorders. - + @param cfg wxConfig to which you want to save the configuration. @param path @@ -404,6 +369,42 @@ public: */ virtual void WriteCustomization(wxConfigBase cfg, wxString path = wxEmptyString); + +protected: + + /** + This method is called when a mouse button is clicked inside wxHtmlWindow. + The default behaviour is to emit a wxHtmlCellEvent + and, if the event was not processed or skipped, call + OnLinkClicked() if the cell contains an + hypertext link. + Overloading this method is deprecated; intercept the event instead. + + @param cell + The cell inside which the mouse was clicked, always a simple + (i.e. non-container) cell + @param x, y + The logical coordinates of the click point + @param event + The mouse event containing other information about the click + + @return @true if a link was clicked, @false otherwise. + */ + virtual bool OnCellClicked(wxHtmlCell cell, wxCoord x, wxCoord y, + const wxMouseEvent& event); + + /** + This method is called when a mouse moves over an HTML cell. + Default behaviour is to emit a wxHtmlCellEvent. + Overloading this method is deprecated; intercept the event instead. + + @param cell + The cell inside which the mouse is currently, always a simple + (i.e. non-container) cell + @param x, y + The logical coordinates of the click point + */ + virtual void OnCellMouseHover(wxHtmlCell cell, wxCoord x, wxCoord y); }; diff --git a/interface/wx/htmllbox.h b/interface/wx/htmllbox.h index 4d17a4caf0..df0755ad32 100644 --- a/interface/wx/htmllbox.h +++ b/interface/wx/htmllbox.h @@ -93,20 +93,6 @@ public: */ virtual wxColour GetSelectedTextColour(const wxColour& colFg) const; - /** - This method must be implemented in the derived class and should return - the body (i.e. without @c html nor @c body tags) of the HTML fragment - for the given item. - Note that this function should always return a text fragment for the @a n item - which renders with the same height both when it is selected and when it's not: - i.e. if you call, inside your OnGetItem() implementation, @c IsSelected(n) to - make the items appear differently when they are selected, then you should make - sure - 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; - /** This function may be overridden to decorate HTML returned by OnGetItem(). @@ -125,6 +111,21 @@ public: @see See also wxHtmlLinkInfo. */ virtual void OnLinkClicked(size_t n, const wxHtmlLinkInfo& link); + +protected: + /** + This method must be implemented in the derived class and should return + the body (i.e. without @c html nor @c body tags) of the HTML fragment + for the given item. + Note that this function should always return a text fragment for the @a n item + which renders with the same height both when it is selected and when it's not: + i.e. if you call, inside your OnGetItem() implementation, @c IsSelected(n) to + make the items appear differently when they are selected, then you should make + sure + 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; }; diff --git a/interface/wx/richtext/richtextbuffer.h b/interface/wx/richtext/richtextbuffer.h index 5eeda8adc7..9f7717b344 100644 --- a/interface/wx/richtext/richtextbuffer.h +++ b/interface/wx/richtext/richtextbuffer.h @@ -949,16 +949,6 @@ public: */ virtual bool CanSave() const; - /** - Override to load content from @a stream into @a buffer. - */ - bool DoLoadFile(wxRichTextBuffer* buffer, wxInputStream& stream); - - /** - Override to save content to @a stream from @a buffer. - */ - bool DoSaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream); - /** Returns the encoding associated with the handler (if any). */ @@ -1048,6 +1038,17 @@ public: load and save dialogs). */ virtual void SetVisible(bool visible); + +protected: + /** + Override to load content from @a stream into @a buffer. + */ + bool DoLoadFile(wxRichTextBuffer* buffer, wxInputStream& stream); + + /** + Override to save content to @a stream from @a buffer. + */ + bool DoSaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream); }; diff --git a/interface/wx/stackwalk.h b/interface/wx/stackwalk.h index 4464d30708..dff93c8e2a 100644 --- a/interface/wx/stackwalk.h +++ b/interface/wx/stackwalk.h @@ -55,11 +55,6 @@ public: */ virtual ~wxStackWalker(); - /** - This function must be overrided to process the given frame. - */ - void OnStackFrame(const wxStackFrame& frame); - /** Enumerate stack frames from the current location, skipping the initial number of them (this can be useful when Walk() is called from some known @@ -77,6 +72,12 @@ public: Up to @a maxDepth frames are walked from the innermost to the outermost one. */ virtual void WalkFromException(size_t maxDepth = 200); + +protected: + /** + This function must be overrided to process the given frame. + */ + void OnStackFrame(const wxStackFrame& frame); }; diff --git a/interface/wx/thread.h b/interface/wx/thread.h index 3d9d11329c..77ef003e02 100644 --- a/interface/wx/thread.h +++ b/interface/wx/thread.h @@ -310,19 +310,6 @@ public: */ virtual ~wxThreadHelper(); - /** - Creates a new thread. - - The thread object is created in the suspended state, and you - should call @ref wxThread::Run GetThread()-Run to start running it. - - You may optionally specify the stack size to be allocated to it (ignored - on platforms that don't support setting it explicitly, eg. Unix). - - @return One of the ::wxThreadError enum values. - */ - wxThreadError Create(unsigned int stackSize = 0); - /** This is the entry point of the thread. @@ -337,6 +324,19 @@ public: */ virtual ExitCode Entry(); + /** + Creates a new thread. + + The thread object is created in the suspended state, and you + should call @ref wxThread::Run GetThread()-Run to start running it. + + You may optionally specify the stack size to be allocated to it (ignored + on platforms that don't support setting it explicitly, eg. Unix). + + @return One of the ::wxThreadError enum values. + */ + wxThreadError Create(unsigned int stackSize = 0); + /** This is a public function that returns the wxThread object associated with the thread. @@ -634,30 +634,6 @@ public: */ wxThreadError Delete(); - /** - This is the entry point of the thread. - - This function is pure virtual and must be implemented by any derived class. - The thread execution will start here. - - The returned value is the thread exit code which is only useful for - joinable threads and is the value returned by Wait(). - This function is called by wxWidgets itself and should never be called - directly. - */ - virtual ExitCode Entry(); - - /** - This is a protected function of the wxThread class and thus can only be called - from a derived class. It also can only be called in the context of this - thread, i.e. a thread can only exit from itself, not from another thread. - - This function will terminate the OS thread (i.e. stop the associated path of - execution) and also delete the associated C++ object for detached threads. - OnExit() will be called just before exiting. - */ - void Exit(ExitCode exitcode = 0); - /** Returns the number of system CPUs or -1 if the value is unknown. @@ -883,6 +859,32 @@ public: See also Sleep(). */ static void Yield(); + +protected: + + /** + This is the entry point of the thread. + + This function is pure virtual and must be implemented by any derived class. + The thread execution will start here. + + The returned value is the thread exit code which is only useful for + joinable threads and is the value returned by Wait(). + This function is called by wxWidgets itself and should never be called + directly. + */ + virtual ExitCode Entry(); + + /** + This is a protected function of the wxThread class and thus can only be called + from a derived class. It also can only be called in the context of this + thread, i.e. a thread can only exit from itself, not from another thread. + + This function will terminate the OS thread (i.e. stop the associated path of + execution) and also delete the associated C++ object for detached threads. + OnExit() will be called just before exiting. + */ + void Exit(ExitCode exitcode = 0); }; diff --git a/interface/wx/vlbox.h b/interface/wx/vlbox.h index 377857c9af..2a9ddd9926 100644 --- a/interface/wx/vlbox.h +++ b/interface/wx/vlbox.h @@ -203,22 +203,6 @@ public: */ virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; - /** - The derived class must implement this function to actually draw the - item with the given index on the provided DC. - - @param dc - The device context to use for drawing. - @param rect - The bounding rectangle for the item being drawn (DC clipping - region is set to this rectangle before calling this function). - @param n - The index of the item to be drawn. - - @todo Change this function signature to non-const. - */ - virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; - /** This method may be used to draw separators between the lines. The rectangle passed to it may be modified, typically to deflate it a bit @@ -237,12 +221,6 @@ public: */ virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; - /** - The derived class must implement this method to return the height of - the specified item (in pixels). - */ - virtual wxCoord OnMeasureItem(size_t n) const; - /** Selects or deselects the specified item which must be valid (i.e. not equal to @c wxNOT_FOUND). @@ -332,5 +310,29 @@ public: @see Select() */ void Toggle(size_t item); + +protected: + + /** + The derived class must implement this function to actually draw the + item with the given index on the provided DC. + + @param dc + The device context to use for drawing. + @param rect + The bounding rectangle for the item being drawn (DC clipping + region is set to this rectangle before calling this function). + @param n + The index of the item to be drawn. + + @todo Change this function signature to non-const. + */ + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; + + /** + The derived class must implement this method to return the height of + the specified item (in pixels). + */ + virtual wxCoord OnMeasureItem(size_t n) const; }; diff --git a/interface/wx/vscroll.h b/interface/wx/vscroll.h index 71d4ddbd8a..fd087d9d22 100644 --- a/interface/wx/vscroll.h +++ b/interface/wx/vscroll.h @@ -141,12 +141,6 @@ public: */ bool IsVisible(size_t unit) const; - /** - 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; - /** This function doesn't have to be overridden but it may be useful to do so if calculating the units' sizes is a relatively expensive operation @@ -190,6 +184,15 @@ public: last item). */ int VirtualHitTest(wxCoord coord) const; + + +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; }; @@ -257,12 +260,6 @@ public: */ bool IsRowVisible(size_t row) const; - /** - 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; - /** This function doesn't have to be overridden but it may be useful to do so if calculating the rows' sizes is a relatively expensive operation @@ -324,6 +321,14 @@ public: @see GetRowCount() */ void SetRowCount(size_t rowCount); + +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; }; @@ -392,12 +397,6 @@ public: */ bool IsColumnVisible(size_t column) const; - /** - 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; - /** This function doesn't have to be overridden but it may be useful to do so if calculating the columns' sizes is a relatively expensive @@ -460,6 +459,14 @@ public: @see GetColumnCount() */ void SetColumnCount(size_t columnCount); + +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; };