From 328f5751e8a06727b137189fe04891a9f43bfc8b Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Sun, 9 Mar 2008 16:24:26 +0000 Subject: [PATCH] add const qualifiers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/accel.h | 8 +- interface/animate.h | 16 +- interface/app.h | 22 +-- interface/apptrait.h | 4 +- interface/archive.h | 46 ++--- interface/arrstr.h | 8 +- interface/aui/aui.h | 50 +++--- interface/aui/auibook.h | 16 +- interface/bitmap.h | 20 +-- interface/bmpbuttn.h | 10 +- interface/bmpcbox.h | 4 +- interface/brush.h | 10 +- interface/button.h | 2 +- interface/calctrl.h | 40 ++--- interface/caret.h | 14 +- interface/checkbox.h | 10 +- interface/choicdlg.h | 12 +- interface/choice.h | 4 +- interface/clipbrd.h | 4 +- interface/clntdata.h | 6 +- interface/clrpicker.h | 4 +- interface/cmdline.h | 12 +- interface/cmdproc.h | 14 +- interface/cmndata.h | 74 ++++---- interface/collpane.h | 8 +- interface/colour.h | 15 +- interface/combo.h | 32 ++-- interface/combobox.h | 20 +-- interface/config.h | 73 ++++---- interface/control.h | 4 +- interface/cshelp.h | 2 +- interface/ctrlsub.h | 16 +- interface/cursor.h | 2 +- interface/dataobj.h | 40 ++--- interface/dataview.h | 92 +++++----- interface/datectrl.h | 4 +- interface/dateevt.h | 2 +- interface/datetime.h | 156 ++++++++--------- interface/dc.h | 38 ++--- interface/dcsvg.h | 26 +-- interface/debugrpt.h | 16 +- interface/dialog.h | 18 +- interface/dialup.h | 18 +- interface/dir.h | 8 +- interface/dirctrl.h | 14 +- interface/dirdlg.h | 4 +- interface/display.h | 12 +- interface/docmdi.h | 4 +- interface/docview.h | 46 ++--- interface/dragimag.h | 4 +- interface/dynarray.h | 14 +- interface/dynlib.h | 16 +- interface/encconv.h | 14 +- interface/event.h | 222 ++++++++++++------------ interface/fdrepdlg.h | 12 +- interface/ffile.h | 12 +- interface/file.h | 18 +- interface/filectrl.h | 20 +-- interface/filedlg.h | 18 +- interface/filefn.h | 4 +- interface/filename.h | 68 ++++---- interface/filepicker.h | 10 +- interface/filesys.h | 18 +- interface/font.h | 18 +- interface/fontdlg.h | 2 +- interface/fontpicker.h | 6 +- interface/frame.h | 8 +- interface/gauge.h | 10 +- interface/gbsizer.h | 28 +-- interface/gdicmn.h | 70 ++++---- interface/graphics.h | 56 +++--- interface/grid.h | 228 ++++++++++++------------- interface/hash.h | 2 +- interface/hashmap.h | 14 +- interface/hashset.h | 14 +- interface/help.h | 2 +- interface/html/helpdlg.h | 2 +- interface/html/helpfrm.h | 2 +- interface/html/htmlcell.h | 26 +-- interface/html/htmlpars.h | 2 +- interface/html/htmltag.h | 22 +-- interface/html/htmlwin.h | 12 +- interface/html/htmprint.h | 2 +- interface/html/winpars.h | 32 ++-- interface/htmllbox.h | 12 +- interface/hyperlink.h | 12 +- interface/icon.h | 8 +- interface/iconbndl.h | 8 +- interface/iconloc.h | 2 +- interface/image.h | 81 ++++----- interface/imaglist.h | 8 +- interface/intl.h | 38 ++--- interface/joystick.h | 76 ++++----- interface/laywin.h | 24 +-- interface/list.h | 54 +++--- interface/listbox.h | 6 +- interface/listctrl.h | 134 +++++++-------- interface/log.h | 6 +- interface/longlong.h | 18 +- interface/mdi.h | 10 +- interface/mediactrl.h | 10 +- interface/menu.h | 48 +++--- interface/menuitem.h | 44 ++--- interface/msgqueue.h | 2 +- interface/mstream.h | 6 +- interface/msw/ole/activex.h | 8 +- interface/msw/ole/automtn.h | 20 +-- interface/msw/registry.h | 26 +-- interface/notebook.h | 20 +-- interface/object.h | 24 +-- interface/odcombo.h | 12 +- interface/palette.h | 8 +- interface/panel.h | 2 +- interface/pen.h | 16 +- interface/pickerbase.h | 12 +- interface/platinfo.h | 58 +++---- interface/position.h | 26 +-- interface/process.h | 16 +- interface/propdlg.h | 6 +- interface/protocol/http.h | 2 +- interface/ptr_scpd.h | 8 +- interface/ptr_shrd.h | 12 +- interface/radiobox.h | 24 +-- interface/radiobut.h | 2 +- interface/recguard.h | 2 +- interface/regex.h | 24 +-- interface/region.h | 40 ++--- interface/renderer.h | 2 +- interface/richtext/richtextbuffer.h | 62 +++---- interface/richtext/richtextctrl.h | 122 ++++++------- interface/richtext/richtextformatdlg.h | 14 +- interface/richtext/richtexthtml.h | 8 +- interface/richtext/richtextprint.h | 32 ++-- interface/richtext/richtextstyledlg.h | 18 +- interface/richtext/richtextstyles.h | 80 ++++----- interface/richtext/richtextsymboldlg.h | 20 +-- interface/richtext/richtextxml.h | 8 +- interface/sashwin.h | 16 +- interface/scrolbar.h | 8 +- interface/scrolwin.h | 12 +- interface/sizer.h | 46 ++--- interface/slider.h | 18 +- interface/snglinst.h | 2 +- interface/socket.h | 26 +-- interface/sound.h | 8 +- interface/spinbutt.h | 8 +- interface/spinctrl.h | 6 +- interface/splash.h | 6 +- interface/splitter.h | 18 +- interface/sstream.h | 2 +- interface/stackwalk.h | 20 +-- interface/statbmp.h | 4 +- interface/statline.h | 2 +- interface/stattext.h | 4 +- interface/statusbr.h | 6 +- interface/stc/stc.h | 42 ++--- interface/stdpaths.h | 26 +-- interface/stopwatch.h | 2 +- interface/strconv.h | 68 ++++---- interface/stream.h | 60 +++---- interface/string.h | 138 +++++++-------- interface/sysopt.h | 8 +- interface/tarstrm.h | 34 ++-- interface/textctrl.h | 156 ++++++++--------- interface/textdlg.h | 2 +- interface/textfile.h | 50 +++--- interface/tglbtn.h | 4 +- interface/thread.h | 18 +- interface/timer.h | 14 +- interface/tipdlg.h | 2 +- interface/tokenzr.h | 10 +- interface/toolbar.h | 22 +-- interface/tooltip.h | 4 +- interface/toplevel.h | 20 +-- interface/treebase.h | 8 +- interface/treebook.h | 14 +- interface/treectrl.h | 88 +++++----- interface/uri.h | 40 ++--- interface/url.h | 4 +- interface/valgen.h | 2 +- interface/validate.h | 4 +- interface/valtext.h | 8 +- interface/variant.h | 124 +++++++------- interface/vector.h | 16 +- interface/vlbox.h | 28 +-- interface/vscroll.h | 83 ++++----- interface/weakref.h | 6 +- interface/wfstream.h | 8 +- interface/window.h | 170 +++++++++--------- interface/wizard.h | 22 +-- interface/xml/xml.h | 50 +++--- interface/xrc/xmlres.h | 4 +- interface/zipstrm.h | 38 ++--- 193 files changed, 2525 insertions(+), 2513 deletions(-) diff --git a/interface/accel.h b/interface/accel.h index e2f5a6c0ea..b12465366a 100644 --- a/interface/accel.h +++ b/interface/accel.h @@ -42,17 +42,17 @@ public: /** Returns the command identifier for the accelerator table entry. */ - int GetCommand(); + int GetCommand() const; /** Returns the flags for the accelerator table entry. */ - int GetFlags(); + int GetFlags() const; /** Returns the keycode for the accelerator table entry. */ - int GetKeyCode(); + int GetKeyCode() const; /** Sets the accelerator entry parameters. @@ -124,7 +124,7 @@ public: /** Returns @true if the accelerator table is valid. */ - bool IsOk(); + bool IsOk() const; /** Assignment operator, using @ref overview_trefcount "reference counting". diff --git a/interface/animate.h b/interface/animate.h index 24dbe307af..6b49baa177 100644 --- a/interface/animate.h +++ b/interface/animate.h @@ -83,18 +83,18 @@ public: /** Returns the animation associated with this control. */ - wxAnimation GetAnimation(); + wxAnimation GetAnimation() const; /** Returns the inactive bitmap shown in this control when the; see SetInactiveBitmap() for more info. */ - wxBitmap GetInactiveBitmap(); + wxBitmap GetInactiveBitmap() const; /** Returns @true if the animation is being played. */ - bool IsPlaying(); + bool IsPlaying() const; /** Loads the animation from the given file and calls SetAnimation(). @@ -197,27 +197,27 @@ public: Returns the delay for the i-th frame in milliseconds. If @c -1 is returned the frame is to be displayed forever. */ - int GetDelay(unsigned int i); + int GetDelay(unsigned int i) const; /** Returns the i-th frame as a wxImage. */ - wxImage GetFrame(unsigned int i); + wxImage GetFrame(unsigned int i) const; /** Returns the number of frames for this animation. */ - unsigned int GetFrameCount(); + unsigned int GetFrameCount() const; /** Returns the size of the animation. */ - wxSize GetSize(); + wxSize GetSize() const; /** Returns @true if animation data is present. */ - bool IsOk(); + bool IsOk() const; /** Loads an animation from the given stream. diff --git a/interface/app.h b/interface/app.h index 5ed7fe49d8..25fd6524c4 100644 --- a/interface/app.h +++ b/interface/app.h @@ -97,7 +97,7 @@ public: By default, returns the same string as GetAppName(). This function is new since wxWidgets version 2.9.0 */ - wxString GetAppDisplayName(); + wxString GetAppDisplayName() const; /** Returns the application name. @@ -107,7 +107,7 @@ public: @see GetAppDisplayName() */ - wxString GetAppName(); + wxString GetAppName() const; /** Gets the class name of the application. The class name may be used in a @@ -116,7 +116,7 @@ public: @see SetClassName() */ - wxString GetClassName(); + wxString GetClassName() const; /** Returns @true if the application will exit when the top-level window is deleted, @@ -126,7 +126,7 @@ public: @see SetExitOnFrameDelete(), @ref overview_wxappshutdownoverview "wxApp shutdown overview" */ - bool GetExitOnFrameDelete(); + bool GetExitOnFrameDelete() const; /** Returns the one and only global application object. @@ -145,7 +145,7 @@ public: @see SetTopWindow() */ - virtual wxWindow* GetTopWindow(); + virtual wxWindow* GetTopWindow() const; /** Returns a pointer to the wxAppTraits object for the application. @@ -160,7 +160,7 @@ public: @see SetUseBestVisual() */ - bool GetUseBestVisual(); + bool GetUseBestVisual() const; /** Returns the user-readable vendor name. The difference between this string @@ -171,12 +171,12 @@ public: By default, returns the same string as GetVendorName(). This function is new since wxWidgets version 2.9.0 */ - wxString GetVendorDisplayName(); + wxString GetVendorDisplayName() const; /** Returns the application's vendor name. */ - wxString GetVendorName(); + wxString GetVendorName() const; /** This function simply invokes the given method @a func of the specified @@ -187,7 +187,7 @@ public: */ virtual void HandleEvent(wxEvtHandler handler, wxEventFunction func, - wxEvent& event); + wxEvent& event) const; /** Returns @true if the application is active, i.e. if one of its windows is @@ -196,7 +196,7 @@ public: wxTopLevelWindow::RequestUserAttention to do it. */ - bool IsActive(); + bool IsActive() const; /** Returns @true if the main event loop is currently running, i.e. if the @@ -483,7 +483,7 @@ public: @param theme The name of the new theme or an absolute path to a gtkrc-theme-file */ - bool SetNativeTheme(); + bool SetNativeTheme(const wxStringamp;); /** Sets the 'top' window. You can call this from within OnInit() to diff --git a/interface/apptrait.h b/interface/apptrait.h index 8abc2f94d3..cca9c9859b 100644 --- a/interface/apptrait.h +++ b/interface/apptrait.h @@ -73,7 +73,7 @@ public: to figure out, which desktop environment is running. The method returns an empty string otherwise and on all other platforms. */ - virtual wxString GetDesktopEnvironment(); + virtual wxString GetDesktopEnvironment() const; /** Returns the wxStandardPaths object for the application. @@ -105,7 +105,7 @@ public: Returns @true if the library was built as wxUniversal. Always returns @false for wxBase-only apps. */ - bool IsUsingUniversalWidgets(); + bool IsUsingUniversalWidgets() const; /** Shows the assert dialog with the specified message in GUI mode or just prints diff --git a/interface/archive.h b/interface/archive.h index 89efa467ff..9de1a3e72f 100644 --- a/interface/archive.h +++ b/interface/archive.h @@ -173,14 +173,14 @@ public: /** Returns a copy of this entry object. */ - wxArchiveEntry* Clone(); + wxArchiveEntry* Clone() const; //@{ /** The entry's timestamp. */ wxDateTime GetDateTime(); - void SetDateTime(const wxDateTime& dt); + const void SetDateTime(const wxDateTime& dt); //@} //@{ @@ -192,8 +192,8 @@ public: Similarly, setting a name with a trailing path separator sets IsDir(). */ wxString GetName(wxPathFormat format = wxPATH_NATIVE); - void SetName(const wxString& name, - wxPathFormat format = wxPATH_NATIVE); + const void SetName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE); //@} //@{ @@ -201,14 +201,14 @@ public: The size of the entry's data in bytes. */ off_t GetSize(); - void SetSize(off_t size); + const void SetSize(off_t size); //@} /** Returns the path format used internally within the archive to store filenames. */ - wxPathFormat GetInternalFormat(); + wxPathFormat GetInternalFormat() const; /** Returns the entry's filename in the internal format used within the @@ -219,12 +219,12 @@ public: @see @ref overview_wxarcbyname "Looking up an archive entry by name" */ - wxString GetInternalName(); + wxString GetInternalName() const; /** Returns a numeric value unique to the entry within the archive. */ - off_t GetOffset(); + off_t GetOffset() const; //@{ /** @@ -237,7 +237,7 @@ public: restore files, even if the archive contains no explicit directory entries. */ bool IsDir(); - void SetIsDir(bool isDir = true); + const void SetIsDir(bool isDir = true); //@} //@{ @@ -245,7 +245,7 @@ public: True if the entry is a read-only file. */ bool IsReadOnly(); - void SetIsReadOnly(bool isReadOnly = true); + const void SetIsReadOnly(bool isReadOnly = true); //@} //@{ @@ -303,7 +303,7 @@ public: can be a complete filename rather than just an extension. */ bool CanHandle(const wxChar* protocol, - wxStreamProtocolType type = wxSTREAM_PROTOCOL); + wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; /** A static member that finds a factory that can handle a given protocol, MIME @@ -322,7 +322,7 @@ public: constructor, is wxConvLocal. */ wxMBConv GetConv(); - void SetConv(wxMBConv& conv); + const void SetConv(wxMBConv& conv); //@} //@{ @@ -333,8 +333,8 @@ public: GetFirst()/GetNext() return a pointer to a factory or @NULL if no more are available. They do not give away ownership of the factory. */ - static const wxArchiveClassFactory* GetFirst(); - const wxArchiveClassFactory* GetNext(); + static const wxArchiveClassFactory* GetFirst() const; + const wxArchiveClassFactory* GetNext() const; //@} /** @@ -343,13 +343,13 @@ public: wxZipEntry::GetInternalName. */ wxString GetInternalName(const wxString& name, - wxPathFormat format = wxPATH_NATIVE); + wxPathFormat format = wxPATH_NATIVE) const; /** Returns the wxFileSystem protocol supported by this factory. Equivalent to wxString(*GetProtcols()). */ - wxString GetProtocol(); + wxString GetProtocol() const; /** Returns the protocols, MIME types or file extensions supported by this @@ -357,13 +357,13 @@ public: ownership of the array or strings. For example, to list the file extensions a factory supports: */ - const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL); + const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; /** Create a new wxArchiveEntry object of the appropriate type. */ - wxArchiveEntry* NewEntry(); + wxArchiveEntry* NewEntry() const; //@{ /** @@ -371,10 +371,10 @@ public: If the parent stream is passed as a pointer then the new archive stream takes ownership of it. If it is passed by reference then it does not. */ - wxArchiveInputStream* NewStream(wxInputStream& stream); - wxArchiveOutputStream* NewStream(wxOutputStream& stream); - wxArchiveInputStream* NewStream(wxInputStream* stream); - wxArchiveOutputStream* NewStream(wxOutputStream* stream); + wxArchiveInputStream* NewStream(wxInputStream& stream) const; + const wxArchiveOutputStream* NewStream(wxOutputStream& stream) const; + const wxArchiveInputStream* NewStream(wxInputStream* stream) const; + const wxArchiveOutputStream* NewStream(wxOutputStream* stream) const; //@} /** @@ -554,7 +554,7 @@ public: Returns an entry object from the archive input stream, giving away ownership. */ - const T operator*(); + const T operator*() const; //@{ /** diff --git a/interface/arrstr.h b/interface/arrstr.h index d71cc78b60..b60f2f3321 100644 --- a/interface/arrstr.h +++ b/interface/arrstr.h @@ -113,7 +113,7 @@ public: /** Returns the number of items in the array. */ - size_t GetCount(); + size_t GetCount() const; /** Search the element in the array, starting from the beginning if @@ -154,7 +154,7 @@ public: See also @ref operatorindex() operator[] for the operator version. */ - wxString Item(size_t nIndex); + wxString Item(size_t nIndex) const; /** Returns the last element of the array. Attempt to access the last element of @@ -200,7 +200,7 @@ Warning: Compares 2 arrays respecting the case. Returns @true if the arrays have different number of elements or if the elements don't match pairwise. */ - bool operator !=(const wxArrayString& array); + bool operator !=(const wxArrayString& array) const; /** Assignment operator. @@ -211,7 +211,7 @@ Warning: Compares 2 arrays respecting the case. Returns @true only if the arrays have the same number of elements and the same strings in the same order. */ - bool operator ==(const wxArrayString& array); + bool operator ==(const wxArrayString& array) const; /** Return the array element at position @e nIndex. An assert failure will diff --git a/interface/aui/aui.h b/interface/aui/aui.h index 174bbc79dc..6b7ee4167e 100644 --- a/interface/aui/aui.h +++ b/interface/aui/aui.h @@ -97,7 +97,7 @@ public: Returns the current art provider being used. See also: wxAuiDockArt. */ - wxAuiDockArt* GetArtProvider(); + wxAuiDockArt* GetArtProvider() const; /** Returns the current dock constraint values. See SetDockSizeConstraint() for @@ -108,12 +108,12 @@ public: /** Returns the current manager's flags. */ - unsigned int GetFlags(); + unsigned int GetFlags() const; /** Returns the frame currently being managed by wxAuiManager. */ - wxWindow* GetManagedWindow(); + wxWindow* GetManagedWindow() const; /** Calling this method will return the wxAuiManager for a given window. The @a @@ -426,50 +426,50 @@ public: /** HasBorder() returns @true if the pane displays a border. */ - bool HasBorder(); + bool HasBorder() const; /** HasCaption() returns @true if the pane displays a caption. */ - bool HasCaption(); + bool HasCaption() const; /** HasCloseButton() returns @true if the pane displays a button to close the pane. */ - bool HasCloseButton(); + bool HasCloseButton() const; /** HasFlag() returns @true if the the property specified by flag is active for the pane. */ - bool HasFlag(unsigned int flag); + bool HasFlag(unsigned int flag) const; /** HasGripper() returns @true if the pane displays a gripper. */ - bool HasGripper(); + bool HasGripper() const; /** HasGripper() returns @true if the pane displays a gripper at the top. */ - bool HasGripperTop(); + bool HasGripperTop() const; /** HasMaximizeButton() returns @true if the pane displays a button to maximize the pane. */ - bool HasMaximizeButton(); + bool HasMaximizeButton() const; /** HasMinimizeButton() returns @true if the pane displays a button to minimize the pane. */ - bool HasMinimizeButton(); + bool HasMinimizeButton() const; /** HasPinButton() returns @true if the pane displays a button to float the pane. */ - bool HasPinButton(); + bool HasPinButton() const; /** Hide() indicates that a pane should be hidden. @@ -480,73 +480,73 @@ public: IsBottomDockable() returns @true if the pane can be docked at the bottom of the managed frame. */ - bool IsBottomDockable(); + bool IsBottomDockable() const; /** IsDocked() returns @true if the pane is docked. */ - bool IsDocked(); + bool IsDocked() const; /** IsFixed() returns @true if the pane cannot be resized. */ - bool IsFixed(); + bool IsFixed() const; /** IsFloatable() returns @true if the pane can be undocked and displayed as a floating window. */ - bool IsFloatable(); + bool IsFloatable() const; /** IsFloating() returns @true if the pane is floating. */ - bool IsFloating(); + bool IsFloating() const; /** IsLeftDockable() returns @true if the pane can be docked on the left of the managed frame. */ - bool IsLeftDockable(); + bool IsLeftDockable() const; /** IsMoveable() returns @true if the docked frame can be undocked or moved to another dock position. */ - bool IsMovable(); + bool IsMovable() const; /** IsOk() returns @true if the wxAuiPaneInfo structure is valid. A pane structure is valid if it has an associated window. */ - bool IsOk(); + bool IsOk() const; /** IsResizable() returns @true if the pane can be resized. */ - bool IsResizable(); + bool IsResizable() const; /** IsRightDockable() returns @true if the pane can be docked on the right of the managed frame. */ - bool IsRightDockable(); + bool IsRightDockable() const; /** IsShown() returns @true if the pane is currently shown. */ - bool IsShown(); + bool IsShown() const; /** IsToolbar() returns @true if the pane contains a toolbar. */ - bool IsToolbar(); + bool IsToolbar() const; /** IsTopDockable() returns @true if the pane can be docked at the top of the managed frame. */ - bool IsTopDockable(); + bool IsTopDockable() const; /** Layer() determines the layer of the docked pane. The dock layer is similar to diff --git a/interface/aui/auibook.h b/interface/aui/auibook.h index b8a6110dbd..d4449facab 100644 --- a/interface/aui/auibook.h +++ b/interface/aui/auibook.h @@ -103,7 +103,7 @@ public: /** Returns the associated art provider. */ - wxAuiTabArt* GetArtProvider(); + wxAuiTabArt* GetArtProvider() const; /** Returns the desired height of the notebook for the given page height. Use this @@ -115,38 +115,38 @@ public: /** Returns the page specified by the given index. */ - wxWindow* GetPage(size_t page_idx); + wxWindow* GetPage(size_t page_idx) const; /** Returns the tab bitmap for the page. */ - wxBitmap GetPageBitmap(size_t page); + wxBitmap GetPageBitmap(size_t page) const; /** Returns the number of pages in the notebook. */ - size_t GetPageCount(); + size_t GetPageCount() const; /** Returns the page index for the specified window. If the window is not found in the notebook, wxNOT_FOUND is returned. */ - int GetPageIndex(wxWindow* page_wnd); + int GetPageIndex(wxWindow* page_wnd) const; /** Returns the tab label for the page. */ - wxString GetPageText(size_t page); + wxString GetPageText(size_t page) const; /** Returns the currently selected page. */ - int GetSelection(); + int GetSelection() const; /** Returns the height of the tab control. */ - int GetTabCtrlHeight(); + int GetTabCtrlHeight() const; /** InsertPage() is similar to AddPage, but allows the ability to specify the diff --git a/interface/bitmap.h b/interface/bitmap.h index a8aff7efe0..54d7e3cddd 100644 --- a/interface/bitmap.h +++ b/interface/bitmap.h @@ -70,17 +70,17 @@ public: /** Gets the file extension associated with this handler. */ - const wxString GetExtension(); + const wxString GetExtension() const; /** Gets the name of this handler. */ - const wxString GetName(); + const wxString GetName() const; /** Gets the bitmap type associated with this handler. */ - long GetType(); + long GetType() const; /** Loads a bitmap from a file or resource, putting the resulting data into @e @@ -400,7 +400,7 @@ public: Gets the colour depth of the bitmap. A value of 1 indicates a monochrome bitmap. */ - int GetDepth(); + int GetDepth() const; /** Returns the static list of bitmap format handlers. @@ -412,7 +412,7 @@ public: /** Gets the height of the bitmap in pixels. */ - int GetHeight(); + int GetHeight() const; /** Gets the associated mask (if any) which may have been loaded from a file @@ -420,7 +420,7 @@ public: @see SetMask(), wxMask */ - wxMask* GetMask(); + wxMask* GetMask() const; /** Gets the associated palette (if any) which may have been loaded from a file @@ -428,20 +428,20 @@ public: @see wxPalette */ - wxPalette* GetPalette(); + wxPalette* GetPalette() const; /** Returns a sub bitmap of the current one as long as the rect belongs entirely to the bitmap. This function preserves bit depth and mask information. */ - wxBitmap GetSubBitmap(const wxRect& rect); + wxBitmap GetSubBitmap(const wxRect& rect) const; /** Gets the width of the bitmap in pixels. @see GetHeight() */ - int GetWidth(); + int GetWidth() const; /** Adds the standard bitmap format handlers, which, depending on wxWidgets @@ -467,7 +467,7 @@ public: /** Returns @true if bitmap data is present. */ - bool IsOk(); + bool IsOk() const; /** Loads a bitmap from a file or resource. diff --git a/interface/bmpbuttn.h b/interface/bmpbuttn.h index d9edb69739..d62458b54a 100644 --- a/interface/bmpbuttn.h +++ b/interface/bmpbuttn.h @@ -114,7 +114,7 @@ public: @see SetBitmapDisabled() */ const wxBitmap GetBitmapDisabled(); - wxBitmap GetBitmapDisabled(); + const wxBitmap& GetBitmapDisabled(); //@} //@{ @@ -126,7 +126,7 @@ public: @see SetBitmapFocus() */ const wxBitmap GetBitmapFocus(); - wxBitmap GetBitmapFocus(); + const wxBitmap& GetBitmapFocus(); //@} //@{ @@ -136,7 +136,7 @@ public: @see SetBitmapHover() */ const wxBitmap GetBitmapHover(); - wxBitmap GetBitmapHover(); + const wxBitmap& GetBitmapHover(); //@} //@{ @@ -148,7 +148,7 @@ public: @see SetBitmapLabel() */ const wxBitmap GetBitmapLabel(); - wxBitmap GetBitmapLabel(); + const wxBitmap& GetBitmapLabel(); //@} /** @@ -158,7 +158,7 @@ public: @see SetBitmapSelected() */ - wxBitmap GetBitmapSelected(); + wxBitmap GetBitmapSelected() const; /** Sets the bitmap for the disabled button appearance. diff --git a/interface/bmpcbox.h b/interface/bmpcbox.h index 5d8e53ba26..5516946afe 100644 --- a/interface/bmpcbox.h +++ b/interface/bmpcbox.h @@ -143,12 +143,12 @@ public: /** Returns size of bitmaps used in the list. */ - wxSize GetBitmapSize(); + wxSize GetBitmapSize() const; /** Returns the bitmap of the item with the given index. */ - wxBitmap GetItemBitmap(unsigned int n); + wxBitmap GetItemBitmap(unsigned int n) const; //@{ /** diff --git a/interface/brush.h b/interface/brush.h index b94094f5ba..09399ea878 100644 --- a/interface/brush.h +++ b/interface/brush.h @@ -193,7 +193,7 @@ public: @see SetColour() */ - wxColour GetColour(); + wxColour GetColour() const; /** Gets a pointer to the stipple bitmap. If the brush does not have a wxSTIPPLE @@ -203,7 +203,7 @@ public: @see SetStipple() */ - wxBitmap* GetStipple(); + wxBitmap* GetStipple() const; /** Returns the brush style, one of: @@ -250,21 +250,21 @@ public: @see SetStyle(), SetColour(), SetStipple() */ - int GetStyle(); + int GetStyle() const; /** Returns @true if the style of the brush is any of hatched fills. @see GetStyle() */ - bool IsHatch(); + bool IsHatch() const; /** Returns @true if the brush is initialised. It will return @false if the default constructor has been used (for example, the brush is a member of a class, or @NULL has been assigned to it). */ - bool IsOk(); + bool IsOk() const; //@{ /** diff --git a/interface/button.h b/interface/button.h index 3db1b2dcc3..5fb95e80c8 100644 --- a/interface/button.h +++ b/interface/button.h @@ -117,7 +117,7 @@ public: @see SetLabel() */ - wxString GetLabel(); + wxString GetLabel() const; /** This sets the button to be the default item for the panel or dialog diff --git a/interface/calctrl.h b/interface/calctrl.h index f9787d92db..707f116c49 100644 --- a/interface/calctrl.h +++ b/interface/calctrl.h @@ -27,7 +27,7 @@ public: @c EVT_CALENDAR_WEEKDAY_CLICKED handler. It doesn't make sense to call this function in other handlers. */ - wxDateTime::WeekDay GetWeekDay(); + wxDateTime::WeekDay GetWeekDay() const; /** Sets the week day carried by the event, normally only used by the library @@ -70,59 +70,59 @@ public: /** Returns the background colour to use for the item with this attribute. */ - const wxColour GetBackgroundColour(); + const wxColour GetBackgroundColour() const; /** Returns the border to use for the item with this attribute. */ - wxCalendarDateBorder GetBorder(); + wxCalendarDateBorder GetBorder() const; /** Returns the border colour to use for the item with this attribute. */ - const wxColour GetBorderColour(); + const wxColour GetBorderColour() const; /** Returns the font to use for the item with this attribute. */ - const wxFont GetFont(); + const wxFont GetFont() const; /** Returns the text colour to use for the item with this attribute. */ - const wxColour GetTextColour(); + const wxColour GetTextColour() const; /** Returns @true if this attribute specifies a non-default text background colour. */ - bool HasBackgroundColour(); + bool HasBackgroundColour() const; /** Returns @true if this attribute specifies a non-default (i.e. any) border. */ - bool HasBorder(); + bool HasBorder() const; /** Returns @true if this attribute specifies a non-default border colour. */ - bool HasBorderColour(); + bool HasBorderColour() const; /** Returns @true if this attribute specifies a non-default font. */ - bool HasFont(); + bool HasFont() const; /** Returns @true if this item has a non-default text foreground colour. */ - bool HasTextColour(); + bool HasTextColour() const; /** Returns @true if this attribute specifies that this item should be displayed as a holiday. */ - bool IsHoliday(); + bool IsHoliday() const; /** Sets the text background colour to use. @@ -270,54 +270,54 @@ public: Returns the attribute for the given date (should be in the range 1...31). The returned pointer may be @NULL. */ - wxCalendarDateAttr* GetAttr(size_t day); + wxCalendarDateAttr* GetAttr(size_t day) const; /** Gets the currently selected date. */ - const wxDateTime GetDate(); + const wxDateTime GetDate() const; /** Gets the background colour of the header part of the calendar window. @see SetHeaderColours() */ - const wxColour GetHeaderColourBg(); + const wxColour GetHeaderColourBg() const; /** Gets the foreground colour of the header part of the calendar window. @see SetHeaderColours() */ - const wxColour GetHeaderColourFg(); + const wxColour GetHeaderColourFg() const; /** Gets the background highlight colour. @see SetHighlightColours() */ - const wxColour GetHighlightColourBg(); + const wxColour GetHighlightColourBg() const; /** Gets the foreground highlight colour. @see SetHighlightColours() */ - const wxColour GetHighlightColourFg(); + const wxColour GetHighlightColourFg() const; /** Return the background colour currently used for holiday highlighting. @see SetHolidayColours() */ - const wxColour GetHolidayColourBg(); + const wxColour GetHolidayColourBg() const; /** Return the foreground colour currently used for holiday highlighting. @see SetHolidayColours() */ - const wxColour GetHolidayColourFg(); + const wxColour GetHolidayColourFg() const; /** Returns one of @c wxCAL_HITTEST_XXX diff --git a/interface/caret.h b/interface/caret.h index 4e8a9c177d..cc9b5aec58 100644 --- a/interface/caret.h +++ b/interface/caret.h @@ -69,8 +69,8 @@ public: Returns a 2-element list @c ( x, y ) */ - void GetPosition(int* x, int* y); - wxPoint GetPosition(); + void GetPosition(int* x, int* y) const; + const wxPoint GetPosition() const; //@} //@{ @@ -86,14 +86,14 @@ public: Returns a 2-element list @c ( width, height ) */ - void GetSize(int* width, int* height); - wxSize GetSize(); + void GetSize(int* width, int* height) const; + const wxSize GetSize() const; //@} /** Get the window the caret is associated with. */ - wxWindow* GetWindow(); + wxWindow* GetWindow() const; /** Same as wxCaret::Show(@false). @@ -103,14 +103,14 @@ public: /** Returns @true if the caret was created successfully. */ - bool IsOk(); + bool IsOk() const; /** Returns @true if the caret is visible and @false if it is permanently hidden (if it is is blinking and not shown currently but will be after the next blink, this method still returns @true). */ - bool IsVisible(); + bool IsVisible() const; //@{ /** diff --git a/interface/checkbox.h b/interface/checkbox.h index 09c30ce4fb..81757d0f8e 100644 --- a/interface/checkbox.h +++ b/interface/checkbox.h @@ -106,14 +106,14 @@ public: Asserts when the function is used with a 2-state checkbox. */ - wxCheckBoxState Get3StateValue(); + wxCheckBoxState Get3StateValue() const; /** Gets the state of a 2-state checkbox. @returns Returns @true if it is checked, @false otherwise. */ - bool GetValue(); + bool GetValue() const; /** Returns whether or not the checkbox is a 3-state checkbox. @@ -121,7 +121,7 @@ public: @returns Returns @true if this checkbox is a 3-state checkbox, @false if it's a 2-state checkbox. */ - bool Is3State(); + bool Is3State() const; /** Returns whether or not the user can set the checkbox to the third state. @@ -130,14 +130,14 @@ public: checkbox, @false if it can only be set programmatically or if it's a 2-state checkbox. */ - bool Is3rdStateAllowedForUser(); + bool Is3rdStateAllowedForUser() const; /** This is just a maybe more readable synonym for GetValue(): just as the latter, it returns @true if the checkbox is checked and @false otherwise. */ - bool IsChecked(); + bool IsChecked() const; /** Sets the checkbox to the given state. This does not cause a diff --git a/interface/choicdlg.h b/interface/choicdlg.h index 44de9f59ea..138c60c88f 100644 --- a/interface/choicdlg.h +++ b/interface/choicdlg.h @@ -104,12 +104,12 @@ public: /** Returns array with indexes of selected items. */ - wxArrayInt GetSelection(); + wxArrayInt GetSelection() const; /** Sets selected items from the array of selected items' indexes. */ - void SetSelections(const wxArrayInt& selections); + void SetSelections(const wxArrayInt& selections) const; /** Shows the dialog, returning either wxID_OK or wxID_CANCEL. @@ -222,22 +222,22 @@ public: /** Returns the index of selected item. */ - int GetSelection(); + int GetSelection() const; /** Returns the client data associated with the selection. */ - char* GetSelectionClientData(); + char* GetSelectionClientData() const; /** Returns the selected string. */ - wxString GetStringSelection(); + wxString GetStringSelection() const; /** Sets the index of the initially selected item. */ - void SetSelection(int selection); + void SetSelection(int selection) const; /** Shows the dialog, returning either wxID_OK or wxID_CANCEL. diff --git a/interface/choice.h b/interface/choice.h index 42a813237e..2661f638bd 100644 --- a/interface/choice.h +++ b/interface/choice.h @@ -109,7 +109,7 @@ public: @remarks This is implemented for Motif only and always returns 1 for the other platforms. */ - int GetColumns(); + int GetColumns() const; /** Unlike wxControlWithItems::GetSelection which only @@ -122,7 +122,7 @@ public: wxControlWithItems::GetSelection itself behaved like this). */ - int GetCurrentSelection(); + int GetCurrentSelection() const; /** Sets the number of columns in this choice item. diff --git a/interface/clipbrd.h b/interface/clipbrd.h index 5ba025568d..17598cf70b 100644 --- a/interface/clipbrd.h +++ b/interface/clipbrd.h @@ -111,7 +111,7 @@ public: /** Returns @true if the clipboard has been opened. */ - bool IsOpened(); + bool IsOpened() const; /** Returns @true if there is data which matches the data format of the given data @@ -124,7 +124,7 @@ public: one. See @ref useprimary() UsePrimarySelection for more information. */ - bool IsUsingPrimarySelection(); + bool IsUsingPrimarySelection() const; /** Call this function to open the clipboard before calling SetData() diff --git a/interface/clntdata.h b/interface/clntdata.h index bc015c9964..163cc6d718 100644 --- a/interface/clntdata.h +++ b/interface/clntdata.h @@ -43,12 +43,12 @@ public: /** Get the untyped client data. */ - void* GetClientData(); + void* GetClientData() const; /** Get a pointer to the client data object. */ - wxClientData* GetClientObject(); + wxClientData* GetClientObject() const; /** Set the untyped client data. @@ -133,7 +133,7 @@ public: /** Get string client data. */ - const wxString GetData(); + const wxString GetData() const; /** Set string client data. diff --git a/interface/clrpicker.h b/interface/clrpicker.h index 1aa9f3b80d..ba82dfa0cd 100644 --- a/interface/clrpicker.h +++ b/interface/clrpicker.h @@ -85,7 +85,7 @@ public: /** Returns the currently selected colour. */ - wxColour GetColour(); + wxColour GetColour() const; //@{ /** @@ -122,7 +122,7 @@ public: /** Retrieve the colour the user has just selected. */ - wxColour GetColour(); + wxColour GetColour() const; /** Set the colour associated with the event. diff --git a/interface/cmdline.h b/interface/cmdline.h index 73754835d8..e9b5318693 100644 --- a/interface/cmdline.h +++ b/interface/cmdline.h @@ -196,22 +196,22 @@ public: Returns @true if an option taking a date value was found and stores the value in the provided pointer (which should not be @NULL). */ - bool Found(const wxString& name); - bool Found(const wxString& name, wxString* value); - bool Found(const wxString& name, long* value); - bool Found(const wxString& name, wxDateTime* value); + bool Found(const wxString& name) const; + const bool Found(const wxString& name, wxString* value) const; + const bool Found(const wxString& name, long* value) const; + const bool Found(const wxString& name, wxDateTime* value) const; //@} /** Returns the value of Nth parameter (as string only). */ - wxString GetParam(size_t n = 0u); + wxString GetParam(size_t n = 0u) const; /** Returns the number of parameters found. This function makes sense mostly if you had used @c wxCMD_LINE_PARAM_MULTIPLE flag. */ - size_t GetParamCount(); + size_t GetParamCount() const; /** After calling Parse() (and if it returned 0), diff --git a/interface/cmdproc.h b/interface/cmdproc.h index 89cd956dfd..e6fca428a8 100644 --- a/interface/cmdproc.h +++ b/interface/cmdproc.h @@ -126,37 +126,37 @@ public: /** Returns the list of commands. */ - wxList GetCommands(); + wxList GetCommands() const; /** Returns the edit menu associated with the command processor. */ - wxMenu* GetEditMenu(); + wxMenu* GetEditMenu() const; /** Returns the maximum number of commands that the command processor stores. */ - int GetMaxCommands(); + int GetMaxCommands() const; /** Returns the string that will be appended to the Redo menu item. */ - const wxString GetRedoAccelerator(); + const wxString GetRedoAccelerator() const; /** Returns the string that will be shown for the redo menu item. */ - wxString GetRedoMenuLabel(); + wxString GetRedoMenuLabel() const; /** Returns the string that will be appended to the Undo menu item. */ - const wxString GetUndoAccelerator(); + const wxString GetUndoAccelerator() const; /** Returns the string that will be shown for the undo menu item. */ - wxString GetUndoMenuLabel(); + wxString GetUndoMenuLabel() const; /** Initializes the command processor, setting the current command to the diff --git a/interface/cmndata.h b/interface/cmndata.h index e50d18864a..2317ab42ce 100644 --- a/interface/cmndata.h +++ b/interface/cmndata.h @@ -183,74 +183,74 @@ public: as orientation) instead of showing a dialog. Windows only. */ - bool GetDefaultInfo(); + bool GetDefaultInfo() const; /** Returns @true if the page setup dialog will take its minimum margin values from the currently selected printer properties. Windows only. */ - bool GetDefaultMinMargins(); + bool GetDefaultMinMargins() const; /** Returns @true if the printer setup button is enabled. */ - bool GetEnableHelp(); + bool GetEnableHelp() const; /** Returns @true if the margin controls are enabled (Windows only). */ - bool GetEnableMargins(); + bool GetEnableMargins() const; /** Returns @true if the orientation control is enabled (Windows only). */ - bool GetEnableOrientation(); + bool GetEnableOrientation() const; /** Returns @true if the paper size control is enabled (Windows only). */ - bool GetEnablePaper(); + bool GetEnablePaper() const; /** Returns @true if the printer setup button is enabled. */ - bool GetEnablePrinter(); + bool GetEnablePrinter() const; /** Returns the right (x) and bottom (y) margins in millimetres. */ - wxPoint GetMarginBottomRight(); + wxPoint GetMarginBottomRight() const; /** Returns the left (x) and top (y) margins in millimetres. */ - wxPoint GetMarginTopLeft(); + wxPoint GetMarginTopLeft() const; /** Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are in millimetres */ - wxPoint GetMinMarginBottomRight(); + wxPoint GetMinMarginBottomRight() const; /** Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units are in millimetres */ - wxPoint GetMinMarginTopLeft(); + wxPoint GetMinMarginTopLeft() const; /** Returns the paper id (stored in the internal wxPrintData object). For further information, see wxPrintData::SetPaperId. */ - wxPaperSize GetPaperId(); + wxPaperSize GetPaperId() const; /** Returns the paper size in millimetres. */ - wxSize GetPaperSize(); + wxSize GetPaperSize() const; /** Returns a reference to the @ref overview_wxprintdata "print data" associated @@ -263,7 +263,7 @@ public: This can return @false on Windows if the current printer is not set, for example. On all other platforms, it returns @true. */ - bool IsOk(); + bool IsOk() const; /** Pass @true if the dialog will simply return default printer information (such as @@ -369,20 +369,20 @@ public: Has no meaning under other platforms. The default value is @true. */ - bool GetChooseFull(); + bool GetChooseFull() const; /** Gets the current colour associated with the colour dialog. The default colour is black. */ - wxColour GetColour(); + wxColour GetColour() const; /** Gets the @e ith custom colour associated with the colour dialog. @a i should be an integer between 0 and 15. The default custom colours are invalid colours. */ - wxColour GetCustomColour(int i); + wxColour GetCustomColour(int i) const; /** Under Windows, tells the Windows colour dialog to display the full dialog @@ -449,45 +449,45 @@ public: the bin (@c wxPRINTBIN_DEFAULT is returned). See SetBin() for the full list of bin values. */ - wxPrintBin GetBin(); + wxPrintBin GetBin() const; /** Returns @true if collation is on. */ - bool GetCollate(); + bool GetCollate() const; /** Returns @true if colour printing is on. */ - bool GetColour(); + bool GetColour() const; /** Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL. */ - wxDuplexMode GetDuplex(); + wxDuplexMode GetDuplex() const; /** Returns the number of copies requested by the user. */ - int GetNoCopies(); + int GetNoCopies() const; /** Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. */ - int GetOrientation(); + int GetOrientation() const; /** Returns the paper size id. For more information, see SetPaperId(). */ - wxPaperSize GetPaperId(); + wxPaperSize GetPaperId() const; /** Returns the printer name. If the printer name is the empty string, it indicates that the default printer should be used. */ - const wxString GetPrinterName(); + const wxString GetPrinterName() const; /** Returns the current print quality. This can be a positive integer, denoting the @@ -498,14 +498,14 @@ public: back a positive integer indicating the current resolution setting. */ - wxPrintQuality GetQuality(); + wxPrintQuality GetQuality() const; /** Returns @true if the print data is valid for using in print dialogs. This can return @false on Windows if the current printer is not set, for example. On all other platforms, it returns @true. */ - bool IsOk(); + bool IsOk() const; /** Sets the current bin. Possible values are: @@ -630,32 +630,32 @@ public: /** Returns @true if the user requested that all pages be printed. */ - bool GetAllPages(); + bool GetAllPages() const; /** Returns @true if the user requested that the document(s) be collated. */ - bool GetCollate(); + bool GetCollate() const; /** Returns the @e from page number, as entered by the user. */ - int GetFromPage(); + int GetFromPage() const; /** Returns the @e maximum page number. */ - int GetMaxPage(); + int GetMaxPage() const; /** Returns the @e minimum page number. */ - int GetMinPage(); + int GetMinPage() const; /** Returns the number of copies requested by the user. */ - int GetNoCopies(); + int GetNoCopies() const; /** Returns a reference to the internal wxPrintData object. @@ -665,26 +665,26 @@ public: /** Returns @true if the user has selected printing to a file. */ - bool GetPrintToFile(); + bool GetPrintToFile() const; /** Returns @true if the user requested that the selection be printed (where 'selection' is a concept specific to the application). */ - bool GetSelection(); + bool GetSelection() const; /** Returns the @e to page number, as entered by the user. */ - int GetToPage(); + int GetToPage() const; /** Returns @true if the print data is valid for using in print dialogs. This can return @false on Windows if the current printer is not set, for example. On all other platforms, it returns @true. */ - bool IsOk(); + bool IsOk() const; /** Sets the 'Collate' checkbox to @true or @false. diff --git a/interface/collpane.h b/interface/collpane.h index fba09358f5..1be941d5b8 100644 --- a/interface/collpane.h +++ b/interface/collpane.h @@ -31,7 +31,7 @@ public: /** Returns @true if the pane has been collapsed. */ - bool GetCollapsed(); + bool GetCollapsed() const; /** Sets this as a collapsed pane event (if @a collapsed is @true) or as an @@ -158,15 +158,15 @@ public: Returns a pointer to the pane window. Add controls to the returned wxWindow to make them collapsible. */ - wxWindow* GetPane(); + wxWindow* GetPane() const; /** Returns @true if the pane window is currently hidden. */ - bool IsCollapsed(); + bool IsCollapsed() const; /** Returns @true if the pane window is currently shown. */ - bool IsExpanded(); + bool IsExpanded() const; }; diff --git a/interface/colour.h b/interface/colour.h index 9d29536bd0..b9d4ff34d8 100644 --- a/interface/colour.h +++ b/interface/colour.h @@ -79,12 +79,12 @@ public: Returns the alpha value, on platforms where alpha is not yet supported, this always returns wxALPHA_OPAQUE. */ - unsigned char Alpha(); + unsigned char Alpha() const; /** Returns the blue intensity. */ - unsigned char Blue(); + unsigned char Blue() const; //@{ /** @@ -93,7 +93,8 @@ public: This function is new since wxWidgets version 2.7.0 */ wxString GetAsString(long flags); - wxC2S_NAME wxC2S_CSS_SYNTAX, to obtain + const wxC2S_NAME, to obtain the colour name (e.g. + wxColour(255,0,0) - "red"), wxC2S_CSS_SYNTAX, to obtain the colour in the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax (e.g. wxColour(255,0,0,85) - "rgba(255,0,0,0.333)"), and wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed @@ -109,23 +110,23 @@ public: On X, an allocated pixel value is returned. -1 is returned if the pixel is invalid (on X, unallocated). */ - long GetPixel(); + long GetPixel() const; /** Returns the green intensity. */ - unsigned char Green(); + unsigned char Green() const; /** Returns @true if the colour object is valid (the colour has been initialised with RGB values). */ - bool IsOk(); + bool IsOk() const; /** Returns the red intensity. */ - unsigned char Red(); + unsigned char Red() const; //@{ /** diff --git a/interface/combo.h b/interface/combo.h index a5538d654b..e007048c24 100644 --- a/interface/combo.h +++ b/interface/combo.h @@ -71,7 +71,7 @@ public: The derived class must implement this to return string representation of the value. */ - wxString GetStringValue(); + wxString GetStringValue() const; /** The derived class must implement this to initialize @@ -85,7 +85,7 @@ public: Utility method that returns @true if Create has been called. Useful in conjunction with LazyCreate(). */ - bool IsCreated(); + bool IsCreated() const; /** The derived class may implement this to return @@ -300,7 +300,7 @@ public: @returns A reference to the disabled state bitmap. */ - const wxBitmap GetBitmapDisabled(); + const wxBitmap GetBitmapDisabled() const; /** Returns button mouse hover bitmap that has been set with @@ -308,7 +308,7 @@ public: @returns A reference to the mouse hover state bitmap. */ - const wxBitmap GetBitmapHover(); + const wxBitmap GetBitmapHover() const; /** Returns default button bitmap that has been set with @@ -316,7 +316,7 @@ public: @returns A reference to the normal state bitmap. */ - const wxBitmap GetBitmapNormal(); + const wxBitmap GetBitmapNormal() const; /** Returns depressed button bitmap that has been set with @@ -324,7 +324,7 @@ public: @returns A reference to the depressed state bitmap. */ - const wxBitmap GetBitmapPressed(); + const wxBitmap GetBitmapPressed() const; /** Returns current size of the dropdown button. @@ -336,7 +336,7 @@ public: @see SetCustomPaintWidth(). */ - int GetCustomPaintWidth(); + int GetCustomPaintWidth() const; /** Returns features supported by wxComboCtrl. If needed feature is missing, @@ -352,12 +352,12 @@ public: @b Note: Under wxMSW, this function always returns 0 if the combo control doesn't have the focus. */ - long GetInsertionPoint(); + long GetInsertionPoint() const; /** Returns the last position in the combo control text field. */ - long GetLastPosition(); + long GetLastPosition() const; /** Returns current popup interface that has been set with SetPopupControl. @@ -367,29 +367,29 @@ public: /** Returns popup window containing the popup control. */ - wxWindow* GetPopupWindow(); + wxWindow* GetPopupWindow() const; /** Get the text control which is part of the combo control. */ - wxTextCtrl* GetTextCtrl(); + wxTextCtrl* GetTextCtrl() const; /** Returns actual indentation in pixels. */ - wxCoord GetTextIndent(); + wxCoord GetTextIndent() const; /** Returns area covered by the text field (includes everything except borders and the dropdown button). */ - const wxRect GetTextRect(); + const wxRect GetTextRect() const; /** Returns text representation of the current value. For writable combo control it always returns the value in the text field. */ - wxString GetValue(); + wxString GetValue() const; /** Dismisses the popup window. @@ -399,7 +399,7 @@ public: /** Returns @true if the popup is currently shown */ - bool IsPopupShown(); + bool IsPopupShown() const; /** Returns @true if the popup window is in the given state. @@ -418,7 +418,7 @@ public: Popup window is fully visible. */ - bool IsPopupWindowState(int state); + bool IsPopupWindowState(int state) const; /** Implement in a derived class to define what happens on diff --git a/interface/combobox.h b/interface/combobox.h index b47bb712dc..a3d2dc584a 100644 --- a/interface/combobox.h +++ b/interface/combobox.h @@ -123,33 +123,33 @@ public: to the clipboard. Only available on Windows. */ - bool CanCopy(); + bool CanCopy() const; /** Returns @true if the combobox is editable and there is a text selection to copy to the clipboard. Only available on Windows. */ - bool CanCut(); + bool CanCut() const; /** Returns @true if the combobox is editable and there is text on the clipboard that can be pasted into the text field. Only available on Windows. */ - bool CanPaste(); + bool CanPaste() const; /** Returns @true if the combobox is editable and the last undo can be redone. Only available on Windows. */ - bool CanRedo(); + bool CanRedo() const; /** Returns @true if the combobox is editable and the last edit can be undone. Only available on Windows. */ - bool CanUndo(); + bool CanUndo() const; /** Copies the selected text to the clipboard. @@ -191,19 +191,19 @@ public: returns the item currently selected in the dropdown list if it's open or the same thing as wxControlWithItems::GetSelection otherwise. */ - int GetCurrentSelection(); + int GetCurrentSelection() const; /** Returns the insertion point for the combobox's text field. @b Note: Under wxMSW, this function always returns 0 if the combobox doesn't have the focus. */ - long GetInsertionPoint(); + long GetInsertionPoint() const; /** Returns the last position in the combobox text field. */ - virtual wxTextPos GetLastPosition(); + virtual wxTextPos GetLastPosition() const; /** This is the same as wxTextCtrl::GetSelection @@ -211,12 +211,12 @@ public: different method from wxControlWithItems::GetSelection. Currently this method is only implemented in wxMSW and wxGTK. */ - void GetSelection(long* from, long* to); + void GetSelection(long* from, long* to) const; /** Returns the current value in the combobox text field. */ - wxString GetValue(); + wxString GetValue() const; /** Pastes text from the clipboard to the text field. diff --git a/interface/config.h b/interface/config.h index 0f9bf1a69d..6fe45f090b 100644 --- a/interface/config.h +++ b/interface/config.h @@ -201,7 +201,7 @@ public: /** returns @true if either a group or an entry with a given name exists */ - bool Exists(wxString& strName); + bool Exists(wxString& strName) const; /** permanently writes all changes (otherwise, they're only written from object's @@ -219,7 +219,7 @@ public: /** Returns the application name. */ - wxString GetAppName(); + wxString GetAppName() const; /** Returns the type of the given entry or @e Unknown if the entry doesn't @@ -229,68 +229,68 @@ public: key with wxRegConfig will fail. The result is an element of enum EntryType: */ - enum wxConfigBase::EntryType GetEntryType(const wxString& name); + enum wxConfigBase::EntryType GetEntryType(const wxString& name) const; /** Gets the first entry. */ - bool GetFirstEntry(wxString& str, long& index); + bool GetFirstEntry(wxString& str, long& index) const; /** Gets the first group. */ - bool GetFirstGroup(wxString& str, long& index); + bool GetFirstGroup(wxString& str, long& index) const; /** Gets the next entry. */ - bool GetNextEntry(wxString& str, long& index); + bool GetNextEntry(wxString& str, long& index) const; /** Gets the next group. */ - bool GetNextGroup(wxString& str, long& index); + bool GetNextGroup(wxString& str, long& index) const; /** */ - uint GetNumberOfEntries(bool bRecursive = false); + uint GetNumberOfEntries(bool bRecursive = false) const; /** Get number of entries/subgroups in the current group, with or without its subgroups. */ - uint GetNumberOfGroups(bool bRecursive = false); + uint GetNumberOfGroups(bool bRecursive = false) const; /** Retrieve the current path (always as absolute path). */ - const wxString GetPath(); + const wxString GetPath() const; /** Returns the vendor name. */ - wxString GetVendorName(); + wxString GetVendorName() const; /** returns @true if the entry by this name exists */ - bool HasEntry(wxString& strName); + bool HasEntry(wxString& strName) const; /** returns @true if the group by this name exists */ - bool HasGroup(const wxString& strName); + bool HasGroup(const wxString& strName) const; /** Returns @true if we are expanding environment variables in key values. */ - bool IsExpandingEnvVars(); + bool IsExpandingEnvVars() const; /** Returns @true if we are writing defaults back to the config file. */ - bool IsRecordingDefaults(); + bool IsRecordingDefaults() const; /** These function are the core of wxConfigBase class: they allow you to read and @@ -399,48 +399,51 @@ public: Returns a boolean */ - bool Read(const wxString& key, wxString* str); - bool Read(const wxString& key, wxString* str, - const wxString& defaultVal); - wxString Read(const wxString& key, - const - wxString& defaultVal); - bool Read(const wxString& key, long* l); - bool Read(const wxString& key, long* l, long defaultVal); - bool Read(const wxString& key, double* d); - bool Read(const wxString& key, double* d, double defaultVal); - bool Read(const wxString& key, bool* b); - bool Read(const wxString& key, bool* d, bool defaultVal); - bool Read(const wxString& key, wxMemoryBuffer* buf); - bool Read(const wxString& key, T* value); - bool Read(const wxString& key, T* value, - T const& defaultVal); + bool Read(const wxString& key, wxString* str) const; + const bool Read(const wxString& key, wxString* str, + const wxString& defaultVal) const; + const wxString Read(const wxString& key, + const + wxString& defaultVal) const; + const bool Read(const wxString& key, long* l) const; + const bool Read(const wxString& key, long* l, + long defaultVal) const; + const bool Read(const wxString& key, double* d) const; + const bool Read(const wxString& key, double* d, + double defaultVal) const; + const bool Read(const wxString& key, bool* b) const; + const bool Read(const wxString& key, bool* d, + bool defaultVal) const; + const bool Read(const wxString& key, wxMemoryBuffer* buf) const; + const bool Read(const wxString& key, T* value) const; + const bool Read(const wxString& key, T* value, + T const& defaultVal) const; //@} /** Reads a bool value from the key and returns it. @a defaultVal is returned if the key is not found. */ - long ReadBool(const wxString& key, bool defaultVal); + long ReadBool(const wxString& key, bool defaultVal) const; /** Reads a double value from the key and returns it. @a defaultVal is returned if the key is not found. */ - long ReadDouble(const wxString& key, double defaultVal); + long ReadDouble(const wxString& key, double defaultVal) const; /** Reads a long value from the key and returns it. @a defaultVal is returned if the key is not found. */ - long ReadLong(const wxString& key, long defaultVal); + long ReadLong(const wxString& key, long defaultVal) const; /** Reads a value of type T, for which function wxFromString is defined, from the key and returns it. @a defaultVal is returned if the key is not found. */ - T ReadObject(const wxString& key, T const& defaultVal); + T ReadObject(const wxString& key, T const& defaultVal) const; /** The functions in this section allow to rename entries or subgroups of the diff --git a/interface/control.h b/interface/control.h index 16796de2a3..862d4795fc 100644 --- a/interface/control.h +++ b/interface/control.h @@ -37,7 +37,7 @@ public: any, use GetLabelText() if they are undesired. */ - wxString GetLabel(); + wxString GetLabel() const; //@{ /** @@ -45,7 +45,7 @@ public: version, without the mnemonics characters. */ const wxString GetLabelText(); - static wxString GetLabelText(const wxString& label); + const static wxString GetLabelText(const wxString& label); //@} /** diff --git a/interface/cshelp.h b/interface/cshelp.h index 054e8e3626..821fe2bd0a 100644 --- a/interface/cshelp.h +++ b/interface/cshelp.h @@ -135,7 +135,7 @@ public: /** Returns the help controller associated with this help provider. */ - wxHelpControllerBase* GetHelpController(); + wxHelpControllerBase* GetHelpController() const; /** Sets the help controller associated with this help provider. diff --git a/interface/ctrlsub.h b/interface/ctrlsub.h index 3fcd78d351..06915e5165 100644 --- a/interface/ctrlsub.h +++ b/interface/ctrlsub.h @@ -120,7 +120,7 @@ public: @returns A pointer to the client data, or @NULL if not present. */ - void* GetClientData(unsigned int n); + void* GetClientData(unsigned int n) const; /** Returns a pointer to the client data associated with the given item (if any). @@ -133,14 +133,14 @@ public: @returns A pointer to the client data, or @NULL if not present. */ - wxClientData* GetClientObject(unsigned int n); + wxClientData* GetClientObject(unsigned int n) const; /** Returns the number of items in the control. @see IsEmpty() */ - unsigned int GetCount(); + unsigned int GetCount() const; /** Returns the index of the selected item or @c wxNOT_FOUND if no item is @@ -154,7 +154,7 @@ public: @see SetSelection(), GetStringSelection() */ - int GetSelection(); + int GetSelection() const; /** Returns the label of the item with the given index. @@ -165,7 +165,7 @@ public: @returns The label of the item or an empty string if the position was invalid. */ - wxString GetString(unsigned int n); + wxString GetString(unsigned int n) const; /** Returns the label of the selected item or an empty string if no item is @@ -173,12 +173,12 @@ public: @see GetSelection() */ - wxString GetStringSelection(); + wxString GetStringSelection() const; /** Returns the array of the labels of all items in the control. */ - wxArrayString GetStrings(); + wxArrayString GetStrings() const; //@{ /** @@ -225,7 +225,7 @@ public: @see GetCount() */ - bool IsEmpty(); + bool IsEmpty() const; /** This is the same as SetSelection() and diff --git a/interface/cursor.h b/interface/cursor.h index 6395cecb98..a0f93b1514 100644 --- a/interface/cursor.h +++ b/interface/cursor.h @@ -460,7 +460,7 @@ public: /** Returns @true if cursor data is present. */ - bool IsOk(); + bool IsOk() const; /** Assignment operator, using @ref overview_trefcount "reference counting". diff --git a/interface/dataobj.h b/interface/dataobj.h index 2256b1f124..9d95f7eb42 100644 --- a/interface/dataobj.h +++ b/interface/dataobj.h @@ -69,12 +69,12 @@ public: /** Returns a pointer to the data. */ - virtual void* GetData(); + virtual void* GetData() const; /** Returns the data size in bytes. */ - virtual size_t GetSize(); + virtual size_t GetSize() const; /** Set the data. The data object will make an internal copy. @@ -135,7 +135,7 @@ public: the clipboard or the DnD operation. You can use this method to find out what kind of data object was recieved. */ - wxDataFormat GetReceivedFormat(); + wxDataFormat GetReceivedFormat() const; }; @@ -179,19 +179,19 @@ public: Copy the data to the buffer, return @true on success. Must be implemented in the derived class if the object supports rendering its data. */ - virtual bool GetDataHere(void buf); + virtual bool GetDataHere(void buf) const; /** Gets the size of our data. Must be implemented in the derived class if the object supports rendering its data. */ - virtual size_t GetDataSize(); + virtual size_t GetDataSize() const; /** Returns the (one and only one) format supported by this object. It is supposed that the format is supported in both directions. */ - const wxDataFormat GetFormat(); + const wxDataFormat GetFormat() const; /** Copy the data from the buffer, return @true on success. Must be implemented in @@ -246,7 +246,7 @@ public: wxWidgets' internals. Use this method to get data in bitmap form from the wxClipboard. */ - virtual wxBitmap GetBitmap(); + virtual wxBitmap GetBitmap() const; /** Sets the bitmap associated with the data object. This method is called when the @@ -348,12 +348,12 @@ public: Returns the name of a custom format (this function will fail for a standard format). */ - wxString GetId(); + wxString GetId() const; /** Returns the platform-specific number identifying the format. */ - NativeFormat GetType(); + NativeFormat GetType() const; /** Sets the format to be the custom format identified by the given name. @@ -368,12 +368,12 @@ public: /** Returns @true if the formats are different. */ - bool operator !=(const wxDataFormat& format); + bool operator !=(const wxDataFormat& format) const; /** Returns @true if the formats are equal. */ - bool operator ==(const wxDataFormat& format); + bool operator ==(const wxDataFormat& format) const; }; @@ -407,7 +407,7 @@ public: /** Returns the URL stored by this object, as a string. */ - wxString GetURL(); + wxString GetURL() const; /** Sets the URL stored by this object. @@ -562,30 +562,30 @@ public: @e formats. There is enough space for GetFormatCount(dir) formats in it. */ virtual void GetAllFormats(wxDataFormat* formats, - Direction dir = Get); + Direction dir = Get) const; /** The method will write the data of the format @a format in the buffer @a buf and return @true on success, @false on failure. */ - virtual bool GetDataHere(const wxDataFormat& format, void buf); + virtual bool GetDataHere(const wxDataFormat& format, void buf) const; /** Returns the data size of the given format @e format. */ - virtual size_t GetDataSize(const wxDataFormat& format); + virtual size_t GetDataSize(const wxDataFormat& format) const; /** Returns the number of available formats for rendering or setting the data. */ - virtual size_t GetFormatCount(Direction dir = Get); + virtual size_t GetFormatCount(Direction dir = Get) const; /** Returns the preferred format for either rendering the data (if @a dir is @c Get, its default value) or for setting it. Usually this will be the native format of the wxDataObject. */ - virtual wxDataFormat GetPreferredFormat(Direction dir = Get); + virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const; /** Set the data in the format @a format of the length @a len provided in the @@ -643,7 +643,7 @@ public: wxWidgets' internals. Use this method to get data in text form from the wxClipboard. */ - virtual wxString GetText(); + virtual wxString GetText() const; /** Returns the data size. By default, returns the size of the text data @@ -652,7 +652,7 @@ public: to return the text length plus 1 for a trailing zero, but this is not strictly required. */ - virtual size_t GetTextLength(); + virtual size_t GetTextLength() const; /** Sets the text associated with the data object. This method is called @@ -704,5 +704,5 @@ public: /** Returns the array of file names. */ - const wxArrayString GetFilenames(); + const wxArrayString GetFilenames() const; }; diff --git a/interface/dataview.h b/interface/dataview.h index cdc7491ef4..1dbf777cf1 100644 --- a/interface/dataview.h +++ b/interface/dataview.h @@ -33,12 +33,12 @@ public: /** Gets the icon. */ - const wxIcon GetIcon(); + const wxIcon GetIcon() const; /** Gets the text. */ - wxString GetText(); + wxString GetText() const; /** Set the icon. @@ -76,13 +76,13 @@ public: /** Used to clone the event. */ - wxEvent* Clone(); + wxEvent* Clone() const; /** Returns the position of the column in the control or -1 if no column field was set by the event emitter. */ - int GetColumn(); + int GetColumn() const; /** Returns a pointer to the wxDataViewColumn from which @@ -93,17 +93,17 @@ public: /** Returns the wxDataViewModel associated with the event. */ - wxDataViewModel* GetModel(); + wxDataViewModel* GetModel() const; /** Returns a the position of a context menu event in screen coordinates. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; /** Returns a reference to a value. */ - const wxVariant GetValue(); + const wxVariant GetValue() const; /** @@ -206,18 +206,18 @@ public: /** Returns the wxDataViewItem at the given @e row. */ - wxDataViewItem GetItem(unsigned int row); + wxDataViewItem GetItem(unsigned int row) const; /** Returns the position of given @e item. */ - unsigned int GetRow(const wxDataViewItem& item); + unsigned int GetRow(const wxDataViewItem& item) const; /** Override this to allow getting values from the model. */ void GetValue(wxVariant& variant, unsigned int row, - unsigned int col); + unsigned int col) const; /** Call this after if the data has to be read again from @@ -407,26 +407,26 @@ public: an item. Returns the number of items. */ virtual unsigned int GetChildren(const wxDataViewItem& item, - wxDataViewItemArray& children); + wxDataViewItemArray& children) const; /** Override this to indicate the number of columns in the model. */ - virtual unsigned int GetColumnCount(); + virtual unsigned int GetColumnCount() const; /** Override this to indicate what type of data is stored in the column specified by @e col. This should return a string indicating the type of data as reported by wxVariant. */ - virtual wxString GetColumnType(unsigned int col); + virtual wxString GetColumnType(unsigned int col) const; /** Override this to indicate which wxDataViewItem representing the parent of @a item or an invalid wxDataViewItem if the the root item is the parent item. */ - virtual wxDataViewItem GetParent(const wxDataViewItem& item); + virtual wxDataViewItem GetParent(const wxDataViewItem& item) const; /** Override this to indicate the value of @e item @@ -434,7 +434,7 @@ public: */ virtual void GetValue(wxVariant& variant, const wxDataViewItem& item, - unsigned int col); + unsigned int col) const; /** Override this method to indicate if a container item merely @@ -442,7 +442,7 @@ public: acts a normal item with entries for futher columns. By default returns @e @false. */ - virtual bool HasContainerColumns(const wxDataViewItem& item); + virtual bool HasContainerColumns(const wxDataViewItem& item) const; /** Override this to indicate that the model provides a default compare @@ -453,13 +453,13 @@ public: should be used. See also wxDataViewIndexListModel for a model which makes use of this. */ - virtual bool HasDefaultCompare(); + virtual bool HasDefaultCompare() const; /** Override this to indicate of @a item is a container, i.e. if it can have child items. */ - virtual bool IsContainer(const wxDataViewItem& item); + virtual bool IsContainer(const wxDataViewItem& item) const; /** Call this to inform the model that an item has been added @@ -754,12 +754,12 @@ public: /** Returns the ID. */ - void* GetID(); + void* GetID() const; /** Returns @true if the ID is not @e @NULL. */ - bool IsOk(); + bool IsOk() const; }; @@ -1011,67 +1011,67 @@ public: position in the control which may change after reordering columns by the user. */ - virtual wxDataViewColumn* GetColumn(unsigned int pos); + virtual wxDataViewColumn* GetColumn(unsigned int pos) const; /** Returns the number of columns. */ - virtual unsigned int GetColumnCount(); + virtual unsigned int GetColumnCount() const; /** Returns the position of the column or -1 if not found in the control. */ - virtual int GetColumnPosition(const wxDataViewColumn* column); + virtual int GetColumnPosition(const wxDataViewColumn* column) const; /** Returns column containing the expanders. */ - wxDataViewColumn* GetExpanderColumn(); + wxDataViewColumn* GetExpanderColumn() const; /** Returns indentation. */ - int GetIndent(); + int GetIndent() const; /** Returns item rect. */ wxRect GetItemRect(const wxDataViewItem& item, - const wxDataViewColumn* col = NULL); + const wxDataViewColumn* col = NULL) const; /** Returns pointer to the data model associated with the control (if any). */ - virtual wxDataViewModel* GetModel(); + virtual wxDataViewModel* GetModel() const; /** Returns first selected item or an invalid item if none is selected. */ - wxDataViewItem GetSelection(); + wxDataViewItem GetSelection() const; /** Fills @a sel with currently selected items and returns their number. */ - int GetSelections(wxDataViewItemArray& sel); + int GetSelections(wxDataViewItemArray& sel) const; /** Returns the wxDataViewColumn currently responsible for sorting or @NULL if none has been selected. */ - virtual wxDataViewColumn* GetSortingColumn(); + virtual wxDataViewColumn* GetSortingColumn() const; /** Hittest. */ void HitTest(const wxPoint& point, wxDataViewItem& item, - wxDataViewColumn*& col); + wxDataViewColumn*& col) const; /** Return @true if the item is selected. */ - bool IsSelected(const wxDataViewItem& item); + bool IsSelected(const wxDataViewItem& item) const; /** Select the given item. @@ -1481,7 +1481,7 @@ public: /** Calls the identical method from wxDataViewTreeStore. */ - int GetChildCount(const wxDataViewItem& parent); + int GetChildCount(const wxDataViewItem& parent) const; /** Returns the image list. @@ -1491,35 +1491,35 @@ public: /** Calls the identical method from wxDataViewTreeStore. */ - wxClientData* GetItemData(const wxDataViewItem& item); + wxClientData* GetItemData(const wxDataViewItem& item) const; /** Calls the identical method from wxDataViewTreeStore. */ - const wxIcon GetItemExpandedIcon(const wxDataViewItem& item); + const wxIcon GetItemExpandedIcon(const wxDataViewItem& item) const; /** Calls the identical method from wxDataViewTreeStore. */ - const wxIcon GetItemIcon(const wxDataViewItem& item); + const wxIcon GetItemIcon(const wxDataViewItem& item) const; /** Calls the identical method from wxDataViewTreeStore. */ - wxString GetItemText(const wxDataViewItem& item); + wxString GetItemText(const wxDataViewItem& item) const; /** Calls the identical method from wxDataViewTreeStore. */ wxDataViewItem GetNthChild(const wxDataViewItem& parent, - unsigned int pos); + unsigned int pos) const; //@{ /** Returns the store. */ - wxDataViewTreeStore* GetStore(); - const wxDataViewTreeStore* GetStore(); + wxDataViewTreeStore* GetStore() const; + const wxDataViewTreeStore* GetStore() const; //@} /** @@ -1653,33 +1653,33 @@ public: /** Return the number of children of item. */ - int GetChildCount(const wxDataViewItem& parent); + int GetChildCount(const wxDataViewItem& parent) const; /** Returns the client data asoociated with the item. */ - wxClientData* GetItemData(const wxDataViewItem& item); + wxClientData* GetItemData(const wxDataViewItem& item) const; /** Returns the icon to display in expanded containers. */ - const wxIcon GetItemExpandedIcon(const wxDataViewItem& item); + const wxIcon GetItemExpandedIcon(const wxDataViewItem& item) const; /** Returns the icon of the item. */ - const wxIcon GetItemIcon(const wxDataViewItem& item); + const wxIcon GetItemIcon(const wxDataViewItem& item) const; /** Returns the text of the item. */ - wxString GetItemText(const wxDataViewItem& item); + wxString GetItemText(const wxDataViewItem& item) const; /** Returns the nth child item of item. */ wxDataViewItem GetNthChild(const wxDataViewItem& parent, - unsigned int pos); + unsigned int pos) const; /** Inserts a container after @e previous. diff --git a/interface/datectrl.h b/interface/datectrl.h index ecf23f98a4..a4fa0ded8f 100644 --- a/interface/datectrl.h +++ b/interface/datectrl.h @@ -119,13 +119,13 @@ public: @returns @false if no range limits are currently set, @true if at least one bound is set. */ - bool GetRange(wxDateTime* dt1, wxDateTime dt2); + bool GetRange(wxDateTime* dt1, wxDateTime dt2) const; /** Returns the currently selected. If there is no selection or the selection is outside of the current range, an invalid object is returned. */ - wxDateTime GetValue(); + wxDateTime GetValue() const; /** Please note that this function is only available in the generic version of this diff --git a/interface/dateevt.h b/interface/dateevt.h index ab9e50bb97..63aa15f63b 100644 --- a/interface/dateevt.h +++ b/interface/dateevt.h @@ -23,7 +23,7 @@ public: /** Returns the date. */ - const wxDateTime GetDate(); + const wxDateTime GetDate() const; /** Sets the date carried by the event, normally only used by the library diff --git a/interface/datetime.h b/interface/datetime.h index a41d180d8f..47cb2d0705 100644 --- a/interface/datetime.h +++ b/interface/datetime.h @@ -78,7 +78,7 @@ public: Adds the given date span to this object. */ wxDateTime Add(const wxDateSpan& diff); - wxDateTime Add(const wxDateSpan& diff); + const wxDateTime& Add(const wxDateSpan& diff); wxDateTime operator+=(const wxDateSpan& diff); //@} @@ -265,13 +265,13 @@ public: @see ParseFormat() */ wxString Format(const wxChar* format = wxDefaultDateTimeFormat, - const TimeZone& tz = Local); + const TimeZone& tz = Local) const; /** Identical to calling Format() with @c "%x" argument (which means 'preferred date representation for the current locale'). */ - wxString FormatDate(); + wxString FormatDate() const; /** Returns the combined date-time representation in the ISO 8601 format @@ -283,25 +283,25 @@ public: @see FormatISODate(), FormatISOTime(), ParseISOCombined() */ - wxString FormatISOCombined(char sep = 'T'); + wxString FormatISOCombined(char sep = 'T') const; /** This function returns the date representation in the ISO 8601 format (YYYY-MM-DD). */ - wxString FormatISODate(); + wxString FormatISODate() const; /** This function returns the time representation in the ISO 8601 format (HH:MM:SS). */ - wxString FormatISOTime(); + wxString FormatISOTime() const; /** Identical to calling Format() with @c "%X" argument (which means 'preferred time representation for the current locale'). */ - wxString FormatTime(); + wxString FormatTime() const; /** Transform the date from the given time zone to the local one. If @a noDST is @@ -309,7 +309,7 @@ public: Returns the date in the local time zone. */ wxDateTime FromTimezone(const TimeZone& tz, - bool noDST = false); + bool noDST = false) const; /** Returns the translations of the strings @c AM and @c PM used for time @@ -323,7 +323,7 @@ public: DOS format. */ - unsigned long GetAsDOS(); + unsigned long GetAsDOS() const; /** Get the beginning of DST for the given country in the given year (current one @@ -338,7 +338,7 @@ public: /** Returns the century of this date. */ - int GetCentury(const TimeZone& tz = Local); + int GetCentury(const TimeZone& tz = Local) const; /** Returns the current default country. The default country is used for DST @@ -365,18 +365,18 @@ public: @see ResetTime() */ - wxDateTime GetDateOnly(); + wxDateTime GetDateOnly() const; /** Returns the day in the given timezone (local one by default). */ - wxDateTime_t GetDay(const TimeZone& tz = Local); + wxDateTime_t GetDay(const TimeZone& tz = Local) const; /** Returns the day of the year (in 1...366 range) in the given timezone (local one by default). */ - wxDateTime_t GetDayOfYear(const TimeZone& tz = Local); + wxDateTime_t GetDayOfYear(const TimeZone& tz = Local) const; /** Returns the end of DST for the given country in the given year (current one by @@ -390,12 +390,12 @@ public: /** Returns the hour in the given timezone (local one by default). */ - wxDateTime_t GetHour(const TimeZone& tz = Local); + wxDateTime_t GetHour(const TimeZone& tz = Local) const; /** Synonym for GetJulianDayNumber(). */ - double GetJDN(); + double GetJDN() const; /** Returns the @ref setjdn() JDN corresponding to this date. Beware @@ -403,14 +403,14 @@ public: @see GetModifiedJulianDayNumber() */ - double GetJulianDayNumber(); + double GetJulianDayNumber() const; /** Returns the copy of this object to which SetToLastMonthDay() was applied. */ wxDateTime GetLastMonthDay(Month month = Inv_Month, - int year = Inv_Year); + int year = Inv_Year) const; /** Returns the copy of this object to which @@ -423,17 +423,17 @@ public: /** Synonym for GetModifiedJulianDayNumber(). */ - double GetMJD(); + double GetMJD() const; /** Returns the milliseconds in the given timezone (local one by default). */ - wxDateTime_t GetMillisecond(const TimeZone& tz = Local); + wxDateTime_t GetMillisecond(const TimeZone& tz = Local) const; /** Returns the minute in the given timezone (local one by default). */ - wxDateTime_t GetMinute(const TimeZone& tz = Local); + wxDateTime_t GetMinute(const TimeZone& tz = Local) const; /** Returns the @e Modified Julian Day Number (MJD) which is, by definition, @@ -441,12 +441,12 @@ public: MJDs correspond to midnights of the dates in the Gregorian calendar and not th noons like JDN. The MJD 0 is Nov 17, 1858. */ - double GetModifiedJulianDayNumber(); + double GetModifiedJulianDayNumber() const; /** Returns the month in the given timezone (local one by default). */ - Month GetMonth(const TimeZone& tz = Local); + Month GetMonth(const TimeZone& tz = Local) const; /** Gets the full (default) or abbreviated (specify @c Name_Abbr name of the @@ -461,7 +461,7 @@ public: Returns the copy of this object to which SetToNextWeekDay() was applied. */ - wxDateTime GetNextWeekDay(WeekDay weekday); + wxDateTime GetNextWeekDay(WeekDay weekday) const; //@{ /** @@ -480,7 +480,7 @@ public: Returns the copy of this object to which SetToPrevWeekDay() was applied. */ - wxDateTime GetPrevWeekDay(WeekDay weekday); + wxDateTime GetPrevWeekDay(WeekDay weekday) const; /** Return the @e Rata Die number of this date. @@ -488,18 +488,18 @@ public: relative to a base date of December 31 of the year 0. Thus January 1 of the year 1 is Rata Die day 1. */ - double GetRataDie(); + double GetRataDie() const; /** Returns the seconds in the given timezone (local one by default). */ - wxDateTime_t GetSecond(const TimeZone& tz = Local); + wxDateTime_t GetSecond(const TimeZone& tz = Local) const; /** Returns the number of seconds since Jan 1, 1970. An assert failure will occur if the date is not in the range covered by @c time_t type. */ - time_t GetTicks(); + time_t GetTicks() const; /** Returns the current time. @@ -509,7 +509,7 @@ public: /** Returns broken down representation of the date and time. */ - Tm GetTm(const TimeZone& tz = Local); + Tm GetTm(const TimeZone& tz = Local) const; /** Returns the current time broken down. Note that this function returns a @@ -527,7 +527,7 @@ public: */ wxDateTime GetWeekDay(WeekDay weekday, int n = 1, Month month = Inv_Month, - int year = Inv_Year); + int year = Inv_Year) const; /** Returns the copy of this object to which @@ -535,7 +535,7 @@ public: applied. */ wxDateTime GetWeekDayInSameWeek(WeekDay weekday, - WeekFlags flags = Monday_First); + WeekFlags flags = Monday_First) const; /** Gets the full (default) or abbreviated (specify @c Name_Abbr name of the @@ -553,7 +553,7 @@ public: @ref overview_wxdatetime "week start" conventions. */ wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First, - const TimeZone& tz = Local); + const TimeZone& tz = Local) const; /** Returns the number of the week of the year this date is in. The first week of @@ -568,18 +568,18 @@ public: applies to the weeks starting on Monday only. */ wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First, - const TimeZone& tz = Local); + const TimeZone& tz = Local) const; /** Returns the year in the given timezone (local one by default). */ - int GetYear(const TimeZone& tz = Local); + int GetYear(const TimeZone& tz = Local) const; /** Returns the copy of this object to which SetToYearDay() was applied. */ - wxDateTime GetYearDay(wxDateTime_t yday); + wxDateTime GetYearDay(wxDateTime_t yday) const; /** Returns @true if IsStrictlyBetween() @@ -587,12 +587,12 @@ public: @see IsStrictlyBetween() */ - bool IsBetween(const wxDateTime& t1, const wxDateTime& t2); + bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const; /** Returns @true if the DST is applied for this date in the given country. */ - int IsDST(Country country = Country_Default); + int IsDST(Country country = Country_Default) const; /** Returns @true if DST was used n the given year (the current one by @@ -604,31 +604,31 @@ public: /** Returns @true if this date precedes the given one. */ - bool IsEarlierThan(const wxDateTime& datetime); + bool IsEarlierThan(const wxDateTime& datetime) const; /** Returns @true if the two dates are strictly identical. */ - bool IsEqualTo(const wxDateTime& datetime); + bool IsEqualTo(const wxDateTime& datetime) const; /** Returns @true if the date is equal to another one up to the given time interval, i.e. if the absolute difference between the two dates is less than this interval. */ - bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts); + bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const; /** Returns @true if the given date is later than the date of adoption of the Gregorian calendar in the given country (and hence the Gregorian calendar calculations make sense for it). */ - bool IsGregorianDate(GregorianAdoption country = Gr_Standard); + bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const; /** Returns @true if this date is later than the given one. */ - bool IsLaterThan(const wxDateTime& datetime); + bool IsLaterThan(const wxDateTime& datetime) const; /** Returns @true if the @a year is a leap one in the specified calendar. @@ -640,12 +640,12 @@ public: /** Returns @true if the date is the same without comparing the time parts. */ - bool IsSameDate(const wxDateTime& dt); + bool IsSameDate(const wxDateTime& dt) const; /** Returns @true if the time is the same (although dates may differ). */ - bool IsSameTime(const wxDateTime& dt); + bool IsSameTime(const wxDateTime& dt) const; /** Returns @true if this date lies strictly between the two others, @@ -653,12 +653,12 @@ public: @see IsBetween() */ bool IsStrictlyBetween(const wxDateTime& t1, - const wxDateTime& t2); + const wxDateTime& t2) const; /** Returns @true if the object represents a valid time moment. */ - bool IsValid(); + bool IsValid() const; /** This function returns @true if the specified (or default) country is one @@ -670,7 +670,7 @@ public: /** Returns @true is this day is not a holiday in the given country. */ - bool IsWorkDay(Country country = Country_Default); + bool IsWorkDay(Country country = Country_Default) const; /** Same as FromTimezone() but modifies the object @@ -1091,7 +1091,7 @@ public: Subtracts another date from this one and returns the difference between them as wxTimeSpan. */ - wxTimeSpan Subtract(const wxDateTime& dt); + wxTimeSpan Subtract(const wxDateTime& dt) const; /** Please see the @ref overview_tdatetimezones "time zone overview" for more @@ -1121,13 +1121,13 @@ public: DST adjustments will be made. Returns the date in the new time zone. */ - wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false); + wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const; /** This is the same as calling ToTimezone() with the argument @c GMT0. */ - wxDateTime ToUTC(bool noDST = false); + wxDateTime ToUTC(bool noDST = false) const; /** Returns the object corresponding to the midnight of the current day (i.e. the @@ -1229,7 +1229,7 @@ public: second and third ones modify this object in place. */ wxDateSpan Add(const wxDateSpan& other); - wxDateSpan Add(const wxDateSpan& other); + const wxDateSpan& Add(const wxDateSpan& other); wxDateSpan operator+=(const wxDateSpan& other); //@} @@ -1253,12 +1253,12 @@ public: @see GetTotalDays() */ - int GetDays(); + int GetDays() const; /** Returns the number of the months (not counting the years) in this date span. */ - int GetMonths(); + int GetMonths() const; /** Returns the combined number of days in this date span, counting both weeks and @@ -1266,19 +1266,19 @@ public: @see GetWeeks(), GetDays() */ - int GetTotalDays(); + int GetTotalDays() const; /** Returns the number of weeks in this date span. @see GetTotalDays() */ - int GetWeeks(); + int GetWeeks() const; /** Returns the number of years in this date span. */ - int GetYears(); + int GetYears() const; /** Returns a date span object corresponding to one month. @@ -1302,7 +1302,7 @@ public: object in place. */ wxDateSpan Multiply(int factor); - wxDateSpan Multiply(int factor); + const wxDateSpan& Multiply(int factor); wxDateSpan operator*=(int factor); //@} @@ -1321,7 +1321,7 @@ public: @see Neg() */ - wxDateSpan Negate(); + wxDateSpan Negate() const; /** Sets the number of days (without modifying any other components) in this date @@ -1353,7 +1353,7 @@ public: object, the second and third ones modify this object in place. */ wxDateSpan Subtract(const wxDateSpan& other); - wxDateSpan Subtract(const wxDateSpan& other); + const wxDateSpan& Subtract(const wxDateSpan& other); wxDateSpan operator+=(const wxDateSpan& other); //@} @@ -1388,14 +1388,14 @@ public: /** Returns @true if this date span is different from the other one. */ - bool operator!=(wxDateSpan& other); + bool operator!=(wxDateSpan& other) const; /** Returns @true if this date span is equal to the other one. Two date spans are considered equal if and only if they have the same number of years and months and the same total number of days (counting both days and weeks). */ - bool operator==(wxDateSpan& other); + bool operator==(wxDateSpan& other) const; }; @@ -1428,7 +1428,7 @@ public: Returns the absolute value of the timespan: does not modify the object. */ - wxTimeSpan Abs(); + wxTimeSpan Abs() const; /** GetSeconds() @@ -1450,7 +1450,7 @@ public: Returns the sum of two timespans. */ wxTimeSpan Add(const wxTimeSpan& diff); - wxTimeSpan Add(const wxTimeSpan& diff); + const wxTimeSpan& Add(const wxTimeSpan& diff); wxTimeSpan operator+=(const wxTimeSpan& diff); //@} @@ -1522,37 +1522,37 @@ public: /** Returns the difference in number of days. */ - int GetDays(); + int GetDays() const; /** Returns the difference in number of hours. */ - int GetHours(); + int GetHours() const; /** Returns the difference in number of milliseconds. */ - wxLongLong GetMilliseconds(); + wxLongLong GetMilliseconds() const; /** Returns the difference in number of minutes. */ - int GetMinutes(); + int GetMinutes() const; /** Returns the difference in number of seconds. */ - wxLongLong GetSeconds(); + wxLongLong GetSeconds() const; /** Returns the internal representation of timespan. */ - wxLongLong GetValue(); + wxLongLong GetValue() const; /** Returns the difference in number of weeks. */ - int GetWeeks(); + int GetWeeks() const; /** Returns the timespan for one hour. @@ -1567,36 +1567,36 @@ public: /** Returns @true if two timespans are equal. */ - bool IsEqualTo(const wxTimeSpan& ts); + bool IsEqualTo(const wxTimeSpan& ts) const; /** Compares two timespans: works with the absolute values, i.e. -2 hours is longer than 1 hour. Also, it will return @false if the timespans are equal in absolute value. */ - bool IsLongerThan(const wxTimeSpan& ts); + bool IsLongerThan(const wxTimeSpan& ts) const; /** Returns @true if the timespan is negative. */ - bool IsNegative(); + bool IsNegative() const; /** Returns @true if the timespan is empty. */ - bool IsNull(); + bool IsNull() const; /** Returns @true if the timespan is positive. */ - bool IsPositive(); + bool IsPositive() const; /** Compares two timespans: works with the absolute values, i.e. 1 hour is shorter than -2 hours. Also, it will return @false if the timespans are equal in absolute value. */ - bool IsShorterThan(const wxTimeSpan& ts); + bool IsShorterThan(const wxTimeSpan& ts) const; /** Returns the timespan for one millisecond. @@ -1623,7 +1623,7 @@ public: Multiplies timespan by a scalar. */ wxTimeSpan Multiply(int n); - wxTimeSpan Multiply(int n); + const wxTimeSpan& Multiply(int n); wxTimeSpan operator*=(int n); //@} @@ -1638,7 +1638,7 @@ public: /** Returns timespan with inverted sign. */ - wxTimeSpan Negate(); + wxTimeSpan Negate() const; /** Add() @@ -1697,7 +1697,7 @@ public: Returns the difference of two timespans. */ wxTimeSpan Subtract(const wxTimeSpan& diff); - wxTimeSpan Subtract(const wxTimeSpan& diff); + const wxTimeSpan& Subtract(const wxTimeSpan& diff); wxTimeSpan operator-=(const wxTimeSpan& diff); //@} diff --git a/interface/dc.h b/interface/dc.h index 1d079fb67d..a0cbcba42c 100644 --- a/interface/dc.h +++ b/interface/dc.h @@ -435,19 +435,19 @@ public: /** Gets the brush used for painting the background (see wxDC::SetBackground). */ - const wxBrush GetBackground(); + const wxBrush GetBackground() const; /** Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT. @see SetBackgroundMode() */ - int GetBackgroundMode(); + int GetBackgroundMode() const; /** Gets the current brush (see wxDC::SetBrush). */ - const wxBrush GetBrush(); + const wxBrush GetBrush() const; /** Gets the character height of the currently set font. @@ -470,7 +470,7 @@ public: @see wxDisplayDepth */ - int GetDepth(); + int GetDepth() const; /** Gets the current font. Notice that even although each device context object has @@ -478,7 +478,7 @@ public: initially and only after calling SetFont() a valid font is returned. */ - const wxFont GetFont(); + const wxFont GetFont() const; /** Gets the current layout direction of the device context. On platforms where RTL @@ -489,7 +489,7 @@ public: @see SetLayoutDirection() */ - wxLayoutDirection GetLayoutDirection(); + wxLayoutDirection GetLayoutDirection() const; /** Gets the current logical function (see wxDC::SetLogicalFunction). @@ -517,14 +517,14 @@ public: void GetMultiLineTextExtent(const wxString& string, wxCoord* w, wxCoord* h, wxCoord* heightLine = NULL, - wxFont* font = NULL); - wxSize GetMultiLineTextExtent(const wxString& string); + wxFont* font = NULL) const; + const wxSize GetMultiLineTextExtent(const wxString& string) const; //@} /** Returns the resolution of the device in pixels per inch. */ - wxSize GetPPI(); + wxSize GetPPI() const; /** Fills the @a widths array with the widths from the beginning of @@ -538,12 +538,12 @@ public: @see GetMultiLineTextExtent(), GetTextExtent() */ bool GetPartialTextExtents(const wxString& text, - wxArrayInt& widths); + wxArrayInt& widths) const; /** Gets the current pen (see wxDC::SetPen). */ - const wxPen GetPen(); + const wxPen GetPen() const; /** Gets in @a colour the colour at the specified location. @@ -571,22 +571,22 @@ public: Returns a 2-element list @c ( width, height ) */ - void GetSize(wxCoord* width, wxCoord* height); - wxSize GetSize(); + void GetSize(wxCoord* width, wxCoord* height) const; + const wxSize GetSize() const; //@} //@{ /** Returns the horizontal and vertical resolution in millimetres. */ - void GetSizeMM(wxCoord* width, wxCoord* height); - wxSize GetSizeMM(); + void GetSizeMM(wxCoord* width, wxCoord* height) const; + const wxSize GetSizeMM() const; //@} /** Gets the current text background colour (see wxDC::SetTextBackground). */ - const wxColour GetTextBackground(); + const wxColour GetTextBackground() const; //@{ /** @@ -608,14 +608,14 @@ public: wxCoord* h, wxCoord* descent = NULL, wxCoord* externalLeading = NULL, - const wxFont* font = NULL); - wxSize GetTextExtent(const wxString& string); + const wxFont* font = NULL) const; + const wxSize GetTextExtent(const wxString& string) const; //@} /** Gets the current text foreground colour (see wxDC::SetTextForeground). */ - const wxColour GetTextForeground(); + const wxColour GetTextForeground() const; /** Gets the current user scale factor (set by wxDC::SetUserScale). diff --git a/interface/dcsvg.h b/interface/dcsvg.h index 69a506710b..2b55869d70 100644 --- a/interface/dcsvg.h +++ b/interface/dcsvg.h @@ -334,8 +334,8 @@ public: Gets the brush used for painting the background (see wxSVGFileDC::SetBackground). */ - wxBrush GetBackground(); - const wxBrush GetBackground(); + wxBrush GetBackground() const; + const wxBrush GetBackground() const; //@} /** @@ -343,14 +343,14 @@ public: @see wxDC::SetBackgroundMode */ - int GetBackgroundMode(); + int GetBackgroundMode() const; //@{ /** Gets the current brush (see wxSVGFileDC::SetBrush). */ - wxBrush GetBrush(); - const wxBrush GetBrush(); + wxBrush GetBrush() const; + const wxBrush GetBrush() const; //@} /** @@ -373,8 +373,8 @@ public: /** Gets the current font (see wxSVGFileDC::SetFont). */ - wxFont GetFont(); - const wxFont GetFont(); + wxFont GetFont() const; + const wxFont GetFont() const; //@} /** @@ -391,8 +391,8 @@ public: /** Gets the current pen (see wxSVGFileDC::SetPen). */ - wxPen GetPen(); - const wxPen GetPen(); + wxPen GetPen() const; + const wxPen GetPen() const; //@} /** @@ -410,8 +410,8 @@ public: /** Gets the current text background colour (see wxSVGFileDC::SetTextBackground). */ - wxColour GetTextBackground(); - const wxColour GetTextBackground(); + wxColour GetTextBackground() const; + const wxColour GetTextBackground() const; //@} /** @@ -437,8 +437,8 @@ public: /** Gets the current text foreground colour (see wxSVGFileDC::SetTextForeground). */ - wxColour GetTextForeground(); - const wxColour GetTextForeground(); + wxColour GetTextForeground() const; + const wxColour GetTextForeground() const; //@} /** diff --git a/interface/debugrpt.h b/interface/debugrpt.h index 3480b5c88e..89e61a5d54 100644 --- a/interface/debugrpt.h +++ b/interface/debugrpt.h @@ -43,7 +43,7 @@ public: report should be processed or @false if the user chose to cancel report generation or removed all files from it. */ - bool Show(wxDebugReport& dbgrpt); + bool Show(wxDebugReport& dbgrpt) const; }; @@ -69,7 +69,7 @@ public: /** Returns the full path of the compressed file (empty if creation failed). */ - const wxString GetCompressedFileName(); + const wxString GetCompressedFileName() const; }; @@ -209,7 +209,7 @@ public: This method should be used to construct the full name of the files which you wish to add to the report using AddFile(). */ - const wxString GetDirectory(); + const wxString GetDirectory() const; /** Retrieves the name (relative to @@ -217,25 +217,25 @@ public: file with the given index. If @a n is greater than or equal to the number of filse, @false is returned. */ - bool GetFile(size_t n, wxString* name, wxString* desc); + bool GetFile(size_t n, wxString* name, wxString* desc) const; /** Gets the current number files in this report. */ - size_t GetFilesCount(); + size_t GetFilesCount() const; /** Gets the name used as a base name for various files, by default wxApp::GetAppName is used. */ - wxString GetReportName(); + wxString GetReportName() const; /** Returns @true if the object was successfully initialized. If this method returns @false the report can't be used. */ - bool IsOk(); + bool IsOk() const; /** Processes this report: the base class simply notifies the user that the @@ -283,7 +283,7 @@ public: wxDebugReportPreview::Show for more information. */ - bool Show(wxDebugReport& dbgrpt); + bool Show(wxDebugReport& dbgrpt) const; }; diff --git a/interface/dialog.h b/interface/dialog.h index c84301bc3a..757cda8305 100644 --- a/interface/dialog.h +++ b/interface/dialog.h @@ -215,7 +215,7 @@ public: @see SetAffirmativeId() */ - int GetAffirmativeId(); + int GetAffirmativeId() const; /** Override this to return a window containing the main content of the dialog. @@ -225,7 +225,7 @@ public: and allows the @ref overview_wxdialogoverview "layout adaptation code" to know that only the pages need to be made scrollable. */ - wxWindow* GetContentWindow(); + wxWindow* GetContentWindow() const; /** Gets the identifier of the button to map presses of @c ESC @@ -233,7 +233,7 @@ public: @see SetEscapeId() */ - int GetEscapeId(); + int GetEscapeId() const; /** Returns @true if the dialog has been adapted, usually by making it scrollable @@ -241,7 +241,7 @@ public: See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for more on layout adaptation. */ - bool GetLayoutAdaptationDone(); + bool GetLayoutAdaptationDone() const; /** Gets a value representing the aggressiveness of search for buttons and sizers @@ -258,7 +258,7 @@ public: See also SetLayoutAdaptationMode() and @ref overview_autoscrollingdialogs "Automatic scrolling dialogs". */ - wxDialogLayoutAdaptationMode GetLayoutAdaptationMode(); + wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const; /** A static function getting the current layout adapter object. @@ -292,7 +292,7 @@ public: arbitrary controls are not currently supported. This function is not available on any other platform. */ - wxToolBar* GetToolBar(); + wxToolBar* GetToolBar() const; /** Iconizes or restores the dialog. Windows only. @@ -315,7 +315,7 @@ public: @remarks Always returns @false under Windows since dialogs cannot be iconized. */ - bool IsIconized(); + bool IsIconized() const; /** A static function returning @true if layout adaptation is enabled for all @@ -331,12 +331,12 @@ public: See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for more on layout adaptation. */ - bool IsMainButton(wxWindowID& id); + bool IsMainButton(wxWindowID& id) const; /** Returns @true if the dialog box is modal, @false otherwise. */ - bool IsModal(); + bool IsModal() const; /** The default handler for wxEVT_SYS_COLOUR_CHANGED. diff --git a/interface/dialup.h b/interface/dialup.h index 87b921f968..3605a60f07 100644 --- a/interface/dialup.h +++ b/interface/dialup.h @@ -99,7 +99,7 @@ public: parameter to Dial() on this machine and returns their number (may be 0). */ - size_t GetISPNames(wxArrayString& names); + size_t GetISPNames(wxArrayString& names) const; /** Hang up the currently active dial up connection. @@ -113,14 +113,14 @@ public: guaranteed to be correct, so it is better to ask user for confirmation or give him a possibility to override it. */ - bool IsAlwaysOnline(); + bool IsAlwaysOnline() const; /** Returns @true if (async) dialing is in progress. @see Dial() */ - bool IsDialing(); + bool IsDialing() const; /** Returns @true if the dialup manager was initialized correctly. If this @@ -128,7 +128,7 @@ public: good idea to call this function and check its result before calling any other wxDialUpManager methods */ - bool IsOk(); + bool IsOk() const; /** Returns @true if the computer is connected to the network: under Windows, @@ -136,14 +136,14 @@ public: the "well-known host" (as specified by wxDialUpManager::SetWellKnownHost) is reachable. */ - bool IsOnline(); + bool IsOnline() const; /** - , @b const wxString&@e commandHangup = wxT("/usr/bin/poff")) + , wxString&@e commandHangup = wxT("/usr/bin/poff")) This method is for Unix only. Sets the commands to start up the network and to hang up again. */ - void SetConnectCommand(); + void SetConnectCommand() const; /** Sometimes the built-in logic for determining the online status may fail, @@ -187,12 +187,12 @@ public: Is this a @c CONNECTED or @c DISCONNECTED event? In other words, does it notify about transition from offline to online state or vice versa? */ - bool IsConnectedEvent(); + bool IsConnectedEvent() const; /** Does this event come from wxDialUpManager::Dial() or from some extrenal process (i.e. does it result from our own attempt to establish the connection)? */ - bool IsOwnEvent(); + bool IsOwnEvent() const; }; diff --git a/interface/dir.h b/interface/dir.h index 5f7bd2000d..dd7ba41d20 100644 --- a/interface/dir.h +++ b/interface/dir.h @@ -175,19 +175,19 @@ public: */ bool GetFirst(wxString* filename, const wxString& filespec = wxEmptyString, - int flags = wxDIR_DEFAULT); + int flags = wxDIR_DEFAULT) const; /** Returns the name of the directory itself. The returned string does not have the trailing path separator (slash or backslash). */ - wxString GetName(); + wxString GetName() const; /** Continue enumerating files which satisfy the criteria specified by the last call to GetFirst(). */ - bool GetNext(wxString* filename); + bool GetNext(wxString* filename) const; /** Returns the size (in bytes) of all files recursively found in @c dir or @@ -226,7 +226,7 @@ public: Returns @true if the directory was successfully opened by a previous call to Open(). */ - bool IsOpened(); + bool IsOpened() const; /** Open the directory for enumerating, returns @true on success diff --git a/interface/dirctrl.h b/interface/dirctrl.h index 5292f983bc..31260aab49 100644 --- a/interface/dirctrl.h +++ b/interface/dirctrl.h @@ -96,33 +96,33 @@ public: /** Gets the default path. */ - wxString GetDefaultPath(); + wxString GetDefaultPath() const; /** Gets selected filename path only (else empty string). This function doesn't count a directory as a selection. */ - wxString GetFilePath(); + wxString GetFilePath() const; /** Returns the filter string. */ - wxString GetFilter(); + wxString GetFilter() const; /** Returns the current filter index (zero-based). */ - int GetFilterIndex(); + int GetFilterIndex() const; /** Returns a pointer to the filter list control (if present). */ - wxDirFilterListCtrl* GetFilterListCtrl(); + wxDirFilterListCtrl* GetFilterListCtrl() const; /** Gets the currently-selected directory or filename. */ - wxString GetPath(); + wxString GetPath() const; /** Returns the root id for the tree control. @@ -132,7 +132,7 @@ public: /** Returns a pointer to the tree control. */ - wxTreeCtrl* GetTreeCtrl(); + wxTreeCtrl* GetTreeCtrl() const; /** Initializes variables. diff --git a/interface/dirdlg.h b/interface/dirdlg.h index 06f049237b..ca177ae564 100644 --- a/interface/dirdlg.h +++ b/interface/dirdlg.h @@ -70,12 +70,12 @@ public: /** Returns the message that will be displayed on the dialog. */ - wxString GetMessage(); + wxString GetMessage() const; /** Returns the default or user-selected path. */ - wxString GetPath(); + wxString GetPath() const; /** Sets the message that will be displayed on the dialog. diff --git a/interface/display.h b/interface/display.h index 14060218da..be0f8755da 100644 --- a/interface/display.h +++ b/interface/display.h @@ -58,7 +58,7 @@ public: same as GetGeometry() but it could be less if there is a taskbar (or equivalent) on this display. */ - wxRect GetClientArea(); + wxRect GetClientArea() const; /** Returns the number of connected displays. @@ -68,12 +68,12 @@ public: /** Returns the current video mode that this display is in. */ - wxVideoMode GetCurrentMode(); + wxVideoMode GetCurrentMode() const; /** Returns the bit depth of the display whose index was passed to the constructor. */ - int GetDepth(); + int GetDepth() const; /** Returns the index of the display on which the given point lies. Returns @@ -99,7 +99,7 @@ public: Returns the bounding rectangle of the display whose index was passed to the constructor. */ - wxRect GetGeometry(); + wxRect GetGeometry() const; /** Fills and returns an array with all the video modes that @@ -107,12 +107,12 @@ public: supported by this display and match the mode parameter (if mode is not wxDefaultVideoMode). */ - wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode); + wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const; /** Returns the display's name. A name is not available on all platforms. */ - wxString GetName(); + wxString GetName() const; /** Returns @true if the display is the primary display. The primary display is the diff --git a/interface/docmdi.h b/interface/docmdi.h index b1c5b0931d..8273a30f16 100644 --- a/interface/docmdi.h +++ b/interface/docmdi.h @@ -109,12 +109,12 @@ public: /** Returns the document associated with this frame. */ - wxDocument* GetDocument(); + wxDocument* GetDocument() const; /** Returns the view associated with this frame. */ - wxView* GetView(); + wxView* GetView() const; /** Sets the currently active view to be the frame's view. You may need diff --git a/interface/docview.h b/interface/docview.h index da04a3d79a..67759e5350 100644 --- a/interface/docview.h +++ b/interface/docview.h @@ -430,7 +430,7 @@ public: Returns the directory last selected by the user when opening a file. Initially empty. */ - wxString GetLastDirectory(); + wxString GetLastDirectory() const; /** Returns the number of documents that can be open simultaneously. @@ -688,12 +688,12 @@ public: /** Gets a pointer to the document associated with the view. */ - wxDocument* GetDocument(); + wxDocument* GetDocument() const; /** Returns a pointer to the document manager instance associated with this view. */ - wxDocManager* GetDocumentManager(); + wxDocManager* GetDocumentManager() const; /** Gets the frame associated with the view (if any). Note that this "frame'' is @@ -708,7 +708,7 @@ public: constructor). Not currently used by the framework. */ - wxString GetViewName(); + wxString GetViewName() const; /** Called when a view is activated by means of Activate(). The default @@ -858,12 +858,12 @@ public: /** Returns the document associated with this frame. */ - wxDocument* GetDocument(); + wxDocument* GetDocument() const; /** Returns the view associated with this frame. */ - wxView* GetView(); + wxView* GetView() const; /** Sets the currently active view to be the frame's view. You may need @@ -954,7 +954,7 @@ public: /** Returns the associated @ref overview_wxdocmanager "document manager object". */ - wxDocManager* GetDocumentManager(); + wxDocManager* GetDocumentManager() const; /** Deletes all views and documents. If no user input cancelled the @@ -1024,62 +1024,62 @@ public: Returns a pointer to the command processor associated with this document. See wxCommandProcessor. */ - wxCommandProcessor* GetCommandProcessor(); + wxCommandProcessor* GetCommandProcessor() const; /** Gets a pointer to the associated document manager. */ - wxDocManager* GetDocumentManager(); + wxDocManager* GetDocumentManager() const; /** Gets the document type name for this document. See the comment for documentTypeName. */ - wxString GetDocumentName(); + wxString GetDocumentName() const; /** Gets a pointer to the template that created the document. */ - wxDocTemplate* GetDocumentTemplate(); + wxDocTemplate* GetDocumentTemplate() const; /** Intended to return a suitable window for using as a parent for document-related dialog boxes. By default, uses the frame associated with the first view. */ - wxWindow* GetDocumentWindow(); + wxWindow* GetDocumentWindow() const; /** Gets the filename associated with this document, or "" if none is associated. */ - wxString GetFilename(); + wxString GetFilename() const; /** A convenience function to get the first view for a document, because in many cases a document will only have a single view. See also: GetViews() */ - wxView* GetFirstView(); + wxView* GetFirstView() const; /** Gets the title for this document. The document title is used for an associated frame (if any), and is usually constructed by the framework from the filename. */ - wxString GetTitle(); + wxString GetTitle() const; /** Return the document name suitable to be shown to the user. The default implementation uses the document title, if any, of the name part of the document filename if it was set or, otherwise, the string @b unnamed. */ - virtual wxString GetUserReadableName(); + virtual wxString GetUserReadableName() const; /** Returns the list whose elements are the views on the document. See also: GetFirstView() */ - wxList GetViews(); + wxList GetViews() const; /** Returns @true if the document has been modified since the last save, @false @@ -1089,7 +1089,7 @@ public: the document). See also Modify(). */ - virtual bool IsModified(); + virtual bool IsModified() const; //@{ /** @@ -1353,29 +1353,29 @@ public: /** Returns the base identifier for the range used for appending items. */ - wxWindowID GetBaseId(); + wxWindowID GetBaseId() const; /** Returns the number of files currently stored in the file history. */ - size_t GetCount(); + size_t GetCount() const; /** Returns the file at this index (zero-based). */ - wxString GetHistoryFile(size_t index); + wxString GetHistoryFile(size_t index) const; /** Returns the maximum number of files that can be stored. */ - int GetMaxFiles(); + int GetMaxFiles() const; /** Returns the list of menus that are managed by this file history object. @see UseMenu() */ - const wxList GetMenus(); + const wxList GetMenus() const; /** Loads the file history from the given config object. This function should be diff --git a/interface/dragimag.h b/interface/dragimag.h index 56cc004960..695c393a10 100644 --- a/interface/dragimag.h +++ b/interface/dragimag.h @@ -148,7 +148,7 @@ public: (together with wxDragImage::DoDrawImage) to provide a virtual drawing capability. */ - virtual wxRect GetImageRect(const wxPoint& pos); + virtual wxRect GetImageRect(const wxPoint& pos) const; /** Hides the image. You may wish to call this before updating the window @@ -193,5 +193,5 @@ public: */ bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, const wxRect& sourceRect, - const wxRect& destRect); + const wxRect& destRect) const; }; diff --git a/interface/dynarray.h b/interface/dynarray.h index 3f58b6a209..66f803a4e5 100644 --- a/interface/dynarray.h +++ b/interface/dynarray.h @@ -271,7 +271,7 @@ public: /** Return the number of items in the array. */ - size_t GetCount(); + size_t GetCount() const; //@{ /** @@ -290,8 +290,8 @@ public: previously added to the array, but fail even if another, identical, element is in the array. */ - int Index(T& item, bool searchFromEnd = false); - int Index(T& item); + int Index(T& item, bool searchFromEnd = false) const; + const int Index(T& item) const; //@} /** @@ -304,7 +304,7 @@ public: wxArray::AddAt for a common operation of "insert only if not found". */ - size_t IndexForInsert(T item); + size_t IndexForInsert(T item) const; //@{ /** @@ -324,7 +324,7 @@ public: /** Returns @true if the array is empty, @false otherwise. */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns the item at the given position in the array. If @a index is out of @@ -333,7 +333,7 @@ public: The returned value is of type "reference to the array element type" for all of the array classes. */ - T Item(size_t index); + T Item(size_t index) const; /** Returns the last element in the array, i.e. is the same as Item(GetCount() - 1). @@ -341,7 +341,7 @@ public: The returned value is of type "reference to the array element type" for all of the array classes. */ - T Last(); + T Last() const; /** To use an array you must first define the array class. This is done with the diff --git a/interface/dynlib.h b/interface/dynlib.h index b85b42ae26..78e611639f 100644 --- a/interface/dynlib.h +++ b/interface/dynlib.h @@ -35,27 +35,27 @@ public: @returns @true if the load address and module size were retrieved, @false if this information is not available. */ - bool GetAddress(void** addr, size_t len); + bool GetAddress(void** addr, size_t len) const; /** Returns the base name of this module, e.g. @c kernel32.dll or @c libc-2.3.2.so. */ - wxString GetName(); + wxString GetName() const; /** Returns the full path of this module if available, e.g. @c c:\windows\system32\kernel32.dll or @c /lib/libc-2.3.2.so. */ - wxString GetPath(); + wxString GetPath() const; /** Returns the version of this module, e.g. @c 5.2.3790.0 or @c 2.3.2. The returned string is empty if the version information is not available. */ - wxString GetVersion(); + wxString GetVersion() const; }; @@ -271,7 +271,7 @@ public: @see wxDYNLIB_FUNCTION */ - void* GetSymbol(const wxString& name); + void* GetSymbol(const wxString& name) const; /** This function is available only under Windows as it is only useful when @@ -282,7 +282,7 @@ public: automatically depending on the current build. Otherwise, this method is identical to GetSymbol(). */ - void* GetSymbolAorW(const wxString& name); + void* GetSymbolAorW(const wxString& name) const; /** Returns @true if the symbol with the given @a name is present in the dynamic @@ -290,12 +290,12 @@ public: this function doesn't log an error message if the symbol is not found. This function is new since wxWidgets version 2.5.4 */ - bool HasSymbol(const wxString& name); + bool HasSymbol(const wxString& name) const; /** Returns @true if the library was successfully loaded, @false otherwise. */ - bool IsLoaded(); + bool IsLoaded() const; /** This static method returns an array containing the details diff --git a/interface/encconv.h b/interface/encconv.h index 46ada4c2d1..f21e5ebea6 100644 --- a/interface/encconv.h +++ b/interface/encconv.h @@ -46,13 +46,13 @@ public: /** Convert wxString and return new wxString object. */ - bool Convert(const char* input, char* output); - bool Convert(const wchar_t* input, wchar_t* output); - bool Convert(const char* input, wchar_t* output); - bool Convert(const wchar_t* input, char* output); - bool Convert(char* str); - bool Convert(wchar_t* str); - wxString Convert(const wxString& input); + bool Convert(const char* input, char* output) const; + const bool Convert(const wchar_t* input, wchar_t* output) const; + const bool Convert(const char* input, wchar_t* output) const; + const bool Convert(const wchar_t* input, char* output) const; + const bool Convert(char* str) const; + const bool Convert(wchar_t* str) const; + const wxString Convert(const wxString& input) const; //@} /** diff --git a/interface/event.h b/interface/event.h index 0ea3ae466e..5c1d73ef13 100644 --- a/interface/event.h +++ b/interface/event.h @@ -81,7 +81,7 @@ public: Notice that GetModifiers() is easier to use correctly than this function so you should consider using it in new code. */ - bool AltDown(); + bool AltDown() const; /** CMD is a pseudo key which is the same as Control for PC and Unix @@ -92,14 +92,14 @@ public: this is the same as ControlDown() and under Mac this is the same as MetaDown(). */ - bool CmdDown(); + bool CmdDown() const; /** Returns @true if the control key was down at the time of the key event. Notice that GetModifiers() is easier to use correctly than this function so you should consider using it in new code. */ - bool ControlDown(); + bool ControlDown() const; /** Returns the virtual key code. ASCII events return normal ASCII values, @@ -111,7 +111,7 @@ public: charset. You can obtain the corresponding Unicode character using GetUnicodeKey(). */ - int GetKeyCode(); + int GetKeyCode() const; /** Return the bitmask of modifier keys which were pressed when this event @@ -129,14 +129,14 @@ public: with this function. */ - int GetModifiers(); + int GetModifiers() const; //@{ /** Obtains the position (in client coordinates) at which the key was pressed. */ - wxPoint GetPosition(); - void GetPosition(long* x, long* y); + wxPoint GetPosition() const; + const void GetPosition(long* x, long* y) const; //@} /** @@ -145,7 +145,7 @@ public: @b NB: Currently the raw key codes are not supported by all ports, use @c #ifdef wxHAS_RAW_KEY_CODES to determine if this feature is available. */ - wxUint32 GetRawKeyCode(); + wxUint32 GetRawKeyCode() const; /** Returns the low level key flags for this event. The flags are @@ -153,24 +153,24 @@ public: @b NB: Currently the raw key flags are not supported by all ports, use @c #ifdef wxHAS_RAW_KEY_CODES to determine if this feature is available. */ - wxUint32 GetRawKeyFlags(); + wxUint32 GetRawKeyFlags() const; /** Returns the Unicode character corresponding to this key event. This function is only available in Unicode build, i.e. when @c wxUSE_UNICODE is 1. */ - wxChar GetUnicodeKey(); + wxChar GetUnicodeKey() const; /** Returns the X position (in client coordinates) of the event. */ - long GetX(); + long GetX() const; /** Returns the Y (in client coordinates) position of the event. */ - long GetY(); + long GetY() const; /** Returns @true if either CTRL or ALT keys was down @@ -180,21 +180,21 @@ public: META under X but the key presses even while NUMLOCK is on should be still processed normally). */ - bool HasModifiers(); + bool HasModifiers() const; /** Returns @true if the Meta key was down at the time of the key event. Notice that GetModifiers() is easier to use correctly than this function so you should consider using it in new code. */ - bool MetaDown(); + bool MetaDown() const; /** Returns @true if the shift key was down at the time of the key event. Notice that GetModifiers() is easier to use correctly than this function so you should consider using it in new code. */ - bool ShiftDown(); + bool ShiftDown() const; /** bool m_altDown @@ -282,7 +282,7 @@ public: Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to indicate any button down event. */ - bool ButtonDown(int button = wxJOY_BUTTON_ANY); + bool ButtonDown(int button = wxJOY_BUTTON_ANY) const; /** Returns @true if the specified button (or any button) was in a down state. @@ -291,7 +291,7 @@ public: Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to indicate any button down event. */ - bool ButtonIsDown(int button = wxJOY_BUTTON_ANY); + bool ButtonIsDown(int button = wxJOY_BUTTON_ANY) const; /** Returns @true if the event was an up event from the specified button (or any @@ -301,53 +301,53 @@ public: Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to indicate any button down event. */ - bool ButtonUp(int button = wxJOY_BUTTON_ANY); + bool ButtonUp(int button = wxJOY_BUTTON_ANY) const; /** Returns the identifier of the button changing state. This is a wxJOY_BUTTONn identifier, where n is one of 1, 2, 3, 4. */ - int GetButtonChange(); + int GetButtonChange() const; /** Returns the down state of the buttons. This is a bitlist of wxJOY_BUTTONn identifiers, where n is one of 1, 2, 3, 4. */ - int GetButtonState(); + int GetButtonState() const; /** Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2. */ - int GetJoystick(); + int GetJoystick() const; /** Returns the x, y position of the joystick event. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; /** Returns the z position of the joystick event. */ - int GetZPosition(); + int GetZPosition() const; /** Returns @true if this was a button up or down event (@e not 'is any button down?'). */ - bool IsButton(); + bool IsButton() const; /** Returns @true if this was an x, y move event. */ - bool IsMove(); + bool IsMove() const; /** Returns @true if this was a z move event. */ - bool IsZMove(); + bool IsZMove() const; }; @@ -376,14 +376,14 @@ public: Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar. */ - int GetOrientation(); + int GetOrientation() const; /** Returns the position of the scrollbar for the thumb track and release events. Note that this field can't be used for the other events, you need to query the window itself for the current position in that case. */ - int GetPosition(); + int GetPosition() const; }; @@ -542,12 +542,12 @@ public: /** Returns @true if the UI element should be checked. */ - bool GetChecked(); + bool GetChecked() const; /** Returns @true if the UI element should be enabled. */ - bool GetEnabled(); + bool GetEnabled() const; /** Static function returning a value specifying how wxWidgets @@ -562,35 +562,35 @@ public: Returns @true if the application has called Check(). For wxWidgets internal use only. */ - bool GetSetChecked(); + bool GetSetChecked() const; /** Returns @true if the application has called Enable(). For wxWidgets internal use only. */ - bool GetSetEnabled(); + bool GetSetEnabled() const; /** Returns @true if the application has called Show(). For wxWidgets internal use only. */ - bool GetSetShown(); + bool GetSetShown() const; /** Returns @true if the application has called SetText(). For wxWidgets internal use only. */ - bool GetSetText(); + bool GetSetText() const; /** Returns @true if the UI element should be shown. */ - bool GetShown(); + bool GetShown() const; /** Returns the text that should be set for the UI element. */ - wxString GetText(); + wxString GetText() const; /** Returns the current interval between updates in milliseconds. @@ -766,46 +766,46 @@ public: /** Returns @true if the event was a first extra button double click. */ - bool Aux1DClick(); + bool Aux1DClick() const; /** Returns @true if the first extra button mouse button changed to down. */ - bool Aux1Down(); + bool Aux1Down() const; /** Returns @true if the first extra button mouse button is currently down, independent of the current event type. */ - bool Aux1IsDown(); + bool Aux1IsDown() const; /** Returns @true if the first extra button mouse button changed to up. */ - bool Aux1Up(); + bool Aux1Up() const; /** Returns @true if the event was a second extra button double click. */ - bool Aux2DClick(); + bool Aux2DClick() const; /** Returns @true if the second extra button mouse button changed to down. */ - bool Aux2Down(); + bool Aux2Down() const; /** Returns @true if the second extra button mouse button is currently down, independent of the current event type. */ - bool Aux2IsDown(); + bool Aux2IsDown() const; /** Returns @true if the second extra button mouse button changed to up. */ - bool Aux2Up(); + bool Aux2Up() const; /** Returns @true if the identified mouse button is changing state. Valid @@ -867,7 +867,7 @@ public: @see wxKeyEvent::CmdDown */ - bool CmdDown(); + bool CmdDown() const; /** Returns @true if the control key was down at the time of the event. @@ -894,7 +894,7 @@ public: double click events, @c wxMOUSE_BTN_MIDDLE and @c wxMOUSE_BTN_RIGHT for the same events for the middle and the right buttons respectively. */ - int GetButton(); + int GetButton() const; /** Returns the number of mouse clicks for this event: 1 for a simple click, 2 @@ -904,20 +904,20 @@ public: they generate different kinds of events however). This function is new since wxWidgets version 2.9.0 */ - int GetClickCount(); + int GetClickCount() const; /** Returns the configured number of lines (or whatever) to be scrolled per wheel action. Defaults to three. */ - int GetLinesPerAction(); + int GetLinesPerAction() const; /** Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled). */ - wxPoint GetLogicalPosition(const wxDC& dc); + wxPoint GetLogicalPosition(const wxDC& dc) const; //@{ /** @@ -927,9 +927,9 @@ public: keyboard combination (e.g. under Windows when the "menu'' key is pressed), the returned position is @c wxDefaultPosition. */ - wxPoint GetPosition(); - void GetPosition(wxCoord* x, wxCoord* y); - void GetPosition(long* x, long* y); + wxPoint GetPosition() const; + const void GetPosition(wxCoord* x, wxCoord* y) const; + const void GetPosition(long* x, long* y) const; //@} /** @@ -937,7 +937,7 @@ public: taken, and one such action (for example, scrolling one increment) should occur for each delta. */ - int GetWheelDelta(); + int GetWheelDelta() const; /** Get wheel rotation, positive or negative indicates direction of @@ -947,12 +947,12 @@ public: should be able to either do partial line scrolling or wait until several events accumulate before scrolling. */ - int GetWheelRotation(); + int GetWheelRotation() const; /** Returns X coordinate of the physical mouse event position. */ - long GetX(); + long GetX() const; /** Returns Y coordinate of the physical mouse event position. @@ -964,29 +964,29 @@ public: down event - that may be tested using @e ButtonDown). */ - bool IsButton(); + bool IsButton() const; /** Returns @true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling. */ - bool IsPageScroll(); + bool IsPageScroll() const; /** Returns @true if the mouse was leaving the window. See also Entering(). */ - bool Leaving(); + bool Leaving() const; /** Returns @true if the event was a left double click. */ - bool LeftDClick(); + bool LeftDClick() const; /** Returns @true if the left mouse button changed to down. */ - bool LeftDown(); + bool LeftDown() const; /** Returns @true if the left mouse button is currently down, independent @@ -1000,71 +1000,71 @@ public: This event is usually used in the mouse event handlers which process "move mouse" messages to determine whether the user is (still) dragging the mouse. */ - bool LeftIsDown(); + bool LeftIsDown() const; /** Returns @true if the left mouse button changed to up. */ - bool LeftUp(); + bool LeftUp() const; /** Returns @true if the Meta key was down at the time of the event. */ - bool MetaDown(); + bool MetaDown() const; /** Returns @true if the event was a middle double click. */ - bool MiddleDClick(); + bool MiddleDClick() const; /** Returns @true if the middle mouse button changed to down. */ - bool MiddleDown(); + bool MiddleDown() const; /** Returns @true if the middle mouse button is currently down, independent of the current event type. */ - bool MiddleIsDown(); + bool MiddleIsDown() const; /** Returns @true if the middle mouse button changed to up. */ - bool MiddleUp(); + bool MiddleUp() const; /** Returns @true if this was a motion event and no mouse buttons were pressed. If any mouse button is held pressed, then this method returns @false and Dragging() returns @true. */ - bool Moving(); + bool Moving() const; /** Returns @true if the event was a right double click. */ - bool RightDClick(); + bool RightDClick() const; /** Returns @true if the right mouse button changed to down. */ - bool RightDown(); + bool RightDown() const; /** Returns @true if the right mouse button is currently down, independent of the current event type. */ - bool RightIsDown(); + bool RightIsDown() const; /** Returns @true if the right mouse button changed to up. */ - bool RightUp(); + bool RightUp() const; /** Returns @true if the shift key was down at the time of the event. */ - bool ShiftDown(); + bool ShiftDown() const; /** bool m_altDown @@ -1171,18 +1171,18 @@ public: /** Returns an array of filenames. */ - wxString* GetFiles(); + wxString* GetFiles() const; /** Returns the number of files dropped. */ - int GetNumberOfFiles(); + int GetNumberOfFiles() const; /** Returns the position at which the files were dropped. Returns an array of filenames. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; /** wxString* m_files @@ -1226,7 +1226,7 @@ public: /** Deprecated, use IsChecked() instead. */ - bool Checked(); + bool Checked() const; /** Returns client data pointer for a listbox or choice selection event @@ -1278,7 +1278,7 @@ public: Notice that this method can not be used with wxCheckListBox currently. */ - bool IsChecked(); + bool IsChecked() const; /** For a listbox or similar event, returns @true if it is a selection, @false if it @@ -1342,7 +1342,7 @@ public: /** Returns @true if the application or window is being activated, @false otherwise. */ - bool GetActive(); + bool GetActive() const; }; @@ -1390,7 +1390,7 @@ public: If the event originated from a keyboard event, the value returned from this function will be wxDefaultPosition. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; /** Sets the position at which the menu should be shown. @@ -1435,7 +1435,7 @@ public: /** Returns the device context associated with the erase event to draw on. */ - wxDC* GetDC(); + wxDC* GetDC() const; }; @@ -1581,7 +1581,7 @@ public: Returns @true if the change is allowed (Veto() hasn't been called) or @false otherwise (if it was). */ - bool IsAllowed(); + bool IsAllowed() const; /** Prevents the change announced by this event from happening. @@ -1656,13 +1656,13 @@ public: @see SetOrigin() */ - wxHelpEvent::Origin GetOrigin(); + wxHelpEvent::Origin GetOrigin() const; /** Returns the left-click position of the mouse, in screen coordinates. This allows the application to position the help appropriately. */ - const wxPoint GetPosition(); + const wxPoint GetPosition() const; /** Set the help event origin, only used internally by wxWidgets normally. @@ -1710,12 +1710,12 @@ public: Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar. */ - int GetOrientation(); + int GetOrientation() const; /** Returns the position of the scrollbar. */ - int GetPosition(); + int GetPosition() const; }; @@ -1783,7 +1783,7 @@ public: @see RequestMore() */ - bool MoreRequested(); + bool MoreRequested() const; /** Tells wxWidgets that more processing is required. This function can be called @@ -1900,25 +1900,25 @@ public: /** Returns the child that has the focus, or @NULL. */ - wxWindow* GetCurrentFocus(); + wxWindow* GetCurrentFocus() const; /** Returns @true if the navigation was in the forward direction. */ - bool GetDirection(); + bool GetDirection() const; /** Returns @true if the navigation event was from a tab key. This is required for proper navigation over radio buttons. */ - bool IsFromTab(); + bool IsFromTab() const; /** Returns @true if the navigation event represents a window change (for example, from Ctrl-Page Down in a notebook). */ - bool IsWindowChange(); + bool IsWindowChange() const; /** Sets the current focus window member. @@ -1980,7 +1980,7 @@ public: Returns the window that gained the capture, or @NULL if it was a non-wxWidgets window. */ - wxWindow* GetCapturedWindow(); + wxWindow* GetCapturedWindow() const; }; @@ -2035,7 +2035,7 @@ public: shutting down. This method can only be called for end session and query end session events, it doesn't make sense for close window event. */ - bool GetLoggingOff(); + bool GetLoggingOff() const; /** Sets the 'can veto' flag. @@ -2045,12 +2045,12 @@ public: /** Sets the 'force' flag. */ - void SetForce(bool force); + void SetForce(bool force) const; /** Sets the 'logging off' flag. */ - void SetLoggingOff(bool loggingOff); + void SetLoggingOff(bool loggingOff) const; /** Call this from your event handler to veto a system shutdown or to signal @@ -2093,20 +2093,20 @@ public: used with the @c OPEN and @c CLOSE events and even for them the returned pointer may be @NULL in some ports. */ - wxMenu* GetMenu(); + wxMenu* GetMenu() const; /** Returns the menu identifier associated with the event. This method should be only used with the @c HIGHLIGHT events. */ - int GetMenuId(); + int GetMenuId() const; /** Returns @true if the menu which is being opened or closed is a popup menu, @false if it is a normal one. This method should only be used with the @c OPEN and @c CLOSE events. */ - bool IsPopup(); + bool IsPopup() const; }; @@ -2314,7 +2314,7 @@ public: @see SetClientObject(), wxClientData */ - wxClientData* GetClientObject(); + wxClientData* GetClientObject() const; /** Returns @true if the event handler is enabled, @false otherwise. @@ -2483,7 +2483,7 @@ public: Returns @true if the frame has been iconized, @false if it has been restored. */ - bool Iconized(); + bool Iconized() const; }; @@ -2510,7 +2510,7 @@ public: /** Returns the position of the window generating the move change event. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; }; @@ -2553,7 +2553,7 @@ public: implementing the Clone function is to implement a copy constructor for a new event (call it MyEvent) and then define the Clone function like this: */ - virtual wxEvent* Clone(); + virtual wxEvent* Clone() const; /** Returns the object (usually a window) associated with the @@ -2570,12 +2570,12 @@ public: /** Returns the identifier associated with this event, such as a button command id. */ - int GetId(); + int GetId() const; /** Returns @true if the event handler should be skipped, @false otherwise. */ - bool GetSkipped(); + bool GetSkipped() const; /** Gets the timestamp for the event. The timestamp is the time in milliseconds @@ -2590,7 +2590,7 @@ public: wxCommandEvent else it returns @false. Note: Exists only for optimization purposes. */ - bool IsCommandEvent(); + bool IsCommandEvent() const; /** Sets the propagation level to the given value (for example returned from an @@ -2622,7 +2622,7 @@ public: Test if this event should be propagated or not, i.e. if the propagation level is currently greater than 0. */ - bool ShouldPropagate(); + bool ShouldPropagate() const; /** This method can be used inside an event handler to control whether further @@ -2704,7 +2704,7 @@ public: /** Returns the entire size of the window generating the size change event. */ - wxSize GetSize(); + wxSize GetSize() const; }; @@ -2736,17 +2736,17 @@ public: /** Returns a reference to the cursor specified by this event. */ - wxCursor GetCursor(); + wxCursor GetCursor() const; /** Returns the X coordinate of the mouse in client coordinates. */ - wxCoord GetX(); + wxCoord GetX() const; /** Returns the Y coordinate of the mouse in client coordinates. */ - wxCoord GetY(); + wxCoord GetY() const; /** Returns @true if the cursor specified by this event is a valid cursor. @@ -2754,7 +2754,7 @@ public: @remarks You cannot specify wxNullCursor with this event, as it is not considered a valid cursor. */ - bool HasCursor(); + bool HasCursor() const; /** Sets the cursor associated with this event. diff --git a/interface/fdrepdlg.h b/interface/fdrepdlg.h index d23caec23e..598806acf7 100644 --- a/interface/fdrepdlg.h +++ b/interface/fdrepdlg.h @@ -27,24 +27,24 @@ public: /** Return the pointer to the dialog which generated this event. */ - wxFindReplaceDialog* GetDialog(); + wxFindReplaceDialog* GetDialog() const; /** Return the string to find (never empty). */ - wxString GetFindString(); + wxString GetFindString() const; /** Get the currently selected flags: this is the combination of @c wxFR_DOWN, @c wxFR_WHOLEWORD and @c wxFR_MATCHCASE flags. */ - int GetFlags(); + int GetFlags() const; /** Return the string to replace the search string with (only for replace and replace all events). */ - const wxString GetReplaceString(); + const wxString GetReplaceString() const; }; @@ -81,7 +81,7 @@ public: /** Get the combination of @c wxFindReplaceFlags values. */ - int GetFlags(); + int GetFlags() const; /** Get the replacement string. @@ -154,5 +154,5 @@ public: Get the wxFindReplaceData object used by this dialog. */ - const wxFindReplaceData* GetData(); + const wxFindReplaceData* GetData() const; }; diff --git a/interface/ffile.h b/interface/ffile.h index b960defa53..44465f22da 100644 --- a/interface/ffile.h +++ b/interface/ffile.h @@ -81,7 +81,7 @@ public: @see IsOpened() */ - bool Eof(); + bool Eof() const; /** Returns @true if an error has occurred on this file, similar to the standard @@ -101,19 +101,19 @@ public: /** Returns the type of the file. Possible return values are: */ - wxFileKind GetKind(); + wxFileKind GetKind() const; /** Returns @true if the file is opened. Most of the methods of this class may only be used for an opened file. */ - bool IsOpened(); + bool IsOpened() const; /** Returns the length of the file. */ - wxFileOffset Length(); + wxFileOffset Length() const; /** Opens the file, returning @true if successful. @@ -175,7 +175,7 @@ public: /** Returns the current position. */ - wxFileOffset Tell(); + wxFileOffset Tell() const; /** ) @@ -188,5 +188,5 @@ public: /** Returns the file pointer associated with the file. */ - FILE* fp(); + FILE* fp() const; }; diff --git a/interface/file.h b/interface/file.h index d019a5a31c..898d0af608 100644 --- a/interface/file.h +++ b/interface/file.h @@ -79,12 +79,12 @@ public: /** Returns @true if the file was successfully opened. */ - bool IsOpened(); + bool IsOpened() const; /** Returns the length of the file. */ - wxFileOffset Length(); + wxFileOffset Length() const; /** Open the temporary file, returns @true on success, @false if an error @@ -107,7 +107,7 @@ public: another error occurred. */ - wxFileOffset Tell(); + wxFileOffset Tell() const; /** Write to the file, return @true on success, @false on failure. @@ -220,7 +220,7 @@ public: Read() repeatedly and tests its return condition instead of using Eof() as this will not work for special files under Unix. */ - bool Eof(); + bool Eof() const; /** Returns @true if the given name specifies an existing regular file (not a @@ -239,17 +239,17 @@ public: /** Returns the type of the file. Possible return values are: */ - wxFileKind GetKind(); + wxFileKind GetKind() const; /** Returns @true if the file has been opened. */ - bool IsOpened(); + bool IsOpened() const; /** Returns the length of the file. */ - wxFileOffset Length(); + wxFileOffset Length() const; /** Opens the file, returning @true if successful. @@ -304,7 +304,7 @@ public: another error occurred. */ - wxFileOffset Tell(); + wxFileOffset Tell() const; /** Writes the contents of the string to the file, returns @true on success. @@ -319,5 +319,5 @@ public: /** Returns the file descriptor associated with the file. */ - int fd(); + int fd() const; }; diff --git a/interface/filectrl.h b/interface/filectrl.h index a24a4822a0..47403cd33c 100644 --- a/interface/filectrl.h +++ b/interface/filectrl.h @@ -93,14 +93,14 @@ public: Returns the current directory of the file control (i.e. the directory shown by it). */ - wxString GetDirectory(); + wxString GetDirectory() const; /** Returns the currently selected filename. For the controls having the @c wxFC_MULTIPLE style, use GetFilenames() instead */ - wxString GetFilename(); + wxString GetFilename() const; /** Fills the array @a filenames with the filenames only of selected items. This @@ -110,19 +110,19 @@ public: @remarks filenames is emptied first. */ - void GetFilenames(wxArrayString& filenames); + void GetFilenames(wxArrayString& filenames) const; /** Returns the zero-based index of the currently selected filter. */ - int GetFilterIndex(); + int GetFilterIndex() const; /** Returns the full path (directory and filename) of the currently selected file. For the controls having the @c wxFC_MULTIPLE style, use GetPaths() instead */ - wxString GetPath(); + wxString GetPath() const; /** Fills the array @a paths with the full paths of the files chosen. This @@ -131,12 +131,12 @@ public: @remarks paths is emptied first. */ - void GetPaths(wxArrayString& paths); + void GetPaths(wxArrayString& paths) const; /** Returns the current wildcard. */ - wxString GetWildcard(); + wxString GetWildcard() const; /** Sets(changes) the current directory displayed in the control. @@ -193,19 +193,19 @@ public: In case of a @b EVT_FILECTRL_FOLDERCHANGED, this method returns the new directory. */ - wxString GetDirectory(); + wxString GetDirectory() const; /** Returns the file selected(assuming it is only one file). */ - wxString GetFile(); + wxString GetFile() const; /** Returns the files selected. In case of a @b EVT_FILECTRL_SELECTIONCHANGED, this method returns the files selected after the event. */ - wxArrayString GetFiles(); + wxArrayString GetFiles() const; /** Sets the files changed by this event. diff --git a/interface/filedlg.h b/interface/filedlg.h index 09d0caae3b..a7ca2bf85a 100644 --- a/interface/filedlg.h +++ b/interface/filedlg.h @@ -90,7 +90,7 @@ public: /** Returns the default directory. */ - wxString GetDirectory(); + wxString GetDirectory() const; /** If functions @@ -98,12 +98,12 @@ public: and ShowModal() were called, returns the extra window. Otherwise returns @NULL. */ - wxWindow* GetExtraControl(); + wxWindow* GetExtraControl() const; /** Returns the default filename. */ - wxString GetFilename(); + wxString GetFilename() const; /** Fills the array @a filenames with the names of the files chosen. This @@ -114,7 +114,7 @@ public: of each referenced file by appending the directory containing the shortcuts to the filename. */ - void GetFilenames(wxArrayString& filenames); + void GetFilenames(wxArrayString& filenames) const; /** Returns the index into the list of filters supplied, optionally, in the @@ -123,29 +123,29 @@ public: dialog is first displayed. After the dialog is shown, this is the index selected by the user. */ - int GetFilterIndex(); + int GetFilterIndex() const; /** Returns the message that will be displayed on the dialog. */ - wxString GetMessage(); + wxString GetMessage() const; /** Returns the full path (directory and filename) of the selected file. */ - wxString GetPath(); + wxString GetPath() const; /** Fills the array @a paths with the full paths of the files chosen. This function should only be used with the dialogs which have @c wxFD_MULTIPLE style, use GetPath() for the others. */ - void GetPaths(wxArrayString& paths); + void GetPaths(wxArrayString& paths) const; /** Returns the file dialog wildcard. */ - wxString GetWildcard(); + wxString GetWildcard() const; /** Sets the default directory. diff --git a/interface/filefn.h b/interface/filefn.h index 9e239fefdc..2b857579f3 100644 --- a/interface/filefn.h +++ b/interface/filefn.h @@ -73,7 +73,7 @@ public: to the value returned wxPathList::FindValidPath) or an empty string. */ - wxString FindAbsoluteValidPath(const wxString& file); + wxString FindAbsoluteValidPath(const wxString& file) const; /** Searches the given file in all paths stored in this class. @@ -92,7 +92,7 @@ public: (see wxGetCwd and wxSetWorkingDirectory) may affect the value returned by this function! */ - wxString FindValidPath(const wxString& file); + wxString FindValidPath(const wxString& file) const; }; diff --git a/interface/filename.h b/interface/filename.h index ed6d6eebd8..87370bb5e3 100644 --- a/interface/filename.h +++ b/interface/filename.h @@ -189,7 +189,7 @@ public: Returns @true if the directory with this name exists. */ bool DirExists(); - static bool DirExists(const wxString& dir); + const static bool DirExists(const wxString& dir); //@} /** @@ -319,7 +319,7 @@ public: @see DirExists() */ bool FileExists(); - static bool FileExists(const wxString& file); + const static bool FileExists(const wxString& file); //@} /** @@ -344,17 +344,17 @@ public: /** Returns the number of directories in the file name. */ - size_t GetDirCount(); + size_t GetDirCount() const; /** Returns the directories in string array form. */ - const wxArrayString GetDirs(); + const wxArrayString GetDirs() const; /** Returns the file name extension. */ - wxString GetExt(); + wxString GetExt() const; /** Returns the characters that can't be used in filenames and directory names for @@ -370,12 +370,12 @@ public: /** Returns the full name (including extension but excluding directories). */ - wxString GetFullName(); + wxString GetFullName() const; /** Returns the full path with name and extension. */ - wxString GetFullPath(wxPathFormat format = wxPATH_NATIVE); + wxString GetFullPath(wxPathFormat format = wxPATH_NATIVE) const; /** Returns the home directory. @@ -398,27 +398,27 @@ public: */ wxString GetHumanReadableSize(const wxString& failmsg = "Not available", int precision = 1); - static wxString GetHumanReadableSize(const wxULongLong& bytes, - const wxString& nullsize = "Not available", - int precision = 1); + const static wxString GetHumanReadableSize(const wxULongLong& bytes, + const wxString& nullsize = "Not available", + int precision = 1); //@} /** Return the long form of the path (returns identity on non-Windows platforms) */ - wxString GetLongPath(); + wxString GetLongPath() const; /** Returns the last time the file was last modified. */ - wxDateTime GetModificationTime(); + wxDateTime GetModificationTime() const; /** Returns the name part of the filename (without extension). @see GetFullName() */ - wxString GetName(); + wxString GetName() const; /** Returns the path part of the filename (without the name or extension). The @@ -437,7 +437,7 @@ public: the path. */ wxString GetPath(int flags = wxPATH_GET_VOLUME, - wxPathFormat format = wxPATH_NATIVE); + wxPathFormat format = wxPATH_NATIVE) const; /** Returns the usually used path separator for this format. For all formats but @@ -472,12 +472,12 @@ public: This is the same as calling GetPath() @c (wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, format). */ - wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE); + wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE) const; /** Return the short form of the path (returns identity on non-Windows platforms). */ - wxString GetShortPath(); + wxString GetShortPath() const; //@{ /** @@ -488,7 +488,7 @@ public: by another process) the returned value is @c wxInvalidSize. */ wxULongLong GetSize(); - static wxULongLong GetSize(const wxString& filename); + const static wxULongLong GetSize(const wxString& filename); //@} /** @@ -515,14 +515,14 @@ public: @returns @true on success, @false if we failed to retrieve the times. */ bool GetTimes(wxDateTime* dtAccess, wxDateTime* dtMod, - wxDateTime* dtCreate); + wxDateTime* dtCreate) const; /** Returns the string containing the volume for this file name, empty if it doesn't have one or if the file system doesn't support volumes at all (for example, Unix). */ - wxString GetVolume(); + wxString GetVolume() const; /** Returns the string separating the volume from the path for this format. @@ -532,17 +532,17 @@ public: /** Returns @true if an extension is present. */ - bool HasExt(); + bool HasExt() const; /** Returns @true if a name is present. */ - bool HasName(); + bool HasName() const; /** Returns @true if a volume specifier is present. */ - bool HasVolume(); + bool HasVolume() const; /** Inserts a directory component before the zero-based position in the directory @@ -567,7 +567,7 @@ public: DirExists() or FileExists() for this. */ - bool IsDir(); + bool IsDir() const; //@{ /** @@ -578,7 +578,7 @@ public: doesn't imply that you have read permissions on the files contained. */ bool IsDirReadable(); - static bool IsDirReadable(const wxString& dir); + const static bool IsDirReadable(const wxString& dir); //@} //@{ @@ -589,7 +589,7 @@ public: directory. */ bool IsDirWritable(); - static bool IsDirWritable(const wxString& dir); + const static bool IsDirWritable(const wxString& dir); //@} //@{ @@ -598,7 +598,7 @@ public: permissions on it. */ bool IsFileExecutable(); - static bool IsFileExecutable(const wxString& file); + const static bool IsFileExecutable(const wxString& file); //@} //@{ @@ -607,7 +607,7 @@ public: permissions on it. */ bool IsFileReadable(); - static bool IsFileReadable(const wxString& file); + const static bool IsFileReadable(const wxString& file); //@} //@{ @@ -616,7 +616,7 @@ public: permissions on it. */ bool IsFileWritable(); - static bool IsFileWritable(const wxString& file); + const static bool IsFileWritable(const wxString& file); //@} /** @@ -625,7 +625,7 @@ public: Clear() may reset the object to the uninitialized, invalid state (the former only do it on failure). */ - bool IsOk(); + bool IsOk() const; /** Returns @true if the char is a path separator for this format. @@ -871,7 +871,7 @@ public: Compares the filename using the rules of this platform. */ bool SameAs(const wxFileName& filepath, - wxPathFormat format = wxPATH_NATIVE); + wxPathFormat format = wxPATH_NATIVE) const; //@{ /** @@ -981,8 +981,8 @@ public: Returns @true if the filenames are different. The string @e filenames is interpreted as a path in the native filename format. */ - bool operator operator!=(const wxFileName& filename); - bool operator operator!=(const wxString& filename); + bool operator operator!=(const wxFileName& filename) const; + const bool operator operator!=(const wxString& filename) const; //@} //@{ @@ -998,7 +998,7 @@ public: Returns @true if the filenames are equal. The string @e filenames is interpreted as a path in the native filename format. */ - bool operator operator==(const wxFileName& filename); - bool operator operator==(const wxString& filename); + bool operator operator==(const wxFileName& filename) const; + const bool operator operator==(const wxString& filename) const; //@} }; diff --git a/interface/filepicker.h b/interface/filepicker.h index fdca7c023f..7f749aacaf 100644 --- a/interface/filepicker.h +++ b/interface/filepicker.h @@ -106,12 +106,12 @@ public: Similar to GetPath() but returns the path of the currently selected file as a wxFileName object. */ - wxFileName GetFileName(); + wxFileName GetFileName() const; /** Returns the absolute path of the currently selected file. */ - wxString GetPath(); + wxString GetPath() const; /** This method does the same thing as SetPath() but @@ -220,12 +220,12 @@ public: object. This function is equivalent to GetPath() */ - wxFileName GetDirName(); + wxFileName GetDirName() const; /** Returns the absolute path of the currently selected directory. */ - wxString GetPath(); + wxString GetPath() const; /** Just like SetPath() but this function takes a @@ -268,7 +268,7 @@ public: /** Retrieve the absolute path of the file/directory the user has just selected. */ - wxString GetPath(); + wxString GetPath() const; /** Set the absolute path of the file/directory associated with the event. diff --git a/interface/filesys.h b/interface/filesys.h index d56f823cd3..2367b97f0e 100644 --- a/interface/filesys.h +++ b/interface/filesys.h @@ -184,25 +184,25 @@ public: for example myanim.avi#200 may refer to position in animation or reality.wrl#MyView may refer to a predefined view in VRML. */ - const wxString GetAnchor(); + const wxString GetAnchor() const; /** Returns full location of the file, including path and protocol. Examples : */ - const wxString GetLocation(); + const wxString GetLocation() const; /** Returns the MIME type of the content of this file. It is either extension-based (see wxMimeTypesManager) or extracted from HTTP protocol Content-Type header. */ - const wxString GetMimeType(); + const wxString GetMimeType() const; /** Returns time when this file was modified. */ - wxDateTime GetModificationTime(); + wxDateTime GetModificationTime() const; /** Returns pointer to the stream. You can use the returned @@ -212,7 +212,7 @@ public: this by default. wxHtml uses local cache to work around this and to speed up the connection). */ - wxInputStream* GetStream(); + wxInputStream* GetStream() const; }; @@ -282,14 +282,14 @@ public: Example: GetAnchor("index.htm#chapter2") == "chapter2" @b Note: the anchor is NOT part of the left location. */ - wxString GetAnchor(const wxString& location); + wxString GetAnchor(const wxString& location) const; /** Returns the left location string extracted from @e location. Example: GetLeftLocation("file:myzipfile.zip#zip:index.htm") == "file:myzipfile.zip" */ - wxString GetLeftLocation(const wxString& location); + wxString GetLeftLocation(const wxString& location) const; /** Returns the MIME type based on @b extension of @e location. (While @@ -303,13 +303,13 @@ public: Returns the protocol string extracted from @e location. Example: GetProtocol("file:myzipfile.zip#zip:index.htm") == "zip" */ - wxString GetProtocol(const wxString& location); + wxString GetProtocol(const wxString& location) const; /** Returns the right location string extracted from @e location. Example : GetRightLocation("file:myzipfile.zip#zip:index.htm") == "index.htm" */ - wxString GetRightLocation(const wxString& location); + wxString GetRightLocation(const wxString& location) const; /** Opens the file and returns wxFSFile pointer or @NULL if failed. diff --git a/interface/font.h b/interface/font.h index b2dd00387a..1e3f2fe6a7 100644 --- a/interface/font.h +++ b/interface/font.h @@ -303,7 +303,7 @@ public: @see SetFaceName() */ - wxString GetFaceName(); + wxString GetFaceName() const; /** Gets the font family. See SetFamily() for a list of valid @@ -311,7 +311,7 @@ public: @see SetFamily() */ - wxFontFamily GetFamily(); + wxFontFamily GetFamily() const; /** Returns the platform-dependent string completely describing this font. @@ -322,7 +322,7 @@ public: @see SetNativeFontInfo(),GetNativeFontInfoUserDesc() */ - wxString GetNativeFontInfoDesc(); + wxString GetNativeFontInfoDesc() const; /** Returns a user-friendly string for this font object. Returned string is always @@ -339,7 +339,7 @@ public: @see SetPointSize() */ - int GetPointSize(); + int GetPointSize() const; /** Gets the font style. See wxFont() for a list of valid @@ -347,14 +347,14 @@ public: @see SetStyle() */ - int GetStyle(); + int GetStyle() const; /** Returns @true if the font is underlined, @false otherwise. @see SetUnderlined() */ - bool GetUnderlined(); + bool GetUnderlined() const; /** Gets the font weight. See wxFont() for a list of valid @@ -362,18 +362,18 @@ public: @see SetWeight() */ - wxFontWeight GetWeight(); + wxFontWeight GetWeight() const; /** Returns @true if the font is a fixed width (or monospaced) font, @false if it is a proportional one or font is invalid. */ - bool IsFixedWidth(); + bool IsFixedWidth() const; /** Returns @true if this object is a valid font, @false otherwise. */ - bool IsOk(); + bool IsOk() const; //@{ /** diff --git a/interface/fontdlg.h b/interface/fontdlg.h index fc253cca55..5b8dcedfd4 100644 --- a/interface/fontdlg.h +++ b/interface/fontdlg.h @@ -50,7 +50,7 @@ public: dialog. */ const wxFontData GetFontData(); - wxFontData GetFontData(); + const wxFontData& GetFontData(); //@} /** diff --git a/interface/fontpicker.h b/interface/fontpicker.h index 3f278aad57..5d1313bb36 100644 --- a/interface/fontpicker.h +++ b/interface/fontpicker.h @@ -91,13 +91,13 @@ public: /** Returns the maximum point size value allowed for the user-chosen font. */ - unsigned int GetMaxPointSize(); + unsigned int GetMaxPointSize() const; /** Returns the currently selected font. Note that this function is completely different from wxWindow::GetFont. */ - wxFont GetSelectedFont(); + wxFont GetSelectedFont() const; /** Sets the maximum point size value allowed for the user-chosen font. @@ -144,7 +144,7 @@ public: /** Retrieve the font the user has just selected. */ - wxFont GetFont(); + wxFont GetFont() const; /** Set the font associated with the event. diff --git a/interface/frame.h b/interface/frame.h index 1ade0d6b38..44c7104feb 100644 --- a/interface/frame.h +++ b/interface/frame.h @@ -214,14 +214,14 @@ public: Returns the origin of the frame client area (in client coordinates). It may be different from (0, 0) if the frame has a toolbar. */ - wxPoint GetClientAreaOrigin(); + wxPoint GetClientAreaOrigin() const; /** Returns a pointer to the menubar currently associated with the frame (if any). @see SetMenuBar(), wxMenuBar, wxMenu */ - wxMenuBar* GetMenuBar(); + wxMenuBar* GetMenuBar() const; /** Returns a pointer to the status bar currently associated with the frame (if @@ -229,7 +229,7 @@ public: @see CreateStatusBar(), wxStatusBar */ - wxStatusBar* GetStatusBar(); + wxStatusBar* GetStatusBar() const; /** Returns the status bar pane used to display menu and toolbar help. @@ -243,7 +243,7 @@ public: @see CreateToolBar(), wxToolBar, SetToolBar() */ - wxToolBar* GetToolBar(); + wxToolBar* GetToolBar() const; /** Virtual function called when a status bar is requested by CreateStatusBar(). diff --git a/interface/gauge.h b/interface/gauge.h index b9a3fd1cb4..eeb2ce7a60 100644 --- a/interface/gauge.h +++ b/interface/gauge.h @@ -100,14 +100,14 @@ public: @see SetBezelFace() */ - int GetBezelFace(); + int GetBezelFace() const; /** Returns the maximum position of the gauge. @see SetRange() */ - int GetRange(); + int GetRange() const; /** Returns the 3D shadow margin width. @@ -116,20 +116,20 @@ public: @see SetShadowWidth() */ - int GetShadowWidth(); + int GetShadowWidth() const; /** Returns the current position of the gauge. @see SetValue() */ - int GetValue(); + int GetValue() const; /** Returns @true if the gauge is vertical (has @c wxGA_VERTICAL style) and @false otherwise. */ - bool IsVertical(); + bool IsVertical() const; /** Switch the gauge to indeterminate mode (if required) and makes the gauge move diff --git a/interface/gbsizer.h b/interface/gbsizer.h index 7c41951596..e9ea8f5ef8 100644 --- a/interface/gbsizer.h +++ b/interface/gbsizer.h @@ -31,12 +31,12 @@ public: /** Get the current column value. */ - int GetCol(); + int GetCol() const; /** Get the current row value. */ - int GetRow(); + int GetRow() const; /** Set a new column value. @@ -51,12 +51,12 @@ public: /** Is the wxGBPosition valid? (An invalid wxGBPosition is (-1,-1). ) */ - bool operator!(const wxGBPosition& p); + bool operator!(const wxGBPosition& p) const; /** Compare equality of two wxGBPositions. */ - bool operator operator==(const wxGBPosition& p); + bool operator operator==(const wxGBPosition& p) const; }; @@ -160,12 +160,12 @@ public: Get the size of the specified cell, including hgap and vgap. Only valid after a Layout. */ - wxSize GetCellSize(int row, int col); + wxSize GetCellSize(int row, int col) const; /** Get the size used for cells in the grid with no item. */ - wxSize GetEmptyCellSize(); + wxSize GetEmptyCellSize() const; //@{ /** @@ -265,16 +265,16 @@ public: /** Get the grid position of the item. */ - wxGBPosition GetPos(); - void GetPos(int& row, int& col); + wxGBPosition GetPos() const; + const void GetPos(int& row, int& col) const; //@} //@{ /** Get the row and column spanning of the item. */ - wxGBSpan GetSpan(); - void GetSpan(int& rowspan, int& colspan); + wxGBSpan GetSpan() const; + const void GetSpan(int& rowspan, int& colspan) const; //@} //@{ @@ -330,12 +330,12 @@ public: /** Get the current colspan value. */ - int GetColspan(); + int GetColspan() const; /** Get the current rowspan value. */ - int GetRowspan(); + int GetRowspan() const; /** Set a new colspan value. @@ -350,10 +350,10 @@ public: /** Is the wxGBSpan valid? (An invalid wxGBSpan is (-1,-1). ) */ - bool operator!(const wxGBSpan& o); + bool operator!(const wxGBSpan& o) const; /** Compare equality of two wxGBSpans. */ - bool operator operator==(const wxGBSpan& o); + bool operator operator==(const wxGBSpan& o) const; }; diff --git a/interface/gdicmn.h b/interface/gdicmn.h index 3c7c4832af..8d05fbffaa 100644 --- a/interface/gdicmn.h +++ b/interface/gdicmn.h @@ -70,8 +70,8 @@ public: @c wxHORIZONTAL flag, then it is only centered in this direction while the other component of its position remains unchanged. */ - wxRect CentreIn(const wxRect& r, int dir = wxBOTH); - wxRect CenterIn(const wxRect& r, int dir = wxBOTH); + wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const; + const wxRect CenterIn(const wxRect& r, int dir = wxBOTH) const; //@} //@{ @@ -79,9 +79,9 @@ public: Returns @true if the given rectangle is completely inside this rectangle (or touches its boundary) and @false otherwise. */ - bool Contains(int x, int y); - bool Contains(const wxPoint& pt); - bool Contains(const wxRect& rect); + bool Contains(int x, int y) const; + const bool Contains(const wxPoint& pt) const; + const bool Contains(const wxRect& rect) const; //@} //@{ @@ -93,84 +93,84 @@ public: @see Inflate() */ - void Deflate(wxCoord dx, wxCoord dy); - void Deflate(const wxSize& diff); - void Deflate(wxCoord diff); - wxRect Deflate(wxCoord dx, wxCoord dy); + void Deflate(wxCoord dx, wxCoord dy) const; + void Deflate(const wxSize& diff) const; + void Deflate(wxCoord diff) const; + wxRect Deflate(wxCoord dx, wxCoord dy) const; //@} /** Gets the bottom point of the rectangle. */ - int GetBottom(); + int GetBottom() const; /** Gets the position of the bottom left corner. */ - wxPoint GetBottomLeft(); + wxPoint GetBottomLeft() const; /** Gets the position of the bottom right corner. */ - wxPoint GetBottomRight(); + wxPoint GetBottomRight() const; /** Gets the height member. */ - int GetHeight(); + int GetHeight() const; /** Gets the left point of the rectangle (the same as wxRect::GetX). */ - int GetLeft(); + int GetLeft() const; /** Gets the position. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; /** Gets the right point of the rectangle. */ - int GetRight(); + int GetRight() const; /** Gets the size. @see SetSize() */ - wxSize GetSize(); + wxSize GetSize() const; /** Gets the top point of the rectangle (the same as wxRect::GetY). */ - int GetTop(); + int GetTop() const; /** Gets the position of the top left corner of the rectangle, same as GetPosition(). */ - wxPoint GetTopLeft(); + wxPoint GetTopLeft() const; /** Gets the position of the top right corner. */ - wxPoint GetTopRight(); + wxPoint GetTopRight() const; /** Gets the width member. */ - int GetWidth(); + int GetWidth() const; /** Gets the x member. */ - int GetX(); + int GetX() const; /** Gets the y member. */ - int GetY(); + int GetY() const; //@{ /** @@ -202,10 +202,10 @@ public: @see Deflate() */ - void Inflate(wxCoord dx, wxCoord dy); - void Inflate(const wxSize& diff); - void Inflate(wxCoord diff); - wxRect Inflate(wxCoord dx, wxCoord dy); + void Inflate(wxCoord dx, wxCoord dy) const; + void Inflate(const wxSize& diff) const; + void Inflate(wxCoord diff) const; + wxRect Inflate(wxCoord dx, wxCoord dy) const; //@} //@{ @@ -215,20 +215,20 @@ public: other one modifies this rectangle in place. */ wxRect Intersect(const wxRect& rect); - wxRect Intersect(const wxRect& rect); + const wxRect& Intersect(const wxRect& rect); //@} /** Returns @true if this rectangle has a non-empty intersection with the rectangle @a rect and @false otherwise. */ - bool Intersects(const wxRect& rect); + bool Intersects(const wxRect& rect) const; /** Returns @true if this rectangle has a width or height less than or equal to 0 and @false otherwise. */ - bool IsEmpty(); + bool IsEmpty() const; //@{ /** @@ -274,7 +274,7 @@ public: other one modifies this rectangle in place. */ wxRect Union(const wxRect& rect); - wxRect Union(const wxRect& rect); + const wxRect& Union(const wxRect& rect); //@} /** @@ -470,7 +470,7 @@ public: Finds a colour name given the colour. Returns an empty string if the colour is not found in the database. */ - wxString FindName(const wxColour& colour); + wxString FindName(const wxColour& colour) const; }; @@ -574,12 +574,12 @@ public: /** Gets the height member. */ - int GetHeight(); + int GetHeight() const; /** Gets the width member. */ - int GetWidth(); + int GetWidth() const; //@{ /** @@ -610,7 +610,7 @@ public: This method is typically used before calling SetDefaults(). */ - bool IsFullySpecified(); + bool IsFullySpecified() const; //@{ /** diff --git a/interface/graphics.h b/interface/graphics.h index 2e784b8724..44c444ac66 100644 --- a/interface/graphics.h +++ b/interface/graphics.h @@ -107,33 +107,33 @@ public: Returns @true if the point is within the path. */ bool Contains(const wxPoint2DDouble& c, - int fillStyle = wxODDEVEN_RULE); - bool Contains(wxDouble x, wxDouble y, - int fillStyle = wxODDEVEN_RULE); + int fillStyle = wxODDEVEN_RULE) const; + const bool Contains(wxDouble x, wxDouble y, + int fillStyle = wxODDEVEN_RULE) const; //@} //@{ /** Gets the bounding box enclosing all points (possibly including control points). */ - wxRect2DDouble GetBox(); - void GetBox(wxDouble* x, wxDouble* y, wxDouble* w, - wxDouble* h); + wxRect2DDouble GetBox() const; + const void GetBox(wxDouble* x, wxDouble* y, wxDouble* w, + wxDouble* h) const; //@} //@{ /** Gets the last point of the current path, (0,0) if not yet set. */ - void GetCurrentPoint(wxDouble* x, wxDouble* y); - wxPoint2DDouble GetCurrentPoint(); + void GetCurrentPoint(wxDouble* x, wxDouble* y) const; + const wxPoint2DDouble GetCurrentPoint() const; //@} /** Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo). */ - void* GetNativePath(); + void* GetNativePath() const; //@{ /** @@ -153,7 +153,7 @@ public: some deallocations necessary (eg on cairo the native path returned by GetNativePath is newly allocated each time). */ - void UnGetNativePath(void* p); + void UnGetNativePath(void* p) const; }; @@ -177,12 +177,12 @@ public: Returns the renderer that was used to create this instance, or @NULL if it has not been initialized yet */ - wxGraphicsRenderer* GetRenderer(); + wxGraphicsRenderer* GetRenderer() const; /** Is this object valid (@false) or still empty (@true)? */ - bool IsNull(); + bool IsNull() const; }; @@ -230,13 +230,13 @@ public: /** Creates a native brush from a wxBrush. */ - wxGraphicsBrush CreateBrush(const wxBrush& brush); + wxGraphicsBrush CreateBrush(const wxBrush& brush) const; /** Creates a native graphics font from a wxFont and a text colour. */ wxGraphicsFont CreateFont(const wxFont& font, - const wxColour& col = wxBLACK); + const wxColour& col = wxBLACK) const; /** Creates a wxGraphicsContext from a native context. This native context must be @@ -263,7 +263,7 @@ public: wxDouble x2, wxDouble y2, const wxColouramp;c1, - const wxColouramp;c2); + const wxColouramp;c2) const; /** Creates a native affine transformation matrix from the passed in values. The @@ -273,17 +273,17 @@ public: wxDouble c = 0.0, wxDouble d = 1.0, wxDouble tx = 0.0, - wxDouble ty = 0.0); + wxDouble ty = 0.0) const; /** Creates a native graphics path which is initially empty. */ - wxGraphicsPath CreatePath(); + wxGraphicsPath CreatePath() const; /** Creates a native pen from a wxPen. */ - wxGraphicsPen CreatePen(const wxPen& pen); + wxGraphicsPen CreatePen(const wxPen& pen) const; /** Creates a native brush, having a radial gradient originating at (xo,yc) with @@ -295,7 +295,7 @@ public: wxDouble yc, wxDouble radius, const wxColour& oColor, - const wxColour& cColor); + const wxColour& cColor) const; /** Draws the bitmap. In case of a mono bitmap, this is treated as a mask and the @@ -366,7 +366,7 @@ public: @a text to the corresponding character of @e text. */ void GetPartialTextExtents(const wxString& text, - wxArrayDouble& widths); + wxArrayDouble& widths) const; /** Gets the dimensions of the string using the currently selected font. @@ -379,12 +379,12 @@ public: void GetTextExtent(const wxString& text, wxDouble* width, wxDouble* height, wxDouble* descent, - wxDouble* externalLeading); + wxDouble* externalLeading) const; /** Gets the current transformation matrix of this context. */ - wxGraphicsMatrix GetTransform(); + wxGraphicsMatrix GetTransform() const; /** Resets the clipping to original shape. @@ -623,13 +623,13 @@ public: */ void Get(wxDouble* a = NULL, wxDouble* b = NULL, wxDouble* c = NULL, wxDouble* d = NULL, wxDouble* tx = NULL, - wxDouble* ty = 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(); + void* GetNativeMatrix() const; /** Inverts the matrix. @@ -639,12 +639,12 @@ public: /** Returns @true if the elements of the transformation matrix are equal. */ - bool IsEqual(const wxGraphicsMatrix& t); + bool IsEqual(const wxGraphicsMatrix& t) const; /** Return @true if this is the identity matrix. */ - bool IsIdentity(); + bool IsIdentity() const; /** Rotates this matrix (radians). @@ -668,12 +668,12 @@ public: Applies this matrix to a distance (ie. performs all transforms except translations) */ - void TransformDistance(wxDouble* dx, wxDouble* dy); + void TransformDistance(wxDouble* dx, wxDouble* dy) const; /** Applies this matrix to a point. */ - void TransformPoint(wxDouble* x, wxDouble* y); + void TransformPoint(wxDouble* x, wxDouble* y) const; /** Translates this matrix. diff --git a/interface/grid.h b/interface/grid.h index d10b3ebf9c..61227206f7 100644 --- a/interface/grid.h +++ b/interface/grid.h @@ -33,12 +33,12 @@ public: /** Returns the precision ( see @ref constr() wxGridCellFloatRenderer ). */ - int GetPrecision(); + int GetPrecision() const; /** Returns the width ( see @ref constr() wxGridCellFloatRenderer ). */ - int GetWidth(); + int GetWidth() const; /** Parameters string format is "width[,precision]". @@ -129,7 +129,7 @@ public: /** get the currently used attr provider (may be @NULL) */ - wxGridCellAttrProvider* GetAttrProvider(); + wxGridCellAttrProvider* GetAttrProvider() const; /** @@ -185,7 +185,7 @@ public: /** */ - wxGrid* GetView(); + wxGrid* GetView() const; /** @@ -219,9 +219,9 @@ public: void SetColAttr(wxGridCellAttr* attr, int col); /** - , @b const@e wxString) + , @e wxString) */ - void SetColLabelValue(); + void SetColLabelValue() const; /** @@ -229,9 +229,9 @@ public: void SetRowAttr(wxGridCellAttr* attr, int row); /** - , @b const@e wxString) + , @e wxString) */ - void SetRowLabelValue(); + void SetRowLabelValue() const; /** @@ -315,7 +315,7 @@ public: /** Create a new object which is the copy of this one. */ - wxGridCellEditor* Clone(); + wxGridCellEditor* Clone() const; /** Creates the actual edit control. @@ -638,7 +638,7 @@ public: /** */ - wxGridCellRenderer* Clone(); + wxGridCellRenderer* Clone() const; /** Draw the given cell on the provided DC inside the given rectangle @@ -685,13 +685,13 @@ public: /** String representation of the value. */ - wxString GetString(); + wxString GetString() const; /** If the return value is @true, the editor uses a wxSpinCtrl to get user input, otherwise it uses a wxTextCtrl. */ - bool HasRange(); + bool HasRange() const; /** Parameters string format is "min,max". @@ -810,7 +810,7 @@ public: /** Creates a new copy of this object. */ - wxGridCellAttr* Clone(); + wxGridCellAttr* Clone() const; /** @@ -820,62 +820,62 @@ public: /** See SetAlignment() for the returned values. */ - void GetAlignment(int* hAlign, int* vAlign); + void GetAlignment(int* hAlign, int* vAlign) const; /** */ - const wxColour GetBackgroundColour(); + const wxColour GetBackgroundColour() const; /** */ - wxGridCellEditor* GetEditor(wxGrid* grid, int row, int col); + wxGridCellEditor* GetEditor(wxGrid* grid, int row, int col) const; /** */ - const wxFont GetFont(); + const wxFont GetFont() const; /** */ - wxGridCellRenderer* GetRenderer(wxGrid* grid, int row, int col); + wxGridCellRenderer* GetRenderer(wxGrid* grid, int row, int col) const; /** */ - const wxColour GetTextColour(); + const wxColour GetTextColour() const; /** */ - bool HasAlignment(); + bool HasAlignment() const; /** */ - bool HasBackgroundColour(); + bool HasBackgroundColour() const; /** */ - bool HasEditor(); + bool HasEditor() const; /** */ - bool HasFont(); + bool HasFont() const; /** */ - bool HasRenderer(); + bool HasRenderer() const; /** accessors */ - bool HasTextColour(); + bool HasTextColour() const; /** This class is ref counted: it is created with ref count of 1, so @@ -887,7 +887,7 @@ public: /** */ - bool IsReadOnly(); + bool IsReadOnly() const; /** Sets the alignment. @a hAlign can be one of @c wxALIGN_LEFT, @@ -1242,14 +1242,14 @@ public: to the client size of the grid window. */ wxRect BlockToDeviceRect(const wxGridCellCoords& topLeft, - const wxGridCellCoords& bottomRight); + const wxGridCellCoords& bottomRight) const; /** Returns @true if columns can be moved by dragging with the mouse. Columns can be moved by dragging on their labels. */ - bool CanDragColMove(); + bool CanDragColMove() const; /** Returns @true if columns can be resized by dragging with the mouse. Columns can @@ -1259,13 +1259,13 @@ public: resized by dragging the right edge of the column in the grid cell area (see wxGrid::EnableDragGridSize). */ - bool CanDragColSize(); + bool CanDragColSize() const; /** Return @true if the dragging of grid lines to resize rows and columns is enabled or @false otherwise. */ - bool CanDragGridSize(); + bool CanDragGridSize() const; /** Returns @true if rows can be resized by dragging with the mouse. Rows can be @@ -1275,19 +1275,19 @@ public: resized by dragging the lower edge of the row in the grid cell area (see wxGrid::EnableDragGridSize). */ - bool CanDragRowSize(); + bool CanDragRowSize() const; /** Returns @true if the in-place edit control for the current grid cell can be used and @false otherwise (e.g. if the current cell is read-only). */ - bool CanEnableCellControl(); + bool CanEnableCellControl() const; /** Do we have some place to store attributes in? */ - bool CanHaveAttributes(); + bool CanHaveAttributes() const; /** EnableDragRowSize() @@ -1324,8 +1324,8 @@ public: logical coordinates. */ - wxRect CellToRect(int row, int col); - wxRect CellToRect(const wxGridCellCoords& coords); + wxRect CellToRect(int row, int col) const; + const wxRect CellToRect(const wxGridCellCoords& coords) const; //@} /** @@ -1521,7 +1521,7 @@ public: without (yet) matching calls to EndBatch(). While the grid's batch count is greater than zero the display will not be updated. */ - int GetBatchCount(); + int GetBatchCount() const; /** Sets the arguments to the horizontal and vertical text alignment values for the @@ -1531,12 +1531,12 @@ public: Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. */ - void GetCellAlignment(int row, int col, int* horiz, int* vert); + void GetCellAlignment(int row, int col, int* horiz, int* vert) const; /** Returns the background colour of the cell at the specified location. */ - wxColour GetCellBackgroundColour(int row, int col); + wxColour GetCellBackgroundColour(int row, int col) const; /** Returns a pointer to the editor for the cell at the specified location. @@ -1544,12 +1544,12 @@ public: the @ref overview_gridoverview "wxGrid overview" for more information about cell editors and renderers. */ - wxGridCellEditor* GetCellEditor(int row, int col); + wxGridCellEditor* GetCellEditor(int row, int col) const; /** Returns the font for text in the grid cell at the specified location. */ - wxFont GetCellFont(int row, int col); + wxFont GetCellFont(int row, int col) const; /** Returns a pointer to the renderer for the grid cell at the specified location. @@ -1557,12 +1557,12 @@ public: the @ref overview_gridoverview "wxGrid overview" for more information about cell editors and renderers. */ - wxGridCellRenderer* GetCellRenderer(int row, int col); + wxGridCellRenderer* GetCellRenderer(int row, int col) const; /** Returns the text colour for the grid cell at the specified location. */ - wxColour GetCellTextColour(int row, int col); + wxColour GetCellTextColour(int row, int col) const; //@{ /** @@ -1579,14 +1579,14 @@ public: See wxGridTableBase::CanGetValueAs and the @ref overview_gridoverview "wxGrid overview" for more information. */ - wxString GetCellValue(int row, int col); - wxString GetCellValue(const wxGridCellCoords& coords); + wxString GetCellValue(int row, int col) const; + const wxString GetCellValue(const wxGridCellCoords& coords) const; //@} /** Returns the column ID of the specified column position. */ - int GetColAt(int colPos); + int GetColAt(int colPos) const; /** Returns the pen used for vertical grid lines. This virtual function may be @@ -1603,12 +1603,12 @@ public: Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. */ - void GetColLabelAlignment(int* horiz, int* vert); + void GetColLabelAlignment(int* horiz, int* vert) const; /** Returns the current height of the column labels. */ - int GetColLabelSize(); + int GetColLabelSize() const; /** Returns the specified column label. The default grid table class provides @@ -1618,39 +1618,39 @@ public: wxGridTableBase::GetColLabelValue to provide your own labels. */ - wxString GetColLabelValue(int col); + wxString GetColLabelValue(int col) const; /** */ - int GetColLeft(int col); + int GetColLeft(int col) const; /** This returns the value of the lowest column width that can be handled correctly. See member SetColMinimalAcceptableWidth() for details. */ - int GetColMinimalAcceptableWidth(); + int GetColMinimalAcceptableWidth() const; /** Get the minimal width of the given column/row. */ - int GetColMinimalWidth(int col); + int GetColMinimalWidth(int col) const; /** Returns the position of the specified column. */ - int GetColPos(int colID); + int GetColPos(int colID) const; /** */ - int GetColRight(int col); + int GetColRight(int col) const; /** Returns the width of the specified column. */ - int GetColSize(int col); + int GetColSize(int col) const; /** Sets the arguments to the current default horizontal and vertical text alignment @@ -1660,32 +1660,32 @@ public: Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. */ - void GetDefaultCellAlignment(int* horiz, int* vert); + void GetDefaultCellAlignment(int* horiz, int* vert) const; /** Returns the current default background colour for grid cells. */ - wxColour GetDefaultCellBackgroundColour(); + wxColour GetDefaultCellBackgroundColour() const; /** Returns the current default font for grid cell text. */ - wxFont GetDefaultCellFont(); + wxFont GetDefaultCellFont() const; /** Returns the current default colour for grid cell text. */ - wxColour GetDefaultCellTextColour(); + wxColour GetDefaultCellTextColour() const; /** Returns the default height for column labels. */ - int GetDefaultColLabelSize(); + int GetDefaultColLabelSize() const; /** Returns the current default width for grid columns. */ - int GetDefaultColSize(); + int GetDefaultColSize() const; /** Returns a pointer to the current default grid cell editor. @@ -1693,20 +1693,20 @@ public: the @ref overview_gridoverview "wxGrid overview" for more information about cell editors and renderers. */ - wxGridCellEditor* GetDefaultEditor(); + wxGridCellEditor* GetDefaultEditor() const; //@{ /** */ - wxGridCellEditor* GetDefaultEditorForCell(int row, int col); - wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c); + wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const; + const wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const; //@} /** */ - wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName); + wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const; /** Returns the pen used for grid lines. This virtual function may be overridden in @@ -1723,77 +1723,77 @@ public: the @ref overview_gridoverview "wxGrid overview" for more information about cell editors and renderers. */ - wxGridCellRenderer* GetDefaultRenderer(); + wxGridCellRenderer* GetDefaultRenderer() const; /** */ - wxGridCellRenderer* GetDefaultRendererForCell(int row, int col); + wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const; /** */ - wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName); + wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const; /** Returns the default width for the row labels. */ - int GetDefaultRowLabelSize(); + int GetDefaultRowLabelSize() const; /** Returns the current default height for grid rows. */ - int GetDefaultRowSize(); + int GetDefaultRowSize() const; /** Returns the current grid cell column position. */ - int GetGridCursorCol(); + int GetGridCursorCol() const; /** Returns the current grid cell row position. */ - int GetGridCursorRow(); + int GetGridCursorRow() const; /** Returns the colour used for grid lines. @see GetDefaultGridLinePen() */ - wxColour GetGridLineColour(); + wxColour GetGridLineColour() const; /** Returns the colour used for the background of row and column labels. */ - wxColour GetLabelBackgroundColour(); + wxColour GetLabelBackgroundColour() const; /** Returns the font used for row and column labels. */ - wxFont GetLabelFont(); + wxFont GetLabelFont() const; /** Returns the colour used for row and column label text. */ - wxColour GetLabelTextColour(); + wxColour GetLabelTextColour() const; /** Returns the total number of grid columns (actually the number of columns in the underlying grid table). */ - int GetNumberCols(); + int GetNumberCols() const; /** Returns the total number of grid rows (actually the number of rows in the underlying grid table). */ - int GetNumberRows(); + int GetNumberRows() const; /** */ - wxGridCellAttr* GetOrCreateCellAttr(int row, int col); + wxGridCellAttr* GetOrCreateCellAttr(int row, int col) const; /** Returns the pen used for horizontal grid lines. This virtual function may be @@ -1809,12 +1809,12 @@ public: Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM. */ - void GetRowLabelAlignment(int* horiz, int* vert); + void GetRowLabelAlignment(int* horiz, int* vert) const; /** Returns the current width of the row labels. */ - int GetRowLabelSize(); + int GetRowLabelSize() const; /** Returns the specified row label. The default grid table class provides numeric @@ -1823,90 +1823,90 @@ public: wxGridTableBase::GetRowLabelValue to provide your own labels. */ - wxString GetRowLabelValue(int row); + wxString GetRowLabelValue(int row) const; /** This returns the value of the lowest row width that can be handled correctly. See member SetRowMinimalAcceptableHeight() for details. */ - int GetRowMinimalAcceptableHeight(); + int GetRowMinimalAcceptableHeight() const; /** */ - int GetRowMinimalHeight(int col); + int GetRowMinimalHeight(int col) const; /** Returns the height of the specified row. */ - int GetRowSize(int row); + int GetRowSize(int row) const; /** Returns the number of pixels per horizontal scroll increment. The default is 15. @see GetScrollLineY(), SetScrollLineX(), SetScrollLineY() */ - int GetScrollLineX(); + int GetScrollLineX() const; /** Returns the number of pixels per vertical scroll increment. The default is 15. @see GetScrollLineX(), SetScrollLineX(), SetScrollLineY() */ - int GetScrollLineY(); + int GetScrollLineY() const; /** Returns an array of singly selected cells. */ - wxGridCellCoordsArray GetSelectedCells(); + wxGridCellCoordsArray GetSelectedCells() const; /** Returns an array of selected cols. */ - wxArrayInt GetSelectedCols(); + wxArrayInt GetSelectedCols() const; /** Returns an array of selected rows. */ - wxArrayInt GetSelectedRows(); + wxArrayInt GetSelectedRows() const; /** Access or update the selection fore/back colours */ - wxColour GetSelectionBackground(); + wxColour GetSelectionBackground() const; /** Returns an array of the bottom right corners of blocks of selected cells, see GetSelectionBlockTopLeft(). */ - wxGridCellCoordsArray GetSelectionBlockBottomRight(); + wxGridCellCoordsArray GetSelectionBlockBottomRight() const; /** Returns an array of the top left corners of blocks of selected cells, see GetSelectionBlockBottomRight(). */ - wxGridCellCoordsArray GetSelectionBlockTopLeft(); + wxGridCellCoordsArray GetSelectionBlockTopLeft() const; /** */ - wxColour GetSelectionForeground(); + wxColour GetSelectionForeground() const; /** Returns the current selection mode, see SetSelectionMode(). */ - wxGrid::wxGridSelectionModes GetSelectionMode(); + wxGrid::wxGridSelectionModes GetSelectionMode() const; /** Returns a base pointer to the current table object. */ - wxGridTableBase* GetTable(); + wxGridTableBase* GetTable() const; /** Returned number of whole cols visible. */ - int GetViewWidth(); + int GetViewWidth() const; /** EnableGridLines() @@ -1928,7 +1928,7 @@ public: /** Returns @true if drawing of grid lines is turned on, @false otherwise. */ - bool GridLinesEnabled(); + bool GridLinesEnabled() const; /** Hides the in-place cell edit control. @@ -2002,39 +2002,39 @@ public: /** Returns @true if the in-place edit control is currently enabled. */ - bool IsCellEditControlEnabled(); + bool IsCellEditControlEnabled() const; /** Returns @true if the current cell has been set to read-only (see wxGrid::SetReadOnly). */ - bool IsCurrentCellReadOnly(); + bool IsCurrentCellReadOnly() const; /** Returns @false if the whole grid has been set as read-only or @true otherwise. See EnableEditing() for more information about controlling the editing status of grid cells. */ - bool IsEditable(); + bool IsEditable() const; //@{ /** Is this cell currently selected. */ - bool IsInSelection(int row, int col); - bool IsInSelection(const wxGridCellCoords& coords); + bool IsInSelection(int row, int col) const; + const bool IsInSelection(const wxGridCellCoords& coords) const; //@} /** Returns @true if the cell at the specified location can't be edited. See also IsReadOnly(). */ - bool IsReadOnly(int row, int col); + bool IsReadOnly(int row, int col) const; /** Returns @true if there are currently rows, columns or blocks of cells selected. */ - bool IsSelection(); + bool IsSelection() const; //@{ /** @@ -2042,9 +2042,9 @@ public: partially visible in the grid window. */ - bool IsVisible(int row, int col, bool wholeCellVisible = true); - bool IsVisible(const wxGridCellCoords& coords, - bool wholeCellVisible = true); + bool IsVisible(int row, int col, bool wholeCellVisible = true) const; + const bool IsVisible(const wxGridCellCoords& coords, + bool wholeCellVisible = true) const; //@} //@{ @@ -2261,7 +2261,7 @@ public: This function returns the rectangle that encloses the selected cells in device coords and clipped to the client size of the grid window. */ - wxRect SelectionToDeviceRect(); + wxRect SelectionToDeviceRect() const; //@{ /** @@ -2685,26 +2685,26 @@ public: If @true, rather than returning wxNOT_FOUND, it returns either the first or last column depending on whether x is too far to the left or right respectively. */ - int XToCol(int x, bool clipToMinMax = false); + int XToCol(int x, bool clipToMinMax = false) const; /** Returns the column whose right hand edge is close to the given logical x position. If no column edge is near to this position @c wxNOT_FOUND is returned. */ - int XToEdgeOfCol(int x); + int XToEdgeOfCol(int x) const; /** Returns the row whose bottom edge is close to the given logical y position. If no row edge is near to this position @c wxNOT_FOUND is returned. */ - int YToEdgeOfRow(int y); + int YToEdgeOfRow(int y) const; /** Returns the grid row that corresponds to the logical y coordinate. Returns @c wxNOT_FOUND if there is no row at the y position. */ - int YToRow(int y); + int YToRow(int y) const; }; @@ -2737,13 +2737,13 @@ public: static bool IsTrueValue(const wxString& value); /** - , @b const wxString&@e valueFalse = _T("")) + , wxString&@e valueFalse = _T("")) This method allows to customize the values returned by GetValue() method for the cell using this editor. By default, the default values of the arguments are used, i.e. @c "1" is returned if the cell is checked and an empty string otherwise, using this method allows to change this. */ - static void UseStringValues(); + static void UseStringValues() const; }; diff --git a/interface/hash.h b/interface/hash.h index 7def270604..6de44b96a8 100644 --- a/interface/hash.h +++ b/interface/hash.h @@ -76,7 +76,7 @@ public: /** Returns the number of elements in the hash table. */ - size_t GetCount(); + size_t GetCount() const; /** Makes an integer key out of a string. An application may wish to make a key diff --git a/interface/hashmap.h b/interface/hashmap.h index 9c816cc184..46996d7c5a 100644 --- a/interface/hashmap.h +++ b/interface/hashmap.h @@ -35,7 +35,7 @@ public: Please remember that hash maps do not guarantee ordering. */ const_iterator begin(); - iterator begin(); + const iterator begin(); //@} /** @@ -47,12 +47,12 @@ public: Counts the number of elements with the given key present in the map. This function returns only 0 or 1. */ - size_type count(const key_type& key); + size_type count(const key_type& key) const; /** Returns @true if the hash map does not contain any elements, @false otherwise. */ - bool empty(); + bool empty() const; //@{ /** @@ -60,7 +60,7 @@ public: Please remember that hash maps do not guarantee ordering. */ const_iterator end(); - iterator end(); + const iterator end(); //@} //@{ @@ -79,8 +79,8 @@ public: an iterator pointing at that element, otherwise an invalid iterator is returned (i.e. hashmap.find( non_existent_key ) == hashmap.end()). */ - iterator find(const key_type& key); - const_iterator find(const key_type& key); + iterator find(const key_type& key) const; + const_iterator find(const key_type& key) const; //@} /** @@ -101,5 +101,5 @@ public: /** Returns the number of elements in the map. */ - size_type size(); + size_type size() const; }; diff --git a/interface/hashset.h b/interface/hashset.h index 1544cb5816..42b7c87d62 100644 --- a/interface/hashset.h +++ b/interface/hashset.h @@ -35,7 +35,7 @@ public: Please remember that hash sets do not guarantee ordering. */ const_iterator begin(); - iterator begin(); + const iterator begin(); //@} /** @@ -47,12 +47,12 @@ public: Counts the number of elements with the given key present in the set. This function returns only 0 or 1. */ - size_type count(const key_type& key); + size_type count(const key_type& key) const; /** Returns @true if the hash set does not contain any elements, @false otherwise. */ - bool empty(); + bool empty() const; //@{ /** @@ -60,7 +60,7 @@ public: Please remember that hash sets do not guarantee ordering. */ const_iterator end(); - iterator end(); + const iterator end(); //@} //@{ @@ -79,8 +79,8 @@ public: an iterator pointing at that element, otherwise an invalid iterator is returned (i.e. hashset.find( non_existent_key ) == hashset.end()). */ - iterator find(const key_type& key); - const_iterator find(const key_type& key); + iterator find(const key_type& key) const; + const_iterator find(const key_type& key) const; //@} /** @@ -94,5 +94,5 @@ public: /** Returns the number of elements in the set. */ - size_type size(); + size_type size() const; }; diff --git a/interface/help.h b/interface/help.h index 366f4473b8..0a8609ca2e 100644 --- a/interface/help.h +++ b/interface/help.h @@ -162,7 +162,7 @@ public: used by wxCHMHelpController, wxWinHelpController and wxHtmlHelpController. */ - virtual wxWindow* GetParentWindow(); + virtual wxWindow* GetParentWindow() const; //@{ /** diff --git a/interface/html/helpdlg.h b/interface/html/helpdlg.h index c9cdd8c6c0..10351df5bc 100644 --- a/interface/html/helpdlg.h +++ b/interface/html/helpdlg.h @@ -52,7 +52,7 @@ public: /** Returns the help controller associated with the dialog. */ - wxHtmlHelpController* GetController(); + wxHtmlHelpController* GetController() const; /** Reads the user's settings for this dialog see diff --git a/interface/html/helpfrm.h b/interface/html/helpfrm.h index e5affeb6bb..99be55b90e 100644 --- a/interface/html/helpfrm.h +++ b/interface/html/helpfrm.h @@ -52,7 +52,7 @@ public: /** Returns the help controller associated with the frame. */ - wxHtmlHelpController* GetController(); + wxHtmlHelpController* GetController() const; /** Reads the user's settings for this frame see diff --git a/interface/html/htmlcell.h b/interface/html/htmlcell.h index bc23b7929c..66475f0780 100644 --- a/interface/html/htmlcell.h +++ b/interface/html/htmlcell.h @@ -178,7 +178,7 @@ public: Returns descent value of the cell (m_Descent member). See explanation: */ - int GetDescent(); + int GetDescent() const; /** Returns pointer to the first cell in the list. @@ -193,12 +193,12 @@ public: /** Returns height of the cell (m_Height member). */ - int GetHeight(); + int GetHeight() const; /** Returns unique cell identifier if there is any, empty string otherwise. */ - virtual wxString GetId(); + virtual wxString GetId() const; /** Returns hypertext link if associated with this cell or @NULL otherwise. @@ -210,7 +210,7 @@ public: These coordinates are used e.g. by COLORMAP. Values are relative to the upper left corner of THIS cell (i.e. from 0 to m_Width or m_Height) */ - virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0); + virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const; /** Returns cursor to show when mouse pointer is over the cell. @@ -224,31 +224,31 @@ public: Returns pointer to the next cell in list (see htmlcell.h if you're interested in details). */ - wxHtmlCell* GetNext(); + wxHtmlCell* GetNext() const; /** Returns pointer to parent container. */ - wxHtmlContainerCell* GetParent(); + wxHtmlContainerCell* GetParent() const; /** Returns X position within parent (the value is relative to parent's upper left corner). The returned value is meaningful only if parent's Layout() was called before! */ - int GetPosX(); + int GetPosX() const; /** Returns Y position within parent (the value is relative to parent's upper left corner). The returned value is meaningful only if parent's Layout() was called before! */ - int GetPosY(); + int GetPosY() const; /** Returns width of the cell (m_Width member). */ - int GetWidth(); + int GetWidth() const; /** This method performs two actions: @@ -336,12 +336,12 @@ public: /** Returns container's horizontal alignment. */ - int GetAlignHor(); + int GetAlignHor() const; /** Returns container's vertical alignment. */ - int GetAlignVer(); + int GetAlignVer() const; /** Returns the background colour of the container or @c wxNullColour if no @@ -357,13 +357,13 @@ public: value. It is NOT always in pixels! */ - int GetIndent(int ind); + int GetIndent(int ind) const; /** Returns the units of indentation for @a ind where @a ind is one of the @b wxHTML_INDENT_* constants. */ - int GetIndentUnits(int ind); + int GetIndentUnits(int ind) const; /** Inserts new cell into the container. diff --git a/interface/html/htmlpars.h b/interface/html/htmlpars.h index 355e8fcc33..f9cc0bcf92 100644 --- a/interface/html/htmlpars.h +++ b/interface/html/htmlpars.h @@ -150,7 +150,7 @@ public: reference to it is parent parser it can easily request the file by calling */ - wxFileSystem* GetFS(); + wxFileSystem* GetFS() const; /** Returns product of parsing. Returned value is result of parsing diff --git a/interface/html/htmltag.h b/interface/html/htmltag.h index a54ef932d1..9e10b396de 100644 --- a/interface/html/htmltag.h +++ b/interface/html/htmltag.h @@ -33,35 +33,35 @@ public: Example : tag contains @c FONT SIZE=+2 COLOR="#000000". Call to tag.GetAllParams() would return @c SIZE=+2 COLOR="#000000". */ - const wxString GetAllParams(); + const wxString GetAllParams() const; /** Returns beginning position of the text @e between this tag and paired ending tag. See explanation (returned position is marked with '|'): */ - int GetBeginPos(); + int GetBeginPos() const; /** Returns ending position of the text @e between this tag and paired ending tag. See explanation (returned position is marked with '|'): */ - int GetEndPos1(); + int GetEndPos1() const; /** Returns ending position 2 of the text @e between this tag and paired ending tag. See explanation (returned position is marked with '|'): */ - int GetEndPos2(); + int GetEndPos2() const; /** Returns tag's name. The name is always in uppercase and it doesn't contain '' or '/' characters. (So the name of @c FONT SIZE=+2 tag is "FONT" and name of @c /table is "TABLE") */ - wxString GetName(); + wxString GetName() const; /** Returns the value of the parameter. You should check whether the @@ -72,7 +72,7 @@ public: @param with_quotes @true if you want to get quotes as well. See example. */ - wxString GetParam(const wxString& par, bool with_quotes = false); + wxString GetParam(const wxString& par, bool with_quotes = false) const; /** Interprets tag parameter @a par as colour specification and saves its value @@ -80,7 +80,7 @@ public: Returns @true on success and @false if @a par is not colour specification or if the tag has no such parameter. */ - bool GetParamAsColour(const wxString& par, wxColour* clr); + bool GetParamAsColour(const wxString& par, wxColour* clr) const; /** Interprets tag parameter @a par as an integer and saves its value @@ -88,7 +88,7 @@ public: Returns @true on success and @false if @a par is not an integer or if the tag has no such parameter. */ - bool GetParamAsInt(const wxString& par, int* value); + bool GetParamAsInt(const wxString& par, int* value) const; /** Returns @true if this tag is paired with ending tag, @false otherwise. @@ -98,7 +98,7 @@ public: doesn't have ending tag while the second P has. The third P tag (which is ending itself) of course doesn't have ending tag. */ - bool HasEnding(); + bool HasEnding() const; /** Returns @true if the tag has a parameter of the given name. @@ -108,7 +108,7 @@ public: @param par the parameter you're looking for. */ - bool HasParam(const wxString& par); + bool HasParam(const wxString& par) const; /** This method scans the given parameter. Usage is exactly the same as sscanf's @@ -125,5 +125,5 @@ public: pointer to a variable to store the value in */ wxString ScanParam(const wxString& par, const wxChar* format, - void* value); + void* value) const; }; diff --git a/interface/html/htmlwin.h b/interface/html/htmlwin.h index e25de19524..2c13a2fc9a 100644 --- a/interface/html/htmlwin.h +++ b/interface/html/htmlwin.h @@ -82,7 +82,7 @@ public: See also: @ref overview_cells "Cells Overview", @ref overview_printing */ - wxHtmlContainerCell* GetInternalRepresentation(); + wxHtmlContainerCell* GetInternalRepresentation() const; /** Returns anchor within currently opened page @@ -108,7 +108,7 @@ public: /** Returns the related frame. */ - wxFrame* GetRelatedFrame(); + wxFrame* GetRelatedFrame() const; /** Moves back to the previous page. (each page displayed using @@ -416,7 +416,7 @@ public: Returns the wxHtmlLinkInfo which contains info about the cell clicked and the hyperlink it contains. */ - const wxHtmlLinkInfo GetLinkInfo(); + const wxHtmlLinkInfo GetLinkInfo() const; }; @@ -442,19 +442,19 @@ public: /** Returns the wxHtmlCellEvent associated with the event. */ - wxHtmlCell* GetCell(); + wxHtmlCell* GetCell() const; /** Returns @true if @ref setlinkclicked() SetLinkClicked(@true) has previously been called; @false otherwise. */ - bool GetLinkClicked(); + bool GetLinkClicked() const; /** Returns the wxPoint associated with the event. */ - wxPoint GetPoint(); + wxPoint GetPoint() const; /** Call this function with @c linkclicked set to @true if the cell which has diff --git a/interface/html/htmprint.h b/interface/html/htmprint.h index 4d5c3c8215..e5b66c3d9f 100644 --- a/interface/html/htmprint.h +++ b/interface/html/htmprint.h @@ -128,7 +128,7 @@ public: /** Gets the parent window for dialogs. */ - wxWindow* GetParentWindow(); + wxWindow* GetParentWindow() const; /** Returns pointer to wxPrintData instance used by this class. You can diff --git a/interface/html/winpars.h b/interface/html/winpars.h index 51ffa9bd61..eae544e95d 100644 --- a/interface/html/winpars.h +++ b/interface/html/winpars.h @@ -115,12 +115,12 @@ public: /** Returns actual text colour. */ - const wxColour GetActualColor(); + const wxColour GetActualColor() const; /** Returns default horizontal alignment. */ - int GetAlign(); + int GetAlign() const; /** Returns (average) char height in standard font. It is used as DC-independent @@ -128,7 +128,7 @@ public: @b Note: This function doesn't return the @e actual height. If you want to know the height of the current font, call @c GetDC - GetCharHeight(). */ - int GetCharHeight(); + int GetCharHeight() const; /** Returns average char width in standard font. It is used as DC-independent @@ -136,13 +136,13 @@ public: @b Note: This function doesn't return the @e actual width. If you want to know the height of the current font, call @c GetDC - GetCharWidth() */ - int GetCharWidth(); + int GetCharWidth() const; /** Returns pointer to the currently opened container (see Overview). Common use: */ - wxHtmlContainerCell* GetContainer(); + wxHtmlContainerCell* GetContainer() const; /** Returns pointer to the DC used during parsing. @@ -154,42 +154,42 @@ public: to do conversion between @ref getinputencoding() "input encoding" and @ref getoutputencoding() "output encoding". */ - wxEncodingConverter* GetEncodingConverter(); + wxEncodingConverter* GetEncodingConverter() const; /** Returns @true if actual font is bold, @false otherwise. */ - int GetFontBold(); + int GetFontBold() const; /** Returns actual font face name. */ - wxString GetFontFace(); + wxString GetFontFace() const; /** Returns @true if actual font is fixed face, @false otherwise. */ - int GetFontFixed(); + int GetFontFixed() const; /** Returns @true if actual font is italic, @false otherwise. */ - int GetFontItalic(); + int GetFontItalic() const; /** Returns actual font size (HTML size varies from -2 to +4) */ - int GetFontSize(); + int GetFontSize() const; /** Returns @true if actual font is underlined, @false otherwise. */ - int GetFontUnderlined(); + int GetFontUnderlined() const; /** Returns input encoding. */ - wxFontEncoding GetInputEncoding(); + wxFontEncoding GetInputEncoding() const; /** Returns actual hypertext link. (This value has a non-empty @@ -197,18 +197,18 @@ public: if the parser is between @c A and @c /A tags, wxEmptyString otherwise.) */ - const wxHtmlLinkInfo GetLink(); + const wxHtmlLinkInfo GetLink() const; /** Returns the colour of hypertext link text. */ - const wxColour GetLinkColor(); + const wxColour GetLinkColor() const; /** Returns output encoding, i.e. closest match to document's input encoding that is supported by operating system. */ - wxFontEncoding GetOutputEncoding(); + wxFontEncoding GetOutputEncoding() const; /** Returns associated window (wxHtmlWindow). This may be @NULL! (You should always diff --git a/interface/htmllbox.h b/interface/htmllbox.h index 0f99800605..761935808a 100644 --- a/interface/htmllbox.h +++ b/interface/htmllbox.h @@ -66,8 +66,8 @@ public: wxFileSystem::ChangePathTo if you use relative paths for the images or other resources embedded in your HTML. */ - wxFileSystem GetFileSystem(); - const wxFileSystem GetFileSystem(); + wxFileSystem GetFileSystem() const; + const wxFileSystem GetFileSystem() const; //@} /** @@ -81,7 +81,7 @@ public: @see GetSelectedTextColour() */ - wxColour GetSelectedTextBgColour(const wxColour& colBg); + wxColour GetSelectedTextBgColour(const wxColour& colBg) const; /** This virtual function may be overridden to customize the appearance of the @@ -93,7 +93,7 @@ public: @see GetSelectedTextBgColour(), wxVListBox::SetSelectionBackground, wxSystemSettings::GetColour */ - wxColour GetSelectedTextColour(const wxColour& colFg); + wxColour GetSelectedTextColour(const wxColour& colFg) const; /** This method must be implemented in the derived class and should return @@ -107,13 +107,13 @@ public: 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); + wxString OnGetItem(size_t n) const; /** This function may be overridden to decorate HTML returned by OnGetItem(). */ - wxString OnGetItemMarkup(size_t n); + wxString OnGetItemMarkup(size_t n) const; /** Called when the user clicks on hypertext link. Does nothing by default. diff --git a/interface/hyperlink.h b/interface/hyperlink.h index 3422349997..05bda19292 100644 --- a/interface/hyperlink.h +++ b/interface/hyperlink.h @@ -28,7 +28,7 @@ public: /** Returns the URL of the hyperlink where the user has just clicked. */ - wxString GetURL(); + wxString GetURL() const; /** Sets the URL associated with the event. @@ -114,25 +114,25 @@ public: Returns the colour used to print the label of the hyperlink when the mouse is over the control. */ - wxColour GetHoverColour(); + wxColour GetHoverColour() const; /** Returns the colour used to print the label when the link has never been clicked before (i.e. the link has not been @e visited) and the mouse is not over the control. */ - wxColour GetNormalColour(); + wxColour GetNormalColour() const; /** Returns the URL associated with the hyperlink. */ - wxString GetURL(); + wxString GetURL() const; /** Returns @true if the hyperlink has already been clicked by the user at least one time. */ - bool GetVisited(); + bool GetVisited() const; /** Returns the colour used to print the label when the mouse is not over the @@ -140,7 +140,7 @@ public: and the link has already been clicked before (i.e. the link has been @e visited). */ - wxColour GetVisitedColour(); + wxColour GetVisitedColour() const; /** Sets the colour used to print the label of the hyperlink when the mouse is over diff --git a/interface/icon.h b/interface/icon.h index 3ce78124b1..d520862da0 100644 --- a/interface/icon.h +++ b/interface/icon.h @@ -184,24 +184,24 @@ public: Gets the colour depth of the icon. A value of 1 indicates a monochrome icon. */ - int GetDepth(); + int GetDepth() const; /** Gets the height of the icon in pixels. */ - int GetHeight(); + int GetHeight() const; /** Gets the width of the icon in pixels. @see GetHeight() */ - int GetWidth(); + int GetWidth() const; /** Returns @true if icon data is present. */ - bool IsOk(); + bool IsOk() const; /** Loads an icon from a file or resource. diff --git a/interface/iconbndl.h b/interface/iconbndl.h index fdcb911579..a19ea45440 100644 --- a/interface/iconbndl.h +++ b/interface/iconbndl.h @@ -52,22 +52,22 @@ public: /** Same as GetIcon( wxSize( size, size ) ). */ - wxIcon GetIcon(const wxSize& size); - wxIcon GetIcon(wxCoord size = -1); + wxIcon GetIcon(const wxSize& size) const; + const wxIcon GetIcon(wxCoord size = -1) const; //@} /** Returns the icon with exactly the given size or @c wxNullIcon if this size is not available. */ - wxIcon GetIconOfExactSize(const wxSize& size); + wxIcon GetIconOfExactSize(const wxSize& size) const; /** Returns @true if the bundle doesn't contain any icons, @false otherwise (in which case a call to GetIcon() with default parameter should return a valid icon). */ - bool IsEmpty(); + bool IsEmpty() const; /** Assignment operator, using @ref overview_trefcount "reference counting". diff --git a/interface/iconloc.h b/interface/iconloc.h index f4c06ee65d..855736748c 100644 --- a/interface/iconloc.h +++ b/interface/iconloc.h @@ -35,5 +35,5 @@ public: Returns @true if the object is valid, i.e. was properly initialized, and @false otherwise. */ - bool IsOk(); + bool IsOk() const; }; diff --git a/interface/image.h b/interface/image.h index 100ca29830..d2b9ec7bf7 100644 --- a/interface/image.h +++ b/interface/image.h @@ -42,7 +42,7 @@ public: /** Gets the file extension associated with this handler. */ - const wxString GetExtension(); + const wxString GetExtension() const; /** If the image file contains more than one image and the image handler is capable @@ -61,17 +61,17 @@ public: /** Gets the MIME type associated with this handler. */ - const wxString GetMimeType(); + const wxString GetMimeType() const; /** Gets the name of this handler. */ - const wxString GetName(); + const wxString GetName() const; /** Gets the image type associated with this handler. */ - long GetType(); + long GetType() const; /** Loads a image from a stream, putting the resulting data into @e image. If the @@ -416,7 +416,7 @@ public: @returns Returns number of colours in the histogram. */ - unsigned long ComputeHistogram(wxImageHistogram& histogram); + unsigned long ComputeHistogram(wxImageHistogram& histogram) const; /** If the image has alpha channel, this method converts it to mask. All pixels @@ -434,7 +434,7 @@ public: Deprecated, use equivalent @ref wxBitmap::ctor "wxBitmap constructor" (which takes wxImage and depth as its arguments) instead. */ - wxBitmap ConvertToBitmap(); + wxBitmap ConvertToBitmap() const; /** Returns a greyscale version of the image. The returned image uses the luminance @@ -443,7 +443,7 @@ public: (R * @e lr) + (G * @e lg) + (B * @e lb). */ wxImage ConvertToGreyscale(double lr = 0.299, double lg = 0.587, - double lb = 0.114); + double lb = 0.114) const; /** Returns monochromatic version of the image. The returned image has white @@ -451,12 +451,12 @@ public: everywhere else. */ wxImage ConvertToMono(unsigned char r, unsigned char g, - unsigned char b); + unsigned char b) const; /** Returns an identical copy of the image. */ - wxImage Copy(); + wxImage Copy() const; /** Creates a fresh image. If @a clear is @true, the new image will be initialized @@ -523,14 +523,14 @@ public: does have it, this pointer may be used to directly manipulate the alpha values which are stored as the @ref getdata() RGB ones. */ - unsigned char GetAlpha(int x, int y); - unsigned char* GetAlpha(); + unsigned char GetAlpha(int x, int y) const; + const unsigned char * GetAlpha() const; //@} /** Returns the blue intensity at the given coordinate. */ - unsigned char GetBlue(int x, int y); + unsigned char GetBlue(int x, int y) const; /** Returns the image data as an array. This is most often used when doing @@ -543,12 +543,12 @@ public: You should not delete the returned pointer nor pass it to SetData(). */ - unsigned char* GetData(); + unsigned char* GetData() const; /** Returns the green intensity at the given coordinate. */ - unsigned char GetGreen(int x, int y); + unsigned char GetGreen(int x, int y) const; /** Returns the static list of image format handlers. @@ -560,7 +560,7 @@ public: /** Gets the height of the image in pixels. */ - int GetHeight(); + int GetHeight() const; //@{ /** @@ -733,17 +733,17 @@ public: /** Gets the blue value of the mask colour. */ - unsigned char GetMaskBlue(); + unsigned char GetMaskBlue() const; /** Gets the green value of the mask colour. */ - unsigned char GetMaskGreen(); + unsigned char GetMaskGreen() const; /** Gets the red value of the mask colour. */ - unsigned char GetMaskRed(); + unsigned char GetMaskRed() const; /** Gets a user-defined option. The function is case-insensitive to @e name. @@ -752,7 +752,7 @@ public: @see SetOption(), GetOptionInt(), HasOption() */ - wxString GetOption(const wxString& name); + wxString GetOption(const wxString& name) const; /** Gets a user-defined option as an integer. The function is case-insensitive to @@ -786,14 +786,14 @@ public: @see SetOption(), GetOption() */ - int GetOptionInt(const wxString& name); + int GetOptionInt(const wxString& name) const; /** Get the current mask colour or find a suitable unused colour that could be used as a mask colour. Returns @true if the image currently has a mask. */ bool GetOrFindMaskColour(unsigned char r, unsigned char g, - unsigned char b); + unsigned char b) const; /** Returns the palette associated with the image. Currently the palette is only @@ -801,25 +801,25 @@ public: have been modified to set the palette if one exists in the image file (usually 256 or less colour images in GIF or PNG format). */ - const wxPalette GetPalette(); + const wxPalette GetPalette() const; /** Returns the red intensity at the given coordinate. */ - unsigned char GetRed(int x, int y); + unsigned char GetRed(int x, int y) const; /** Returns a sub image of the current one as long as the rect belongs entirely to the image. */ - wxImage GetSubImage(const wxRect& rect); + wxImage GetSubImage(const wxRect& rect) const; /** Gets the width of the image in pixels. @see GetHeight() */ - int GetWidth(); + int GetWidth() const; /** Constructor for HSVValue, an object that contains values for hue, saturation @@ -840,12 +840,12 @@ public: @see GetAlpha(), SetAlpha() */ - bool HasAlpha(); + bool HasAlpha() const; /** Returns @true if there is a mask active, @false otherwise. */ - bool HasMask(); + bool HasMask() const; /** Returns @true if the given option is present. The function is case-insensitive @@ -853,7 +853,7 @@ public: @see SetOption(), GetOption(), GetOptionInt() */ - bool HasOption(const wxString& name); + bool HasOption(const wxString& name) const; /** Initializes the image alpha channel data. It is an error to call it @@ -887,14 +887,14 @@ public: /** Returns @true if image data is present. */ - bool IsOk(); + bool IsOk() const; /** Returns @true if the given pixel is transparent, i.e. either has the mask colour if this image has a mask or if this image has alpha channel and alpha value of this pixel is strictly less than @e threshold. */ - bool IsTransparent(int x, int y, unsigned char threshold = 128); + bool IsTransparent(int x, int y, unsigned char threshold = 128) const; //@{ /** @@ -1077,7 +1077,7 @@ public: Returns a mirrored copy of the image. The parameter @e horizontally indicates the orientation. */ - wxImage Mirror(bool horizontally = true); + wxImage Mirror(bool horizontally = true) const; /** Copy the data of the given @a image to the specified position in this image. @@ -1162,7 +1162,7 @@ public: Returns a copy of the image rotated 90 degrees in the direction indicated by @e clockwise. */ - wxImage Rotate90(bool clockwise = true); + wxImage Rotate90(bool clockwise = true) const; /** Rotates the hue of each pixel in the image by @e angle, which is a double in @@ -1294,12 +1294,13 @@ public: @see LoadFile() */ - bool SaveFile(const wxString& name, int type); - bool SaveFile(const wxString& name, const wxString& mimetype); - bool SaveFile(const wxString& name); - bool SaveFile(wxOutputStream& stream, int type); - bool SaveFile(wxOutputStream& stream, - const wxString& mimetype); + bool SaveFile(const wxString& name, int type) const; + const bool SaveFile(const wxString& name, + const wxString& mimetype) const; + const bool SaveFile(const wxString& name) const; + const bool SaveFile(wxOutputStream& stream, int type) const; + const bool SaveFile(wxOutputStream& stream, + const wxString& mimetype) const; //@} /** @@ -1352,7 +1353,7 @@ public: @see Rescale() */ wxImage Scale(int width, int height, - int quality = wxIMAGE_QUALITY_NORMAL); + int quality = wxIMAGE_QUALITY_NORMAL) const; //@{ /** @@ -1448,7 +1449,7 @@ public: @see Resize() */ wxImage Size(const wxSize& size, const wxPoint pos, int red = -1, - int green = -1, int blue = -1); + int green = -1, int blue = -1) const; /** Assignment operator, using @ref overview_trefcount "reference counting". diff --git a/interface/imaglist.h b/interface/imaglist.h index 6fab7a10c5..c045a0dee4 100644 --- a/interface/imaglist.h +++ b/interface/imaglist.h @@ -147,17 +147,17 @@ public: /** Returns the bitmap corresponding to the given index. */ - wxBitmap GetBitmap(int index); + wxBitmap GetBitmap(int index) const; /** Returns the icon corresponding to the given index. */ - wxIcon GetIcon(int index); + wxIcon GetIcon(int index) const; /** Returns the number of images in the list. */ - int GetImageCount(); + int GetImageCount() const; /** Retrieves the size of the images in the list. Currently, the @a index @@ -173,7 +173,7 @@ public: @returns @true if the function succeeded, @false if it failed (for example, if the image list was not yet initialized). */ - bool GetSize(int index, int& width, int& height); + bool GetSize(int index, int& width, int& height) const; /** Removes the image at the given position. diff --git a/interface/intl.h b/interface/intl.h index 854d3c352e..e7608edf26 100644 --- a/interface/intl.h +++ b/interface/intl.h @@ -165,7 +165,7 @@ public: This form is internally used when looking up message catalogs. Compare GetSysName(). */ - wxString GetCanonicalName(); + wxString GetCanonicalName() const; /** Returns the header value for header @e header. The search for @a header is case @@ -175,14 +175,14 @@ public: The return value is the value of the header if found. Else this will be empty. */ wxString GetHeaderValue(const wxString& header, - const wxString& domain = wxEmptyString); + const wxString& domain = wxEmptyString) const; /** Returns wxLanguage constant of current language. Note that you can call this function only if you used the form of Init() that takes wxLanguage argument. */ - int GetLanguage(); + int GetLanguage() const; /** Returns a pointer to wxLanguageInfo structure containing information about the @@ -194,7 +194,7 @@ public: special meaning if passed as an argument to this function and in this case the result of GetSystemLanguage() is used. */ - static wxLanguageInfo* GetLanguageInfo(int lang); + static wxLanguageInfo* GetLanguageInfo(int lang) const; /** Returns English name of the given language or empty string if this @@ -202,20 +202,20 @@ public: See GetLanguageInfo() for a remark about special meaning of @c wxLANGUAGE_DEFAULT. */ - static wxString GetLanguageName(int lang); + static wxString GetLanguageName(int lang) const; /** Returns the locale name as passed to the constructor or Init(). This is full, human-readable name, e.g. "English" or "French". */ - const wxString GetLocale(); + const wxString GetLocale() const; /** Returns the current short name for the locale (as given to the constructor or the Init() function). */ - const wxString GetName(); + const wxString GetName() const; //@{ /** @@ -241,25 +241,25 @@ public: added later override those added before. */ const wxString GetString(const wxString& origString, - const wxString& domain = wxEmptyString); - const wxString GetString(const wxString& origString, - const wxString& origString2, - size_t n, - const wxString& domain = NULL); + const wxString& domain = wxEmptyString) const; + const const wxString& GetString(const wxString& origString, + const wxString& origString2, + size_t n, + const wxString& domain = NULL) const; //@} /** Returns current platform-specific locale name as passed to setlocale(). Compare GetCanonicalName(). */ - wxString GetSysName(); + wxString GetSysName() const; /** Tries to detect the user's default font encoding. Returns wxFontEncoding value or @b wxFONTENCODING_SYSTEM if it couldn't be determined. */ - static wxFontEncoding GetSystemEncoding(); + static wxFontEncoding GetSystemEncoding() const; /** Tries to detect the name of the user's default font encoding. This string isn't @@ -269,14 +269,14 @@ public: Returns a user-readable string value or an empty string if it couldn't be determined. */ - static wxString GetSystemEncodingName(); + static wxString GetSystemEncodingName() const; /** Tries to detect the user's default language setting. Returns wxLanguage value or @b wxLANGUAGE_UNKNOWN if the language-guessing algorithm failed. */ - static int GetSystemLanguage(); + static int GetSystemLanguage() const; //@{ /** @@ -374,12 +374,12 @@ public: normally corresponds to 'domain' which is more or less the application name. See also: AddCatalog() */ - bool IsLoaded(const char* domain); + bool IsLoaded(const char* domain) const; /** Returns @true if the locale could be set successfully. */ - bool IsOk(); + bool IsOk() const; /** See @ref overview_languagecodes "list of recognized language constants". @@ -516,7 +516,7 @@ public: or @false otherwise. */ - bool IsOk(); + bool IsOk() const; /** Currently the following @c _l-functions are available: diff --git a/interface/joystick.h b/interface/joystick.h index 4d9d290adc..52bad0c9fa 100644 --- a/interface/joystick.h +++ b/interface/joystick.h @@ -40,31 +40,31 @@ public: @param id The button id to report, from 0 to GetNumberButtons() - 1 */ - int GetButtonState(); - bool GetButtonState(unsigned id); + int GetButtonState() const; + const bool GetButtonState(unsigned id) const; //@} /** Returns the manufacturer id. */ - int GetManufacturerId(); + int GetManufacturerId() const; /** Returns the movement threshold, the number of steps outside which the joystick is deemed to have moved. */ - int GetMovementThreshold(); + int GetMovementThreshold() const; /** Returns the number of axes for this joystick. */ - int GetNumberAxes(); + int GetNumberAxes() const; /** Returns the number of buttons for this joystick. */ - int GetNumberButtons(); + int GetNumberButtons() const; /** Returns the number of joysticks currently attached to the computer. @@ -76,7 +76,7 @@ public: degree units. Returns -1 on error. */ - int GetPOVCTSPosition(); + int GetPOVCTSPosition() const; /** Returns the point-of-view position, expressed in continuous, one-hundredth of a @@ -84,17 +84,17 @@ public: but limited to return 0, 9000, 18000 or 27000. Returns -1 on error. */ - int GetPOVPosition(); + int GetPOVPosition() const; /** Returns the maximum polling frequency. */ - int GetPollingMax(); + int GetPollingMax() const; /** Returns the minimum polling frequency. */ - int GetPollingMin(); + int GetPollingMin() const; //@{ /** @@ -103,140 +103,140 @@ public: @param axis The joystick axis to report, from 0 to GetNumberAxes() - 1. */ - wxPoint GetPosition(); - int GetPosition(unsigned axis); + wxPoint GetPosition() const; + const int GetPosition(unsigned axis) const; //@} /** Returns the product id for the joystick. */ - int GetProductId(); + int GetProductId() const; /** Returns the product name for the joystick. */ - wxString GetProductName(); + wxString GetProductName() const; /** Returns the maximum rudder position. */ - int GetRudderMax(); + int GetRudderMax() const; /** Returns the minimum rudder position. */ - int GetRudderMin(); + int GetRudderMin() const; /** Returns the rudder position. */ - int GetRudderPosition(); + int GetRudderPosition() const; /** Returns the maximum U position. */ - int GetUMax(); + int GetUMax() const; /** Returns the minimum U position. */ - int GetUMin(); + int GetUMin() const; /** Gets the position of the fifth axis of the joystick, if it exists. */ - int GetUPosition(); + int GetUPosition() const; /** Returns the maximum V position. */ - int GetVMax(); + int GetVMax() const; /** Returns the minimum V position. */ - int GetVMin(); + int GetVMin() const; /** Gets the position of the sixth axis of the joystick, if it exists. */ - int GetVPosition(); + int GetVPosition() const; /** Returns the maximum x position. */ - int GetXMax(); + int GetXMax() const; /** Returns the minimum x position. */ - int GetXMin(); + int GetXMin() const; /** Returns the maximum y position. */ - int GetYMax(); + int GetYMax() const; /** Returns the minimum y position. */ - int GetYMin(); + int GetYMin() const; /** Returns the maximum z position. */ - int GetZMax(); + int GetZMax() const; /** Returns the minimum z position. */ - int GetZMin(); + int GetZMin() const; /** Returns the z position of the joystick. */ - int GetZPosition(); + int GetZPosition() const; /** Returns @true if the joystick has a point of view control. */ - bool HasPOV(); + bool HasPOV() const; /** Returns @true if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right). */ - bool HasPOV4Dir(); + bool HasPOV4Dir() const; /** Returns @true if the joystick point-of-view supports continuous degree bearings. */ -#define bool HasPOVCTS() /* implementation is private */ +#define bool HasPOVCTS() const /* implementation is private */ /** Returns @true if there is a rudder attached to the computer. */ - bool HasRudder(); + bool HasRudder() const; /** Returns @true if the joystick has a U axis. */ - bool HasU(); + bool HasU() const; /** Returns @true if the joystick has a V axis. */ - bool HasV(); + bool HasV() const; /** Returns @true if the joystick has a Z axis. */ - bool HasZ(); + bool HasZ() const; /** Returns @true if the joystick is functioning. */ - bool IsOk(); + bool IsOk() const; /** Releases the capture set by @b SetCapture. diff --git a/interface/laywin.h b/interface/laywin.h index badf50f30d..98e4d1a125 100644 --- a/interface/laywin.h +++ b/interface/laywin.h @@ -111,7 +111,7 @@ public: remaining space. This function simply calls LayoutWindow(). */ - bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL); + bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL) const; /** Lays out the children of an MDI parent frame. If @a rect is non-@NULL, the @@ -119,7 +119,7 @@ public: area. The MDI client window is set to occupy the remaining space. */ - bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL); + bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL) const; /** Lays out the children of a normal frame or other window. @@ -131,7 +131,7 @@ public: and the window will be set to the remaining size). */ - bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL); + bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL) const; }; @@ -223,13 +223,13 @@ public: Returns the alignment of the window: one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM. */ - wxLayoutAlignment GetAlignment(); + wxLayoutAlignment GetAlignment() const; /** Returns the orientation of the window: one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL. */ - wxLayoutOrientation GetOrientation(); + wxLayoutOrientation GetOrientation() const; /** The default handler for the event that is generated by wxLayoutAlgorithm. The @@ -305,32 +305,32 @@ public: the window sticks to). One of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM. */ - void GetAlignment(); + void GetAlignment() const; /** Returns the flags associated with this event. Not currently used. */ - int GetFlags(); + int GetFlags() const; /** Returns the orientation that the event handler specified to the event object. May be one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL. */ - wxLayoutOrientation GetOrientation(); + wxLayoutOrientation GetOrientation() const; /** Returns the requested length of the window in the direction of the window orientation. This information is not yet used. */ - int GetRequestedLength(); + int GetRequestedLength() const; /** Returns the size that the event handler specified to the event object as being the requested size of the window. */ - wxSize GetSize(); + wxSize GetSize() const; /** Call this to specify the alignment of the window (which side of the remaining @@ -391,7 +391,7 @@ public: /** Returns the flags associated with this event. Not currently used. */ - int GetFlags(); + int GetFlags() const; /** Before the event handler is entered, returns the remaining parent client area @@ -400,7 +400,7 @@ public: parent client rectangle, after the event handler has subtracted the area that its window occupies. */ - wxRect GetRect(); + wxRect GetRect() const; /** Sets the flags associated with this event. Not currently used. diff --git a/interface/list.h b/interface/list.h index 7ec8119bb2..218b4e5f0c 100644 --- a/interface/list.h +++ b/interface/list.h @@ -96,28 +96,28 @@ public: /** Returns the iterator refering to @a object or @NULL if none found. */ - wxListT::compatibility_iterator Find(T* object); + wxListT::compatibility_iterator Find(T* object) const; /** Returns the number of elements in the list. */ - size_t GetCount(); + size_t GetCount() const; /** Returns the first iterator in the list (@NULL if the list is empty). */ - wxListT::compatibility_iterator GetFirst(); + wxListT::compatibility_iterator GetFirst() const; /** Returns the last iterator in the list (@NULL if the list is empty). */ - wxListT::compatibility_iterator GetLast(); + wxListT::compatibility_iterator GetLast() const; /** Returns the index of @a obj within the list or @c wxNOT_FOUND if @a obj is not found in the list. */ - int IndexOf(T* obj); + int IndexOf(T* obj) const; //@{ /** @@ -133,18 +133,18 @@ public: /** Returns @true if the list is empty, @false otherwise. */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns the iterator refering to the object at the given @c index in the list. */ - wxListT::compatibility_iterator Item(size_t index); + wxListT::compatibility_iterator Item(size_t index) const; /** @b NB: This function is deprecated, use wxList::Find instead. */ - wxListT::compatibility_iterator Member(T* object); + wxListT::compatibility_iterator Member(T* object) const; /** @b NB: This function is deprecated, use @ref wxList::itemfunc Item instead. @@ -152,13 +152,13 @@ public: empty or the nth node could not be found). */ - wxListT::compatibility_iterator Nth(int n); + wxListT::compatibility_iterator Nth(int n) const; /** @b NB: This function is deprecated, use wxList::GetCount instead. Returns the number of elements in the list. */ - int Number(); + int Number() const; /** Allows the sorting of arbitrary lists by giving a function to compare @@ -179,16 +179,16 @@ public: /** Returns the last item of the list. */ - reference back(); - const_reference back(); + reference back() const; + const_reference back() const; //@} //@{ /** Returns a (const) iterator pointing to the beginning of the list. */ - iterator begin(); - const_iterator begin(); + iterator begin() const; + const_iterator begin() const; //@} /** @@ -199,14 +199,14 @@ public: /** Returns @e @true if the list is empty. */ - bool empty(); + bool empty() const; //@{ /** Returns a (const) iterator pointing at the end of the list. */ - iterator end(); - const_iterator end(); + iterator end() const; + const_iterator end() const; //@} //@{ @@ -222,8 +222,8 @@ public: /** Returns the first item in the list. */ - reference front(); - const_reference front(); + reference front() const; + const_reference front() const; //@} //@{ @@ -239,7 +239,7 @@ public: /** Returns the largest possible size of the list. */ - size_type max_size(); + size_type max_size() const; /** Removes the last item from the list. @@ -268,8 +268,8 @@ public: Returns a (const) reverse iterator pointing to the beginning of the reversed list. */ - reverse_iterator rbegin(); - const_reverse_iterator rbegin(); + reverse_iterator rbegin() const; + const_reverse_iterator rbegin() const; //@} /** @@ -282,8 +282,8 @@ public: Returns a (const) reverse iterator pointing to the end of the reversed list. */ - reverse_iterator rend(); - const_reverse_iterator rend(); + reverse_iterator rend() const; + const_reverse_iterator rend() const; //@} /** @@ -301,7 +301,7 @@ public: /** Returns the size of the list. */ - size_type size(); + size_type size() const; }; @@ -336,12 +336,12 @@ public: /** Retrieves the client data pointer associated with the node. */ - T* GetData(); + T* GetData() const; /** Retrieves the next node or @NULL if this node is the last one. */ - wxNodeT* GetNext(); + wxNodeT* GetNext() const; /** Retrieves the previous node or @NULL if this node is the first one in the list. diff --git a/interface/listbox.h b/interface/listbox.h index 3d8271a3b0..fd357dc193 100644 --- a/interface/listbox.h +++ b/interface/listbox.h @@ -158,7 +158,7 @@ public: @see wxControlWithItems::GetSelection, wxControlWithItems::GetStringSelection, wxControlWithItems::SetSelection */ - int GetSelections(wxArrayInt& selections); + int GetSelections(wxArrayInt& selections) const; /** Returns the item located at @e point, or @c wxNOT_FOUND if there @@ -173,7 +173,7 @@ public: @returns Item located at point, or wxNOT_FOUND if unimplemented or the item does not exist. */ - int HitTest(const wxPoint point); + int HitTest(const wxPoint point) const; //@{ /** @@ -202,7 +202,7 @@ public: @returns @true if the given item is selected, @false otherwise. */ - bool IsSelected(int n); + bool IsSelected(int n) const; //@{ /** diff --git a/interface/listctrl.h b/interface/listctrl.h index 5a1a186d93..8506202c8a 100644 --- a/interface/listctrl.h +++ b/interface/listctrl.h @@ -237,33 +237,33 @@ public: Gets information about this column. See SetItem() for more information. */ - bool GetColumn(int col, wxListItem& item); + bool GetColumn(int col, wxListItem& item) const; /** Returns the number of columns. */ - int GetColumnCount(); + int GetColumnCount() const; /** Gets the column number by visual order index (report view only). */ - int GetColumnIndexFromOrder(int order); + int GetColumnIndexFromOrder(int order) const; /** Gets the column visual order index (valid in report view only). */ - int GetColumnOrder(int col); + int GetColumnOrder(int col) const; /** Gets the column width (report view only). */ - int GetColumnWidth(int col); + int GetColumnWidth(int col) const; /** Returns the array containing the orders of all columns. On error, an empty array is returned. */ - wxArrayInt GetColumnsOrder(); + wxArrayInt GetColumnsOrder() const; /** Gets the number of items that can fit vertically in the @@ -271,7 +271,7 @@ public: or the total number of items in the list control (icon or small icon view). */ - int GetCountPerPage(); + int GetCountPerPage() const; /** Returns the edit control being currently used to edit a label. Returns @NULL @@ -279,7 +279,7 @@ public: @b NB: It is currently only implemented for wxMSW and the generic version, not for the native Mac OS X version. */ - wxTextCtrl* GetEditControl(); + wxTextCtrl* GetEditControl() const; /** Returns the specified image list. @a which may be one of: @@ -296,7 +296,7 @@ public: The user-defined state image list (unimplemented). */ - wxImageList* GetImageList(int which); + wxImageList* GetImageList(int which) const; /** Gets information about the item. See SetItem() for more @@ -304,7 +304,7 @@ public: You must call @e info.SetId() to the ID of item you're interested in before calling this method. */ - bool GetItem(wxListItem& info); + bool GetItem(wxListItem& info) const; /** Returns the colour for this item. If the item has no specific colour, returns @@ -313,27 +313,27 @@ public: @see GetItemTextColour() */ - wxColour GetItemBackgroundColour(long item); + wxColour GetItemBackgroundColour(long item) const; /** Returns the number of items in the list control. */ - int GetItemCount(); + int GetItemCount() const; /** Gets the application-defined data associated with this item. */ - long GetItemData(long item); + long GetItemData(long item) const; /** Returns the item's font. */ - wxFont GetItemFont(long item); + wxFont GetItemFont(long item) const; /** Returns the position of the item, in icon or small icon view. */ - bool GetItemPosition(long item, wxPoint& pos); + bool GetItemPosition(long item, wxPoint& pos) const; /** Returns the rectangle representing the item's size and position, in physical @@ -341,25 +341,25 @@ public: @a code is one of wxLIST_RECT_BOUNDS, wxLIST_RECT_ICON, wxLIST_RECT_LABEL. */ bool GetItemRect(long item, wxRect& rect, - int code = wxLIST_RECT_BOUNDS); + int code = wxLIST_RECT_BOUNDS) const; /** Retrieves the spacing between icons in pixels: horizontal spacing is returned as @c x component of the wxSize object and the vertical spacing as its @c y component. */ - wxSize GetItemSpacing(); + wxSize GetItemSpacing() const; /** Gets the item state. For a list of state flags, see SetItem(). The @b stateMask indicates which state flags are of interest. */ - int GetItemState(long item, long stateMask); + int GetItemState(long item, long stateMask) const; /** Gets the item text for this item. */ - wxString GetItemText(long item); + wxString GetItemText(long item) const; /** Returns the colour for this item. If the item has no specific colour, returns @@ -368,7 +368,7 @@ public: the current control foreground and items with default colour which, hence, have always the same colour as the control). */ - wxColour GetItemTextColour(long item); + wxColour GetItemTextColour(long item) const; /** Searches for an item with the given geometry or state, starting from @@ -425,12 +425,12 @@ public: The item is selected as part of a cut and paste operation. */ long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, - int state = wxLIST_STATE_DONTCARE); + int state = wxLIST_STATE_DONTCARE) const; /** Returns the number of selected items in the list control. */ - int GetSelectedItemCount(); + int GetSelectedItemCount() const; /** Returns the rectangle representing the size and position, in physical @@ -445,18 +445,18 @@ public: This function is new since wxWidgets version 2.7.0 */ bool GetSubItemRect(long item, long subItem, wxRect& rect, - int code = wxLIST_RECT_BOUNDS); + int code = wxLIST_RECT_BOUNDS) const; /** Gets the text colour of the list control. */ - wxColour GetTextColour(); + wxColour GetTextColour() const; /** Gets the index of the topmost visible item when in list or report view. */ - long GetTopItem(); + long GetTopItem() const; /** Returns the rectangle taken by all items in the control. In other words, if the @@ -465,7 +465,7 @@ public: Note that this function only works in the icon and small icon views, not in list or report views (this is a limitation of the native Win32 control). */ - wxRect GetViewRect(); + wxRect GetViewRect() const; /** Determines which item (if any) is at the specified point, @@ -523,7 +523,7 @@ public: commctrl.h of version 4.70 that is provided by Microsoft. */ long HitTest(const wxPoint& point, int& flags, - long* ptrSubItem); + long* ptrSubItem) const; //@{ /** @@ -567,7 +567,7 @@ public: @see OnGetItemImage(), OnGetItemColumnImage(), OnGetItemText() */ - virtual wxListItemAttr* OnGetItemAttr(long item); + virtual wxListItemAttr* OnGetItemAttr(long item) const; /** Overload this function in the derived class for a control with @@ -579,7 +579,7 @@ public: @see OnGetItemText(), OnGetItemImage(), OnGetItemAttr() */ - virtual int OnGetItemColumnImage(long item, long column); + virtual int OnGetItemColumnImage(long item, long column) const; /** This function must be overloaded in the derived class for a control with @@ -594,7 +594,7 @@ public: @see OnGetItemText(), OnGetItemColumnImage(), OnGetItemAttr() */ - virtual int OnGetItemImage(long item); + virtual int OnGetItemImage(long item) const; /** This function @b must be overloaded in the derived class for a control with @@ -604,7 +604,7 @@ public: @see SetItemCount(), OnGetItemImage(), OnGetItemColumnImage(), OnGetItemAttr() */ - virtual wxString OnGetItemText(long item, long column); + virtual wxString OnGetItemText(long item, long column) const; /** Redraws the given @e item. This is only useful for the virtual list controls @@ -663,7 +663,7 @@ public: once. This function is valid in report view only. */ - bool SetColumnOrder(const wxArrayInt& orders); + bool SetColumnOrder(const wxArrayInt& orders) const; /** Sets the image list associated with the control. @a which is one of @@ -956,13 +956,13 @@ public: For @c EVT_LIST_CACHE_HINT event only: return the first item which the list control advises us to cache. */ - long GetCacheFrom(); + long GetCacheFrom() const; /** For @c EVT_LIST_CACHE_HINT event only: return the last item (inclusive) which the list control advises us to cache. */ - long GetCacheTo(); + long GetCacheTo() const; /** The column position: it is only used with @c COL events. For the column @@ -970,52 +970,52 @@ public: the column click events it may be -1 if the user clicked in the list control header outside any column. */ - int GetColumn(); + int GetColumn() const; /** The data. */ - long GetData(); + long GetData() const; /** The image. */ - int GetImage(); + int GetImage() const; /** The item index. */ - long GetIndex(); + long GetIndex() const; /** An item object, used by some events. See also wxListCtrl::SetItem. */ - const wxListItem GetItem(); + const wxListItem GetItem() const; /** Key code if the event is a keypress event. */ - int GetKeyCode(); + int GetKeyCode() const; /** The (new) item label for @c EVT_LIST_END_LABEL_EDIT event. */ - const wxString GetLabel(); + const wxString GetLabel() const; /** The mask. */ - long GetMask(); + long GetMask() const; /** The position of the mouse pointer if the event is a drag event. */ - wxPoint GetPoint(); + wxPoint GetPoint() const; /** The text. */ - const wxString GetText(); + const wxString GetText() const; /** This method only makes sense for @c EVT_LIST_END_LABEL_EDIT message @@ -1025,7 +1025,7 @@ public: the edit and the admittedly rare case when the user wants to rename it to an empty string). */ - bool IsEditCancelled(); + bool IsEditCancelled() const; }; @@ -1059,32 +1059,32 @@ public: /** Returns the currently set background color. */ - const wxColour GetBackgroundColour(); + const wxColour GetBackgroundColour() const; /** Returns the currently set font. */ - const wxFont GetFont(); + const wxFont GetFont() const; /** Returns the currently set text color. */ - const wxColour GetTextColour(); + const wxColour GetTextColour() const; /** Returns @true if the currently set background color is valid. */ - bool HasBackgroundColour(); + bool HasBackgroundColour() const; /** Returns @true if the currently set font is valid. */ - bool HasFont(); + bool HasFont() const; /** Returns @true if the currently set text color is valid. */ - bool HasTextColour(); + bool HasTextColour() const; /** Sets a new background color. @@ -1149,14 +1149,14 @@ public: @returns The first selected item, if any, -1 otherwise. */ - long GetFirstSelected(); + long GetFirstSelected() const; /** Returns the currently focused item or -1 if none. @see IsSelected(), Focus() */ - long GetFocusedItem(); + long GetFocusedItem() const; /** Used together with GetFirstSelected() to @@ -1165,7 +1165,7 @@ public: @returns Returns the next selected item or -1 if there are no more of them. */ - long GetNextSelected(long item); + long GetNextSelected(long item) const; /** Returns @true if the item with the given @a index is selected, @@ -1173,7 +1173,7 @@ public: @see GetFirstSelected(), GetNextSelected() */ - bool IsSelected(long index); + bool IsSelected(long index) const; /** Selects or unselects the given item. @@ -1226,39 +1226,39 @@ public: Returns the alignment for this item. Can be one of wxLIST_FORMAT_LEFT, wxLIST_FORMAT_RIGHT or wxLIST_FORMAT_CENTRE. */ - wxListColumnFormat GetAlign(); + wxListColumnFormat GetAlign() const; /** Returns the background colour for this item. */ - wxColour GetBackgroundColour(); + wxColour GetBackgroundColour() const; /** Returns the zero-based column; meaningful only in report mode. */ - int GetColumn(); + int GetColumn() const; /** Returns client data associated with the control. Please note that client data is associated with the item and not with subitems. */ - long GetData(); + long GetData() const; /** Returns the font used to display the item. */ - wxFont GetFont(); + wxFont GetFont() const; /** Returns the zero-based item position. */ - long GetId(); + long GetId() const; /** Returns the zero-based index of the image associated with the item into the image list. */ - int GetImage(); + int GetImage() const; /** Returns a bit mask indicating which fields of the structure are valid; @@ -1288,7 +1288,7 @@ public: @b GetFormat is valid. */ - long GetMask(); + long GetMask() const; /** Returns a bit field representing the state of the item. Can be any @@ -1314,22 +1314,22 @@ public: The item is in the cut state. Win32 only. */ - long GetState(); + long GetState() const; /** Returns the label/header text. */ - const wxString GetText(); + const wxString GetText() const; /** Returns the text colour. */ - wxColour GetTextColour(); + wxColour GetTextColour() const; /** Meaningful only for column headers in report mode. Returns the column width. */ - int GetWidth(); + int GetWidth() const; /** Sets the alignment for the item. See also diff --git a/interface/log.h b/interface/log.h index 4e127526da..f02715016c 100644 --- a/interface/log.h +++ b/interface/log.h @@ -47,7 +47,7 @@ public: Returns the associated log frame window. This may be used to position or resize it but use Show() to show or hide it. */ - wxFrame* GetFrame(); + wxFrame* GetFrame() const; /** Called if the user closes the window interactively, will not be @@ -157,14 +157,14 @@ public: /** Returns the pointer to the previously active log target (which may be @NULL). */ - wxLog* GetOldLog(); + wxLog* GetOldLog() const; /** Returns @true if the messages are passed to the previously active log target (default) or @false if PassMessages() had been called. */ - bool IsPassingMessages(); + bool IsPassingMessages() const; /** By default, the log messages are passed to the previously active log target. diff --git a/interface/longlong.h b/interface/longlong.h index e8b815fe64..d985c58b47 100644 --- a/interface/longlong.h +++ b/interface/longlong.h @@ -53,7 +53,7 @@ public: or modifying it in place (the second one). Not in wxULongLong. */ wxLongLong Abs(); - wxLongLong Abs(); + const wxLongLong& Abs(); //@} /** @@ -66,39 +66,39 @@ public: /** Returns the high 32 bits of 64 bit integer. */ - long GetHi(); + long GetHi() const; /** Returns the low 32 bits of 64 bit integer. */ - unsigned long GetLo(); + unsigned long GetLo() const; /** Convert to native long long (only for compilers supporting it) */ - wxLongLong_t GetValue(); + wxLongLong_t GetValue() const; /** Returns the value as @c double. */ - double ToDouble(); + double ToDouble() const; /** Truncate wxLongLong to long. If the conversion loses data (i.e. the wxLongLong value is outside the range of built-in long type), an assert will be triggered in debug mode. */ - long ToLong(); + long ToLong() const; /** Returns the string representation of a wxLongLong. */ - wxString ToString(); + wxString ToString() const; /** Adds 2 wxLongLongs together and returns the result. */ - wxLongLong operator+(const wxLongLong& ll); + wxLongLong operator+(const wxLongLong& ll) const; //@{ /** @@ -116,7 +116,7 @@ public: /** Subtracts 2 wxLongLongs and returns the result. */ - wxLongLong operator-(const wxLongLong& ll); + wxLongLong operator-(const wxLongLong& ll) const; //@{ /** diff --git a/interface/mdi.h b/interface/mdi.h index 582641d692..6700295387 100644 --- a/interface/mdi.h +++ b/interface/mdi.h @@ -196,7 +196,7 @@ public: /** Returns a pointer to the active MDI child, if there is one. */ - wxMDIChildFrame* GetActiveChild(); + wxMDIChildFrame* GetActiveChild() const; /** This gets the size of the frame 'client area' in pixels. @@ -213,28 +213,28 @@ public: @see GetToolBar(), SetToolBar(), wxMDIClientWindow */ - virtual void GetClientSize(int* width, int* height); + virtual void GetClientSize(int* width, int* height) const; /** Returns a pointer to the client window. @see OnCreateClient() */ - wxMDIClientWindow* GetClientWindow(); + wxMDIClientWindow* GetClientWindow() const; /** Returns the window being used as the toolbar for this frame. @see SetToolBar() */ - virtual wxWindow* GetToolBar(); + virtual wxWindow* GetToolBar() const; /** Returns the current Window menu (added by wxWidgets to the menubar). This function is available under Windows only. */ - wxMenu* GetWindowMenu(); + wxMenu* GetWindowMenu() const; /** Override this to return a different kind of client window. If you override this diff --git a/interface/mediactrl.h b/interface/mediactrl.h index 4fc5ee892f..26c90330ee 100644 --- a/interface/mediactrl.h +++ b/interface/mediactrl.h @@ -45,7 +45,7 @@ public: //@{ /** , - @b const wxPoint& + wxPoint& @param pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -78,8 +78,8 @@ public: @param name Window name. */ - wxMediaCtrl(); - wxMediaCtrl(wxWindow* parent, wxWindowID id); + wxMediaCtrl() const; + wxMediaCtrl(wxWindow* parent, wxWindowID id) const; //@} /** @@ -126,7 +126,7 @@ public: /** , - @b const wxPoint& + wxPoint& @param pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -162,7 +162,7 @@ public: @param name Window name. */ - bool Create(wxWindow* parent, wxWindowID id); + bool Create(wxWindow* parent, wxWindowID id) const; /** Creating a backend for wxMediaCtrl is a rather simple process. Simply derive diff --git a/interface/menu.h b/interface/menu.h index 9f1709e8bb..3bb6333361 100644 --- a/interface/menu.h +++ b/interface/menu.h @@ -109,7 +109,7 @@ public: @returns The found menu item object, or @NULL if one was not found. */ - wxMenuItem* FindItem(int id, wxMenu menu = NULL); + wxMenuItem* FindItem(int id, wxMenu menu = NULL) const; /** Returns the index of the menu with the given @a title or @c wxNOT_FOUND if no @@ -117,7 +117,7 @@ public: the menu title (with accelerator characters, i.e. @c "File") or just the menu label (@c "File") indifferently. */ - int FindMenu(const wxString& title); + int FindMenu(const wxString& title) const; /** Finds the menu item id for a menu name/menu item string pair. @@ -133,7 +133,7 @@ public: strings before matching. */ int FindMenuItem(const wxString& menuString, - const wxString& itemString); + const wxString& itemString) const; /** Gets the help string associated with the menu item identifier. @@ -146,7 +146,7 @@ public: @see SetHelpString() */ - wxString GetHelpString(int id); + wxString GetHelpString(int id) const; /** Gets the label associated with a menu item. @@ -159,7 +159,7 @@ public: @remarks Use only after the menubar has been associated with a frame. */ - wxString GetLabel(int id); + wxString GetLabel(int id) const; /** Returns the label of a top-level menu. Note that the returned string does not @@ -175,17 +175,17 @@ public: @see SetLabelTop() */ - wxString GetLabelTop(int pos); + wxString GetLabelTop(int pos) const; /** Returns the menu at @a menuIndex (zero-based). */ - wxMenu* GetMenu(int menuIndex); + wxMenu* GetMenu(int menuIndex) const; /** Returns the number of menus in this menubar. */ - size_t GetMenuCount(); + size_t GetMenuCount() const; /** Returns the label of a top-level menu. Note that the returned string @@ -201,7 +201,7 @@ public: @see GetMenuLabelText(), SetMenuLabel() */ - wxString GetMenuLabel(int pos); + wxString GetMenuLabel(int pos) const; /** Returns the label of a top-level menu. Note that the returned string does not @@ -217,7 +217,7 @@ public: @see GetMenuLabel(), SetMenuLabel() */ - wxString GetMenuLabelText(int pos); + wxString GetMenuLabelText(int pos) const; /** Inserts the menu at the given position into the menu bar. Inserting menu at @@ -246,7 +246,7 @@ public: @returns @true if the item was found and is checked, @false otherwise. */ - bool IsChecked(int id); + bool IsChecked(int id) const; /** Determines whether an item is enabled. @@ -256,7 +256,7 @@ public: @returns @true if the item was found and is enabled, @false otherwise. */ - bool IsEnabled(int id); + bool IsEnabled(int id) const; /** Redraw the menu bar @@ -570,14 +570,14 @@ public: @remarks Any special menu codes are stripped out of source and target strings before matching. */ - int FindItem(const wxString& itemString); - wxMenuItem* FindItem(int id, wxMenu** menu = NULL); + int FindItem(const wxString& itemString) const; + const wxMenuItem * FindItem(int id, wxMenu** menu = NULL) const; //@} /** Returns the wxMenuItem given a position in the menu. */ - wxMenuItem* FindItemByPosition(size_t position); + wxMenuItem* FindItemByPosition(size_t position) const; /** Returns the help string associated with a menu item. @@ -590,7 +590,7 @@ public: @see SetHelpString(), Append() */ - wxString GetHelpString(int id); + wxString GetHelpString(int id) const; /** Returns a menu item label. @@ -602,7 +602,7 @@ public: @see GetLabelText(), SetLabel() */ - wxString GetLabel(int id); + wxString GetLabel(int id) const; /** Returns a menu item label, without any of the original mnemonics and @@ -615,18 +615,18 @@ public: @see GetLabel(), SetLabel() */ - wxString GetLabelText(int id); + wxString GetLabelText(int id) const; /** Returns the number of items in the menu. */ - size_t GetMenuItemCount(); + size_t GetMenuItemCount() const; /** Returns the list of items in the menu. wxMenuItemList is a pseudo-template list class containing wxMenuItem pointers, see wxList. */ - wxMenuItemList GetMenuItems(); + wxMenuItemList GetMenuItems() const; /** Returns the title of the menu. @@ -636,7 +636,7 @@ public: @see SetTitle() */ - wxString GetTitle(); + wxString GetTitle() const; //@{ /** @@ -688,7 +688,7 @@ public: @see Check() */ - bool IsChecked(int id); + bool IsChecked(int id) const; /** Determines whether a menu item is enabled. @@ -700,7 +700,7 @@ public: @see Enable() */ - bool IsEnabled(int id); + bool IsEnabled(int id) const; //@{ /** @@ -798,5 +798,5 @@ public: wxWindow::PopupMenu, but the application may call it at other times if required. */ - void UpdateUI(wxEvtHandler* source = NULL); + void UpdateUI(wxEvtHandler* source = NULL) const; }; diff --git a/interface/menuitem.h b/interface/menuitem.h index bf32f16dbe..a2762af1b2 100644 --- a/interface/menuitem.h +++ b/interface/menuitem.h @@ -86,27 +86,27 @@ public: /** Returns the background colour associated with the menu item (Windows only). */ - wxColour GetBackgroundColour(); + wxColour GetBackgroundColour() const; /** Returns the checked or unchecked bitmap (Windows only). */ - wxBitmap GetBitmap(bool checked = true); + wxBitmap GetBitmap(bool checked = true) const; /** Returns the font associated with the menu item (Windows only). */ - wxFont GetFont(); + wxFont GetFont() const; /** Returns the help string associated with the menu item. */ - wxString GetHelp(); + wxString GetHelp() const; /** Returns the menu item identifier. */ - int GetId(); + int GetId() const; /** Returns the text associated with the menu item including any accelerator @@ -114,7 +114,7 @@ public: @see GetItemLabelText(), GetLabelText() */ - wxString GetItemLabel(); + wxString GetItemLabel() const; /** Returns the text associated with the menu item, without any accelerator @@ -122,13 +122,13 @@ public: @see GetItemLabel(), GetLabelText() */ - wxString GetItemLabelText(); + wxString GetItemLabelText() const; /** Returns the item kind, one of @c wxITEM_SEPARATOR, @c wxITEM_NORMAL, @c wxITEM_CHECK or @c wxITEM_RADIO. */ - wxItemKind GetKind(); + wxItemKind GetKind() const; /** Returns the text associated with the menu item without any accelerator @@ -137,7 +137,7 @@ public: @see GetText(), GetLabelFromText() */ - wxString GetLabel(); + wxString GetLabel() const; /** Strips all accelerator characters and mnemonics from the given @e text. @@ -163,13 +163,13 @@ public: /** Gets the width of the menu item checkmark bitmap (Windows only). */ - int GetMarginWidth(); + int GetMarginWidth() const; /** Returns the menu this menu item is in, or @NULL if this menu item is not attached. */ - wxMenu* GetMenu(); + wxMenu* GetMenu() const; /** Returns the text associated with the menu item. @@ -177,12 +177,12 @@ public: GetItemLabel() or GetItemLabelText() instead. */ - wxString GetName(); + wxString GetName() const; /** Returns the submenu associated with the menu item, or @NULL if there isn't one. */ - wxMenu* GetSubMenu(); + wxMenu* GetSubMenu() const; /** Returns the text associated with the menu item, such as it was passed to the @@ -191,42 +191,42 @@ public: @see GetLabel(), GetLabelFromText() */ - wxString GetText(); + wxString GetText() const; /** Returns the text colour associated with the menu item (Windows only). */ - wxColour GetTextColour(); + wxColour GetTextColour() const; /** Returns @true if the item is checkable. */ - bool IsCheckable(); + bool IsCheckable() const; /** Returns @true if the item is checked. */ - bool IsChecked(); + bool IsChecked() const; /** Returns @true if the item is enabled. */ - bool IsEnabled(); + bool IsEnabled() const; /** Returns @true if the item is a separator. */ - bool IsSeparator(); + bool IsSeparator() const; /** Returns @true if the item is a submenu. */ - bool IsSubMenu(); + bool IsSubMenu() const; /** Sets the background colour associated with the menu item (Windows only). */ - void SetBackgroundColour(const wxColour& colour); + void SetBackgroundColour(const wxColour& colour) const; /** Sets the bitmap for the menu item (Windows and GTK+ only). It is @@ -260,7 +260,7 @@ public: /** Sets the width of the menu item checkmark bitmap (Windows only). */ - void SetMarginWidth(int width); + void SetMarginWidth(int width) const; /** Sets the parent menu which will contain this menu item. diff --git a/interface/msgqueue.h b/interface/msgqueue.h index 75b9b1978e..1a22c706aa 100644 --- a/interface/msgqueue.h +++ b/interface/msgqueue.h @@ -34,7 +34,7 @@ public: Returns @true if the object had been initialized successfully, @false if an error occurred. */ - bool IsOk(); + bool IsOk() const; /** Add a message to this queue and signal the threads waiting for messages diff --git a/interface/mstream.h b/interface/mstream.h index b6ac5e9074..c4a6d363c3 100644 --- a/interface/mstream.h +++ b/interface/mstream.h @@ -36,13 +36,13 @@ public: wxMemoryOutputStream to an external buffer. @a len specifies the size of the buffer. */ - size_t CopyTo(char* buffer, size_t len); + size_t CopyTo(char* buffer, size_t len) const; /** Returns the pointer to the stream object used as an internal buffer for that stream. */ - wxStreamBuffer* GetOutputStreamBuffer(); + wxStreamBuffer* GetOutputStreamBuffer() const; }; @@ -83,5 +83,5 @@ public: Returns the pointer to the stream object used as an internal buffer for that stream. */ - wxStreamBuffer* GetInputStreamBuffer(); + wxStreamBuffer* GetInputStreamBuffer() const; }; diff --git a/interface/msw/ole/activex.h b/interface/msw/ole/activex.h index 5422158629..c5a6ec65dc 100644 --- a/interface/msw/ole/activex.h +++ b/interface/msw/ole/activex.h @@ -28,22 +28,22 @@ public: Returns the dispatch id of this activex event. This is the numeric value from the .idl file specified by the id(). */ - DISPID GetDispatchId(int idx); + DISPID GetDispatchId(int idx) const; /** Obtains the number of parameters passed through the activex event. */ - size_t ParamCount(); + size_t ParamCount() const; /** Obtains the param name of the param number idx specifies as a string. */ - wxString ParamName(size_t idx); + wxString ParamName(size_t idx) const; /** Obtains the param type of the param number idx specifies as a string. */ - wxString ParamType(size_t idx); + wxString ParamType(size_t idx) const; /** Obtains the actual parameter value specified by idx. diff --git a/interface/msw/ole/automtn.h b/interface/msw/ole/automtn.h index 1e3a2bafcd..20fefcc838 100644 --- a/interface/msw/ole/automtn.h +++ b/interface/msw/ole/automtn.h @@ -70,8 +70,8 @@ public: example: */ wxVariant CallMethod(const wxString& method, int noArgs, - wxVariant args[]); - wxVariant CallMethod(const wxString& method, ... ); + wxVariant args[]) const; + const wxVariant CallMethod(const wxString& method, ... ) const; //@} /** @@ -79,12 +79,12 @@ public: successfully created, or @false if not. */ - bool CreateInstance(const wxString& classId); + bool CreateInstance(const wxString& classId) const; /** Gets the IDispatch pointer. */ - IDispatch* GetDispatchPtr(); + IDispatch* GetDispatchPtr() const; /** Retrieves the current object associated with a class id, and attaches the @@ -96,7 +96,7 @@ public: such as two copies of Excel running. Which object is referenced cannot currently be specified. */ - bool GetInstance(const wxString& classId); + bool GetInstance(const wxString& classId) const; /** Retrieves a property from this object, assumed to be a dispatch pointer, and @@ -112,7 +112,7 @@ public: */ bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, - wxVariant args[] = NULL); + wxVariant args[] = NULL) const; //@{ /** @@ -131,8 +131,8 @@ public: needing to call GetProperty several times using several temporary objects. */ wxVariant GetProperty(const wxString& property, int noArgs, - wxVariant args[]); - wxVariant GetProperty(const wxString& property, ... ); + wxVariant args[]) const; + const wxVariant GetProperty(const wxString& property, ... ) const; //@} /** @@ -163,7 +163,7 @@ public: bool Invoke(const wxString& member, int action, wxVariant& retValue, int noArgs, wxVariant args[], - const wxVariant* ptrArgs[] = 0); + const wxVariant* ptrArgs[] = 0) const; //@{ /** @@ -183,7 +183,7 @@ public: */ bool PutProperty(const wxString& property, int noArgs, wxVariant args[]); - bool PutProperty(const wxString& property, ... ); + const bool PutProperty(const wxString& property, ... ); //@} /** diff --git a/interface/msw/registry.h b/interface/msw/registry.h index 5515b4443b..c9b07218d7 100644 --- a/interface/msw/registry.h +++ b/interface/msw/registry.h @@ -77,7 +77,7 @@ public: /** Returns @true if the key exists. */ - static bool Exists(); + static bool Exists() const; /** Gets the first key. @@ -102,52 +102,52 @@ public: The maximum length of a value. */ bool GetKeyInfo(size_t* pnSubKeys, size_t* pnValues, - size_t* pnMaxValueLen); + size_t* pnMaxValueLen) const; /** Gets the name of the registry key. */ - wxString GetName(bool bShortPrefix = true); + wxString GetName(bool bShortPrefix = true) const; /** Gets the next key. */ - bool GetNextKey(wxString& strKeyName, long& lIndex); + bool GetNextKey(wxString& strKeyName, long& lIndex) const; /** Gets the next key value for this key. */ - bool GetNextValue(wxString& strValueName, long& lIndex); + bool GetNextValue(wxString& strValueName, long& lIndex) const; /** Returns @true if given subkey exists. */ - bool HasSubKey(const wxChar* szKey); + bool HasSubKey(const wxChar* szKey) const; /** Returns @true if any subkeys exist. */ - bool HasSubKeys(); + bool HasSubKeys() const; /** Returns @true if the value exists. */ - bool HasValue(const wxChar* szValue); + bool HasValue(const wxChar* szValue) const; /** Returns @true if any values exist. */ - bool HasValues(); + bool HasValues() const; /** Returns @true if this key is empty, nothing under this key. */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns @true if the key is opened. */ - bool IsOpened(); + bool IsOpened() const; /** Explicitly opens the key. This method also allows the key to be opened in @@ -160,8 +160,8 @@ public: /** Retrieves the numeric value. */ - bool QueryValue(const wxChar* szValue, wxString& strValue); - bool QueryValue(const wxChar* szValue, long* plValue); + bool QueryValue(const wxChar* szValue, wxString& strValue) const; + const bool QueryValue(const wxChar* szValue, long* plValue) const; //@} /** diff --git a/interface/notebook.h b/interface/notebook.h index 7c1e6e70da..7c0e03bc6c 100644 --- a/interface/notebook.h +++ b/interface/notebook.h @@ -45,7 +45,7 @@ public: /** Returns the page that was selected before the change, -1 if none was selected. */ - int GetOldSelection(); + int GetOldSelection() const; /** Returns the currently selected page, or -1 if none was selected. @@ -59,7 +59,7 @@ public: you presumably don't need them anyhow as you already have the corresponding information). */ - int GetSelection(); + int GetSelection() const; /** Sets the id of the page selected before the change. @@ -218,14 +218,14 @@ public: /** Returns the currently selected notebook page or @NULL. */ - wxWindow* GetCurrentPage(); + wxWindow* GetCurrentPage() const; /** Returns the associated image list. @see wxImageList, SetImageList() */ - wxImageList* GetImageList(); + wxImageList* GetImageList() const; /** Returns the window at the given page position. @@ -235,22 +235,22 @@ public: /** Returns the number of pages in the notebook control. */ - size_t GetPageCount(); + size_t GetPageCount() const; /** Returns the image index for the given page. */ - int GetPageImage(size_t nPage); + int GetPageImage(size_t nPage) const; /** Returns the string for the given page. */ - wxString GetPageText(size_t nPage); + wxString GetPageText(size_t nPage) const; /** Returns the number of rows in the notebook control. */ - int GetRowCount(); + int GetRowCount() const; /** Returns the currently selected page, or -1 if none was selected. @@ -260,7 +260,7 @@ public: wxNotebookEvent::GetSelection should be used instead in this case. */ - int GetSelection(); + int GetSelection() const; /** If running under Windows and themes are enabled for the application, this @@ -269,7 +269,7 @@ public: can be passed to @c SetBackgroundColour. Otherwise, an uninitialised colour will be returned. */ - wxColour GetThemeBackgroundColour(); + wxColour GetThemeBackgroundColour() const; /** Returns the index of the tab at the specified position or @c wxNOT_FOUND diff --git a/interface/object.h b/interface/object.h index 32f85b35aa..70371a2ca6 100644 --- a/interface/object.h +++ b/interface/object.h @@ -51,7 +51,7 @@ public: When this goes to zero during a DecRef() call, the object will auto-free itself. */ - int GetRefCount(); + int GetRefCount() const; /** Increments the reference count associated with this shared data. @@ -132,7 +132,7 @@ public: @see Ref(), UnRef(), wxObject::m_refData, SetRefData(), wxObjectRefData */ - wxObjectRefData* GetRefData(); + wxObjectRefData* GetRefData() const; /** Determines whether this class is a subclass of (or the same class as) @@ -256,7 +256,7 @@ public: been declared dynamically creatable (typically, it is an abstract class). */ - wxObject* CreateObject(); + wxObject* CreateObject() const; /** Finds the wxClassInfo object for a class of the given string name. @@ -266,22 +266,22 @@ public: /** Returns the name of the first base class (@NULL if none). */ - wxChar* GetBaseClassName1(); + wxChar* GetBaseClassName1() const; /** Returns the name of the second base class (@NULL if none). */ - wxChar* GetBaseClassName2(); + wxChar* GetBaseClassName2() const; /** Returns the string form of the class name. */ - wxChar* GetClassName(); + wxChar* GetClassName() const; /** Returns the size of the class. */ - int GetSize(); + int GetSize() const; /** Initializes pointers in the wxClassInfo objects for fast execution @@ -292,7 +292,7 @@ public: /** Returns @true if this class info can create objects of the associated class. */ - bool IsDynamic(); + bool IsDynamic() const; /** Returns @true if this class is a kind of (inherits from) the given class. @@ -347,7 +347,7 @@ public: Gets a pointer to the reference counted object to which this class points. */ - T* get(); + T* get() const; /** Conversion to a boolean expression (in a variant which is not @@ -355,20 +355,20 @@ public: contains a valid pointer it will return @e @true, if it contains a @NULL pointer it will return @e @false. */ - operator unspecified_bool_type(); + operator unspecified_bool_type() const; /** Returns a reference to the object. If the internal pointer is @NULL this method will cause an assert in debug mode. */ - T operator*(); + T operator*() const; /** Returns a pointer to the reference counted object to which this class points. If this the internal pointer is @NULL, this method will assert in debug mode. */ - T* operator-(); + T* operator-() const; //@{ /** diff --git a/interface/odcombo.h b/interface/odcombo.h index 14b85a248b..e052631403 100644 --- a/interface/odcombo.h +++ b/interface/odcombo.h @@ -129,12 +129,12 @@ public: /** Returns index to the widest item in the list. */ - int GetWidestItem(); + int GetWidestItem() const; /** Returns width of the widest item in the list. */ - int GetWidestItemWidth(); + int GetWidestItemWidth() const; /** This method is used to draw the items background and, maybe, a border around it. @@ -145,7 +145,7 @@ public: @remarks flags has the same meaning as with OnDrawItem. */ void OnDrawBackground(wxDC& dc, const wxRect& rect, int item, - int flags); + int flags) const; /** The derived class may implement this function to actually draw the item @@ -163,7 +163,7 @@ public: Combines any of the following flag values: */ void OnDrawItem(wxDC& dc, const wxRect& rect, int item, - int flags); + int flags) const; /** The derived class may implement this method to return the height of the @@ -171,7 +171,7 @@ public: The default implementation returns text height, as if this control was a normal combobox. */ - wxCoord OnMeasureItem(size_t item); + wxCoord OnMeasureItem(size_t item) const; /** The derived class may implement this method to return the width of the @@ -179,5 +179,5 @@ public: is used. The default implementation returns -1. */ - wxCoord OnMeasureItemWidth(size_t item); + wxCoord OnMeasureItemWidth(size_t item) const; }; diff --git a/interface/palette.h b/interface/palette.h index 25dbe12930..06273aeec9 100644 --- a/interface/palette.h +++ b/interface/palette.h @@ -92,7 +92,7 @@ public: /** Returns number of entries in palette. */ - int GetColoursCount(); + int GetColoursCount() const; /** Returns a pixel value (index into the palette) for the given RGB values. @@ -109,7 +109,7 @@ public: @see GetRGB() */ int GetPixel(unsigned char red, unsigned char green, - unsigned char blue); + unsigned char blue) const; /** Returns RGB values for a given palette index. @@ -129,12 +129,12 @@ public: */ bool GetRGB(int pixel, const unsigned char* red, const unsigned char* green, - const unsigned char* blue); + const unsigned char* blue) const; /** Returns @true if palette data is present. */ - bool IsOk(); + bool IsOk() const; /** Assignment operator, using @ref overview_trefcount "reference counting". diff --git a/interface/panel.h b/interface/panel.h index f11b7a65d8..d7e1f6985f 100644 --- a/interface/panel.h +++ b/interface/panel.h @@ -77,7 +77,7 @@ public: can accept the focus. This is reevaluated each time a child window is added or removed from the panel. */ - bool AcceptsFocus(); + bool AcceptsFocus() const; /** Used for two-step panel construction. See wxPanel() diff --git a/interface/pen.h b/interface/pen.h index 42e360c1c8..56ee53f991 100644 --- a/interface/pen.h +++ b/interface/pen.h @@ -255,14 +255,14 @@ public: @see SetCap() */ - int GetCap(); + int GetCap() const; /** Returns a reference to the pen colour. @see SetColour() */ - wxColour GetColour(); + wxColour GetColour() const; /** Gets an array of dashes (defined as char in X, DWORD under Windows). @@ -272,7 +272,7 @@ public: @see SetDashes() */ - int GetDashes(wxDash** dashes); + int GetDashes(wxDash** dashes) const; /** Returns the pen join style, which may be one of @b wxJOIN_BEVEL, @b @@ -281,33 +281,33 @@ public: @see SetJoin() */ - int GetJoin(); + int GetJoin() const; /** Gets a pointer to the stipple bitmap. @see SetStipple() */ - wxBitmap* GetStipple(); + wxBitmap* GetStipple() const; /** Returns the pen style. @see wxPen(), SetStyle() */ - int GetStyle(); + int GetStyle() const; /** Returns the pen width. @see SetWidth() */ - int GetWidth(); + int GetWidth() const; /** Returns @true if the pen is initialised. */ - bool IsOk(); + bool IsOk() const; /** Sets the pen cap style, which may be one of @b wxCAP_ROUND, @b wxCAP_PROJECTING diff --git a/interface/pickerbase.h b/interface/pickerbase.h index 6e70150998..a68e1b7612 100644 --- a/interface/pickerbase.h +++ b/interface/pickerbase.h @@ -38,12 +38,12 @@ public: Returns the margin (in pixel) between the picker and the text control. This function can be used only when HasTextCtrl() returns @true. */ - int GetInternalMargin(); + int GetInternalMargin() const; /** Returns the proportion value of the picker. */ - int GetPickerCtrlProportion(); + int GetPickerCtrlProportion() const; /** Returns a pointer to the text control handled by this window or @NULL if the @@ -57,25 +57,25 @@ public: Returns the proportion value of the text control. This function can be used only when HasTextCtrl() returns @true. */ - int GetTextCtrlProportion(); + int GetTextCtrlProportion() const; /** Returns @true if this window has a valid text control (i.e. if the @b wxPB_USE_TEXTCTRL style was given when creating this control). */ - bool HasTextCtrl(); + bool HasTextCtrl() const; /** Returns @true if the picker control is growable. */ - bool IsPickerCtrlGrowable(); + bool IsPickerCtrlGrowable() const; /** Returns @true if the text control is growable. This function can be used only when HasTextCtrl() returns @true. */ - bool IsTextCtrlGrowable(); + bool IsTextCtrlGrowable() const; /** Sets the margin (in pixel) between the picker and the text control. diff --git a/interface/platinfo.h b/interface/platinfo.h index 4f3d6a455b..4c1388f899 100644 --- a/interface/platinfo.h +++ b/interface/platinfo.h @@ -45,7 +45,7 @@ public: @see GetOSMajorVersion(), GetOSMinorVersion(), CheckToolkitVersion() */ - bool CheckOSVersion(int major, int minor); + bool CheckOSVersion(int major, int minor) const; /** Returns @true if the toolkit version is at least @c major.minor. @@ -53,7 +53,7 @@ public: @see GetToolkitMajorVersion(), GetToolkitMinorVersion(), CheckOSVersion() */ - bool CheckToolkitVersion(int major, int minor); + bool CheckToolkitVersion(int major, int minor) const; /** Returns the global wxPlatformInfo object, initialized with the values for the @@ -72,29 +72,29 @@ public: /** Returns the name for the architecture of this wxPlatformInfo instance. */ - static wxString GetArchName(wxArchitecture arch); - wxString GetArchName(); + static wxString GetArchName(wxArchitecture arch) const; + wxString GetArchName() const; //@} /** Returns the architecture ID of this wxPlatformInfo instance. */ - wxArchitecture GetArchitecture(); + wxArchitecture GetArchitecture() const; //@{ /** Returns the endianness ID of this wxPlatformInfo instance. */ - static wxEndianness GetEndianness(const wxString& end); - wxEndianness GetEndianness(); + static wxEndianness GetEndianness(const wxString& end) const; + wxEndianness GetEndianness() const; //@} //@{ /** Returns the name for the endianness of this wxPlatformInfo instance. */ - static wxString GetEndiannessName(wxEndianness end); - wxString GetEndiannessName(); + static wxString GetEndiannessName(wxEndianness end) const; + wxString GetEndiannessName() const; //@} /** @@ -104,7 +104,7 @@ public: @see CheckOSVersion() */ - int GetOSMajorVersion(); + int GetOSMajorVersion() const; /** Returns the run-time minor version of the OS associated with this @@ -113,23 +113,23 @@ public: @see CheckOSVersion() */ - int GetOSMinorVersion(); + int GetOSMinorVersion() const; //@{ /** Returns the operating system family name of the OS associated with this wxPlatformInfo instance. */ - static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os); - wxString GetOperatingSystemFamilyName(); + static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os) const; + wxString GetOperatingSystemFamilyName() const; //@} //@{ /** Returns the operating system ID of this wxPlatformInfo instance. */ - static wxOperatingSystemId GetOperatingSystemId(const wxString& name); - wxOperatingSystemId GetOperatingSystemId(); + static wxOperatingSystemId GetOperatingSystemId(const wxString& name) const; + wxOperatingSystemId GetOperatingSystemId() const; //@} //@{ @@ -137,16 +137,16 @@ public: Returns the operating system name of the OS associated with this wxPlatformInfo instance. */ - static wxString GetOperatingSystemIdName(wxOperatingSystemId os); - wxString GetOperatingSystemIdName(); + static wxString GetOperatingSystemIdName(wxOperatingSystemId os) const; + wxString GetOperatingSystemIdName() const; //@} //@{ /** Returns the wxWidgets port ID associated with this wxPlatformInfo instance. */ - static wxPortId GetPortId(const wxString& portname); - wxPortId GetPortId(); + static wxPortId GetPortId(const wxString& portname) const; + wxPortId GetPortId() const; //@} //@{ @@ -154,8 +154,8 @@ public: Returns the name of the wxWidgets port ID associated with this wxPlatformInfo instance. */ - static wxString GetPortIdName(wxPortId port, bool usingUniversal); - wxString GetPortIdName(); + static wxString GetPortIdName(wxPortId port, bool usingUniversal) const; + wxString GetPortIdName() const; //@} //@{ @@ -164,8 +164,8 @@ public: wxPlatformInfo instance. */ static wxString GetPortIdShortName(wxPortId port, - bool usingUniversal); - wxString GetPortIdShortName(); + bool usingUniversal) const; + wxString GetPortIdShortName() const; //@} /** @@ -177,7 +177,7 @@ public: @see CheckToolkitVersion() */ - int GetToolkitMajorVersion(); + int GetToolkitMajorVersion() const; /** Returns the run-time minor version of the toolkit associated with this @@ -188,17 +188,17 @@ public: @see CheckToolkitVersion() */ - int GetToolkitMinorVersion(); + int GetToolkitMinorVersion() const; /** Returns @true if this instance is fully initialized with valid values. */ - bool IsOk(); + bool IsOk() const; /** Returns @true if this wxPlatformInfo describes wxUniversal build. */ - bool IsUsingUniversalWidgets(); + bool IsUsingUniversalWidgets() const; /** Sets the architecture enum value associated with this wxPlatformInfo instance. @@ -234,10 +234,10 @@ public: /** Inequality operator. Tests all class' internal variables. */ - bool operator!=(const wxPlatformInfo& t); + bool operator!=(const wxPlatformInfo& t) const; /** Equality operator. Tests all class' internal variables. */ - bool operator==(const wxPlatformInfo& t); + bool operator==(const wxPlatformInfo& t) const; }; diff --git a/interface/position.h b/interface/position.h index bf9dec7ee1..2813de6c23 100644 --- a/interface/position.h +++ b/interface/position.h @@ -35,32 +35,32 @@ public: /** A synonym for GetColumn(). */ - int GetCol(); + int GetCol() const; /** Get the current row value. */ - int GetColumn(); + int GetColumn() const; /** Get the current row value. */ - int GetRow(); + int GetRow() const; //@{ /** */ - bool operator ==(const wxPosition& p); - bool operator !=(const wxPosition& p); - wxPosition operator +=(const wxPosition& p); - wxPosition operator -=(const wxPosition& p); - wxPosition operator +=(const wxSize& s); - wxPosition operator -=(const wxSize& s); - wxPosition operator +(const wxPosition& p); - wxPosition operator -(const wxPosition& p); - wxPosition operator +(const wxSize& s); - wxPosition operator -(const wxSize& s); + bool operator ==(const wxPosition& p) const; + const bool operator !=(const wxPosition& p) const; + const wxPosition& operator +=(const wxPosition& p) const; + wxPosition operator -=(const wxPosition& p) const; + wxPosition operator +=(const wxSize& s) const; + wxPosition operator -=(const wxSize& s) const; + wxPosition operator +(const wxPosition& p) const; + const wxPosition operator -(const wxPosition& p) const; + const wxPosition operator +(const wxSize& s) const; + const wxPosition operator -(const wxSize& s) const; //@} /** diff --git a/interface/process.h b/interface/process.h index d77a129e7e..5487817c8d 100644 --- a/interface/process.h +++ b/interface/process.h @@ -107,26 +107,26 @@ public: Returns an input stream which corresponds to the standard error output (stderr) of the child process. */ - wxInputStream* GetErrorStream(); + wxInputStream* GetErrorStream() const; /** It returns an input stream corresponding to the standard output stream of the subprocess. If it is @NULL, you have not turned on the redirection. See Redirect(). */ - wxInputStream* GetInputStream(); + wxInputStream* GetInputStream() const; /** It returns an output stream correspoding to the input stream of the subprocess. If it is @NULL, you have not turned on the redirection. See Redirect(). */ - wxOutputStream* GetOutputStream(); + wxOutputStream* GetOutputStream() const; /** Returns the process ID of the process launched by Open(). */ - long GetPid(); + long GetPid() const; /** Returns @true if there is data to be read on the child process standard @@ -134,7 +134,7 @@ public: @see IsInputAvailable() */ - bool IsErrorAvailable(); + bool IsErrorAvailable() const; /** Returns @true if there is data to be read on the child process standard @@ -145,12 +145,12 @@ public: @see IsInputOpened() */ - bool IsInputAvailable(); + bool IsInputAvailable() const; /** Returns @true if the child process standard output stream is opened. */ - bool IsInputOpened(); + bool IsInputOpened() const; /** Send the specified signal to the given process. Possible signal values are: @@ -245,5 +245,5 @@ public: /** Returns the process id. */ - int GetPid(); + int GetPid() const; }; diff --git a/interface/propdlg.h b/interface/propdlg.h index 11642b28ee..93cc064a3f 100644 --- a/interface/propdlg.h +++ b/interface/propdlg.h @@ -109,18 +109,18 @@ public: /** Returns the book control that will contain your settings pages. */ - wxBookCtrlBase* GetBookCtrl(); + wxBookCtrlBase* GetBookCtrl() const; /** Returns the inner sizer that contains the book control and button sizer. */ - wxSizer* GetInnerSizer(); + wxSizer* GetInnerSizer() const; /** Returns the sheet style. See SetSheetStyle() for permissable values. */ - long GetSheetStyle(); + long GetSheetStyle() const; /** Call this to lay out the dialog. On PocketPC, this does nothing, since the diff --git a/interface/protocol/http.h b/interface/protocol/http.h index 0a14fab982..ecbba75b79 100644 --- a/interface/protocol/http.h +++ b/interface/protocol/http.h @@ -53,7 +53,7 @@ public: Returns the HTTP response code returned by the server. Please refer to RFC 2616 for the list of responses. */ - int GetResponse(); + int GetResponse() const; /** It sets data of a field to be sent during the next request to the HTTP server. diff --git a/interface/ptr_scpd.h b/interface/ptr_scpd.h index 24300e8dda..cdb46b6074 100644 --- a/interface/ptr_scpd.h +++ b/interface/ptr_scpd.h @@ -200,7 +200,7 @@ public: /** Returns pointer to object or @NULL. */ - T* get(); + T* get() const; /** Conversion to a boolean expression (in a variant which is not @@ -208,19 +208,19 @@ public: contains a valid pointer it will return @e @true, if it contains a @NULL pointer it will return @e @false. */ - operator unspecified_bool_type(); + operator unspecified_bool_type() const; /** Returns a reference to the object. If the internal pointer is @NULL this method will cause an assert in debug mode. */ - T operator*(); + T operator*() const; /** Returns pointer to object. If the pointer is @NULL this method will cause an assert in debug mode. */ - T* operator-(); + T* operator-() const; /** Releases the current pointer and returns it. diff --git a/interface/ptr_shrd.h b/interface/ptr_shrd.h index 139ceee10f..52ad2b2c93 100644 --- a/interface/ptr_shrd.h +++ b/interface/ptr_shrd.h @@ -40,7 +40,7 @@ public: /** Returns pointer to its object or @NULL. */ - T* get(); + T* get() const; /** Conversion to a boolean expression (in a variant which is not @@ -48,18 +48,18 @@ public: contains a valid pointer it will return @e @true, if it contains a @NULL pointer it will return @e @false. */ - operator unspecified_bool_type(); + operator unspecified_bool_type() const; /** Returns a reference to the object. If the internal pointer is @NULL this method will cause an assert in debug mode. */ - T operator*(); + T operator*() const; /** Returns pointer to its object or @NULL. */ - T* operator-(); + T* operator-() const; /** Assignment operator. Releases any previously held pointer @@ -76,10 +76,10 @@ public: /** Returns @true if this is the only pointer pointing to its object. */ - bool unique(); + bool unique() const; /** Returns the number of pointers pointing to its object. */ - long use_count(); + long use_count() const; }; diff --git a/interface/radiobox.h b/interface/radiobox.h index dd57b38e78..e8241a9a48 100644 --- a/interface/radiobox.h +++ b/interface/radiobox.h @@ -149,12 +149,12 @@ public: @param string The string to find. */ - int FindString(const wxString& string); + int FindString(const wxString& string) const; /** Returns the number of columns in the radiobox. */ - unsigned int GetColumnCount(); + unsigned int GetColumnCount() const; /** Returns a radio box item under the point, a zero-based item index, or @c @@ -163,7 +163,7 @@ public: @param pt Point in client coordinates. */ - int GetItemFromPoint(const wxPoint pt); + int GetItemFromPoint(const wxPoint pt) const; /** Returns the helptext associated with the specified @a item if any or @c @@ -174,14 +174,14 @@ public: @see SetItemHelpText() */ - wxString GetItemHelpText(unsigned int item); + wxString GetItemHelpText(unsigned int item) const; /** Returns the tooltip associated with the specified @a item if any or @NULL. @see SetItemToolTip(), wxWindow::GetToolTip */ - wxToolTip* GetItemToolTip(unsigned int item); + wxToolTip* GetItemToolTip(unsigned int item) const; /** Returns the radiobox label. @@ -191,17 +191,17 @@ public: @see SetLabel() */ - wxString GetLabel(); + wxString GetLabel() const; /** Returns the number of rows in the radiobox. */ - unsigned int GetRowCount(); + unsigned int GetRowCount() const; /** Returns the zero-based position of the selected button. */ - int GetSelection(); + int GetSelection() const; /** Returns the label for the button at the given position. @@ -209,12 +209,12 @@ public: @param n The zero-based button position. */ - wxString GetString(unsigned int n); + wxString GetString(unsigned int n) const; /** Returns the selected string. */ - wxString GetStringSelection(); + wxString GetStringSelection() const; /** Returns @true if the item is enabled or @false if it was disabled using @@ -225,7 +225,7 @@ public: @param n The zero-based button position. */ - bool IsItemEnabled(unsigned int n); + bool IsItemEnabled(unsigned int n) const; /** Returns @true if the item is currently shown or @false if it was hidden @@ -240,7 +240,7 @@ public: @param n The zero-based button position. */ - bool IsItemShown(unsigned int n); + bool IsItemShown(unsigned int n) const; /** Sets the helptext for an item. Empty string erases any existing helptext. diff --git a/interface/radiobut.h b/interface/radiobut.h index 0fa6d4441c..367aa692f9 100644 --- a/interface/radiobut.h +++ b/interface/radiobut.h @@ -102,7 +102,7 @@ public: /** Returns @true if the radio button is depressed, @false otherwise. */ - bool GetValue(); + bool GetValue() const; /** Sets the radio button to selected or deselected status. This does not cause a diff --git a/interface/recguard.h b/interface/recguard.h index e5c3a367c8..333940c61d 100644 --- a/interface/recguard.h +++ b/interface/recguard.h @@ -91,5 +91,5 @@ public: (may be simply returning) to prevent reentrant calls to itself. If this method returns @false, it is safe to continue. */ - bool IsInside(); + bool IsInside() const; }; diff --git a/interface/regex.h b/interface/regex.h index be39e63ae7..ed0eb41abc 100644 --- a/interface/regex.h +++ b/interface/regex.h @@ -71,9 +71,11 @@ public: and only if @c wxRE_NOSUB was @b not used in Compile(). */ - bool GetMatch(size_t* start, size_t* len, size_t index = 0); - not wxString GetMatch(const wxString& text, - size_t index = 0); + bool GetMatch(size_t* start, size_t* len, size_t index = 0) const; + const not used in + Compile(). + Returns false if no match or if an error occurred. + wxString GetMatch(const wxString& text, size_t index = 0) const; //@} /** @@ -82,13 +84,13 @@ public: May only be called after successful call to Compile(). and only if @c wxRE_NOSUB was @b not used. */ - size_t GetMatchCount(); + size_t GetMatchCount() const; /** Return @true if this is a valid compiled regular expression, @false otherwise. */ - bool IsValid(); + bool IsValid() const; //@{ /** @@ -105,9 +107,9 @@ public: possible to avoid a @e wxStrlen() inside the loop. May only be called after successful call to Compile(). */ - bool Matches(const wxChar* text, int flags = 0); - bool Matches(const wxChar* text, int flags, size_t len); - bool Matches(const wxString& text, int flags = 0); + bool Matches(const wxChar* text, int flags = 0) const; + const bool Matches(const wxChar* text, int flags, size_t len) const; + const bool Matches(const wxString& text, int flags = 0) const; //@} /** @@ -123,7 +125,7 @@ public: pattern in the text while default value of 0 means replace all. */ int Replace(wxString* text, const wxString& replacement, - size_t maxMatches = 0); + size_t maxMatches = 0) const; /** Replace all occurrences: this is actually a synonym for @@ -131,10 +133,10 @@ public: @see ReplaceFirst() */ - int ReplaceAll(wxString* text, const wxString& replacement); + int ReplaceAll(wxString* text, const wxString& replacement) const; /** Replace the first occurrence. */ - int ReplaceFirst(wxString* text, const wxString& replacement); + int ReplaceFirst(wxString* text, const wxString& replacement) const; }; diff --git a/interface/region.h b/interface/region.h index 4483c9be5c..834ddb3c6a 100644 --- a/interface/region.h +++ b/interface/region.h @@ -39,42 +39,42 @@ public: /** An alias for GetHeight. */ - wxCoord GetH(); + wxCoord GetH() const; /** Returns the height value for the current region. */ - wxCoord GetHeight(); + wxCoord GetHeight() const; /** Returns the current rectangle. */ - wxRect GetRect(); + wxRect GetRect() const; /** An alias for GetWidth. */ - wxCoord GetW(); + wxCoord GetW() const; /** Returns the width value for the current region. */ - wxCoord GetWidth(); + wxCoord GetWidth() const; /** Returns the x value for the current region. */ - wxCoord GetX(); + wxCoord GetX() const; /** Returns the y value for the current region. */ - wxCoord GetY(); + wxCoord GetY() const; /** Returns @true if there are still some rectangles; otherwise returns @false. */ - bool HaveRects(); + bool HaveRects() const; //@{ /** @@ -93,7 +93,7 @@ public: Returns @true if there are still some rectangles; otherwise returns @false. You can use this to test the iterator object as if it were of type bool. */ - operator bool(); + operator bool() const; }; @@ -156,27 +156,27 @@ public: @returns The return value is one of wxOutRegion, wxPartRegion and wxInRegion. */ - wxRegionContain Contains(long& x, long& y); - wxRegionContain Contains(const wxPoint& pt); - wxRegionContain Contains(long& x, long& y, - long& width, - long& height); - wxRegionContain Contains(const wxRect& rect); + wxRegionContain Contains(long& x, long& y) const; + const wxRegionContain Contains(const wxPoint& pt) const; + const wxRegionContain Contains(long& x, long& y, + long& width, + long& height) const; + const wxRegionContain Contains(const wxRect& rect) const; //@} /** Convert the region to a black and white bitmap with the white pixels being inside the region. */ - wxBitmap ConvertToBitmap(); + wxBitmap ConvertToBitmap() const; //@{ /** Returns the outer bounds of the region. */ void GetBox(wxCoord& x, wxCoord& y, wxCoord& width, - wxCoord& height); - wxRect GetBox(); + wxCoord& height) const; + const wxRect GetBox() const; //@} //@{ @@ -198,14 +198,14 @@ public: /** Returns @true if the region is empty, @false otherwise. */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns @true if the region is equal to, i.e. covers the same area as, another one. Note that if both this region and @a region are invalid, they are considered to be equal. */ - bool IsEqual(const wxRegion& region); + bool IsEqual(const wxRegion& region) const; //@{ /** diff --git a/interface/renderer.h b/interface/renderer.h index c82bff47f0..22277bf446 100644 --- a/interface/renderer.h +++ b/interface/renderer.h @@ -300,7 +300,7 @@ public: not base, class, to detect mismatches between the renderers versions and so you have to implement it anew in all renderers. */ - wxRendererVersion GetVersion(); + wxRendererVersion GetVersion() const; /** Load the renderer from the specified DLL, the returned pointer must be diff --git a/interface/richtext/richtextbuffer.h b/interface/richtext/richtextbuffer.h index a196108466..7666455a11 100644 --- a/interface/richtext/richtextbuffer.h +++ b/interface/richtext/richtextbuffer.h @@ -60,7 +60,7 @@ public: Returns @true if the buffer is currently collapsing commands into a single notional command. */ - bool BatchingUndo(); + bool BatchingUndo() const; /** Begins using alignment. @@ -224,7 +224,7 @@ public: /** Returns @true if content can be pasted from the clipboard. */ - bool CanPasteFromClipboard(); + bool CanPasteFromClipboard() const; /** Cleans up the file handlers. @@ -258,7 +258,7 @@ public: /** Clones the object. */ - wxRichTextObject* Clone(); + wxRichTextObject* Clone() const; /** Copies the given buffer. @@ -416,26 +416,26 @@ public: only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold). */ - const wxTextAttr GetBasicStyle(); + const wxTextAttr GetBasicStyle() const; /** Gets the collapsed command. */ - wxRichTextCommand* GetBatchedCommand(); + wxRichTextCommand* GetBatchedCommand() const; /** Gets the command processor. A text buffer always creates its own command processor when it is initialized. */ - wxCommandProcessor* GetCommandProcessor(); + wxCommandProcessor* GetCommandProcessor() const; /** Returns the current default style, affecting the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold). */ - const wxTextAttr GetDefaultStyle(); + const wxTextAttr GetDefaultStyle() const; /** Gets a wildcard incorporating all visible handlers. If @a types is present, @@ -501,12 +501,12 @@ public: /** Returns the current style sheet associated with the buffer, if any. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Get the size of the style stack, for example to check correct nesting. */ - size_t GetStyleStackSize(); + size_t GetStyleStackSize() const; /** Gets the attributes at the given position. @@ -568,7 +568,7 @@ public: /** Returns @true if the buffer has been modified. */ - bool IsModified(); + bool IsModified() const; //@{ /** @@ -767,7 +767,7 @@ public: /** Returns @true if undo suppression is currently on. */ - bool SuppressingUndo(); + bool SuppressingUndo() const; }; @@ -796,17 +796,17 @@ public: filename. By default, this function checks the extension. */ - bool CanHandle(const wxString& filename); + bool CanHandle(const wxString& filename) const; /** Override and return @true if this handler can load content. */ - bool CanLoad(); + bool CanLoad() const; /** Override and return @true if this handler can save content. */ - bool CanSave(); + bool CanSave() const; /** Override to load content from @a stream into @e buffer. @@ -821,34 +821,34 @@ public: /** Returns the encoding associated with the handler (if any). */ - const wxString GetEncoding(); + const wxString GetEncoding() const; /** Returns the extension associated with the handler. */ - wxString GetExtension(); + wxString GetExtension() const; /** Returns flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler. */ - int GetFlags(); + int GetFlags() const; /** Returns the name of the handler. */ - wxString GetName(); + wxString GetName() const; /** Returns the type of the handler. */ - int GetType(); + int GetType() const; /** Returns @true if this handler should be visible to the user. */ - bool IsVisible(); + bool IsVisible() const; //@{ /** @@ -941,7 +941,7 @@ public: Returns @true if the given position is within this range. Does not match if the range is empty. */ - bool Contains(long pos); + bool Contains(long pos) const; /** Converts the internal range, which uses the first and last character positions @@ -950,32 +950,32 @@ public: range. In other words, one is added to the end position. */ - wxRichTextRange FromInternal(); + wxRichTextRange FromInternal() const; /** Returns the end position. */ - long GetEnd(); + long GetEnd() const; /** Returns the length of the range. */ - long GetLength(); + long GetLength() const; /** Returns the start of the range. */ - long GetStart(); + long GetStart() const; /** Returns @true if this range is completely outside @e range. */ - bool IsOutside(const wxRichTextRange& range); + bool IsOutside(const wxRichTextRange& range) const; /** Returns @true if this range is completely within @e range. */ - bool IsWithin(const wxRichTextRange& range); + bool IsWithin(const wxRichTextRange& range) const; /** Limits this range to be within @e range. @@ -1009,17 +1009,17 @@ public: range. In other words, one is subtracted from the end position. */ - wxRichTextRange ToInternal(); + wxRichTextRange ToInternal() const; /** Adds @a range to this range. */ - wxRichTextRange operator+(const wxRichTextRange& range); + wxRichTextRange operator+(const wxRichTextRange& range) const; /** Subtracts @a range from this range. */ - wxRichTextRange operator-(const wxRichTextRange& range); + wxRichTextRange operator-(const wxRichTextRange& range) const; /** Assigns @a range to this range. @@ -1029,5 +1029,5 @@ public: /** Returns @true if @a range is the same as this range. */ - bool operator==(const wxRichTextRange& range); + bool operator==(const wxRichTextRange& range) const; }; diff --git a/interface/richtext/richtextctrl.h b/interface/richtext/richtextctrl.h index 0fa881bdaa..e27149e617 100644 --- a/interface/richtext/richtextctrl.h +++ b/interface/richtext/richtextctrl.h @@ -30,43 +30,43 @@ public: /** Clones the event. */ - wxEvent* Clone(); + wxEvent* Clone() const; /** Returns the character pressed, within a wxEVT_COMMAND_RICHTEXT_CHARACTER event. */ - wxChar GetCharacter(); + wxChar GetCharacter() const; /** Returns flags indicating modifier keys pressed. Possible values are wxRICHTEXT_CTRL_DOWN, wxRICHTEXT_SHIFT_DOWN, and wxRICHTEXT_ALT_DOWN. */ - int GetFlags(); + int GetFlags() const; /** Returns the new style sheet. Can be used in a wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler. */ - wxRichTextStyleSheet* GetNewStyleSheet(); + wxRichTextStyleSheet* GetNewStyleSheet() const; /** Returns the old style sheet. Can be used in a wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler. */ - wxRichTextStyleSheet* GetOldStyleSheet(); + wxRichTextStyleSheet* GetOldStyleSheet() const; /** Returns the buffer position at which the event occured. */ - long GetPosition(); + long GetPosition() const; /** Gets the range for the current operation. */ - wxRichTextRange GetRange(); + wxRichTextRange GetRange() const; /** Sets the character variable. @@ -197,7 +197,7 @@ public: /** Returns @true if undo commands are being batched. */ - bool BatchingUndo(); + bool BatchingUndo() const; /** Begins using alignment @@ -347,32 +347,32 @@ public: /** Returns @true if selected content can be copied to the clipboard. */ - bool CanCopy(); + bool CanCopy() const; /** Returns @true if selected content can be copied to the clipboard and deleted. */ - bool CanCut(); + bool CanCut() const; /** Returns @true if selected content can be deleted. */ - bool CanDeleteSelection(); + bool CanDeleteSelection() const; /** Returns @true if the clipboard content can be pasted to the buffer. */ - bool CanPaste(); + bool CanPaste() const; /** Returns @true if there is a command in the command history that can be redone. */ - bool CanRedo(); + bool CanRedo() const; /** Returns @true if there is a command in the command history that can be undone. */ - bool CanUndo(); + bool CanUndo() const; /** Clears the buffer content, leaving a single empty paragraph. Cannot be undone. @@ -446,7 +446,7 @@ public: /** Currently this simply returns @c wxSize(10, 10). */ - wxSize DoGetBestSize(); + wxSize DoGetBestSize() const; /** Ends alignment. @@ -565,7 +565,7 @@ public: Helper function for finding the caret position for the next word. Direction is 1 (forward) or -1 (backwards). */ - long FindNextWordPosition(int direction = 1); + long FindNextWordPosition(int direction = 1) const; /** Call this function to prevent refresh and allow fast updates, and then Thaw() to @@ -579,20 +579,20 @@ public: only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold). */ - const wxTextAttr GetBasicStyle(); + const wxTextAttr GetBasicStyle() const; //@{ /** Returns the buffer associated with the control. */ const wxRichTextBuffer GetBuffer(); - wxRichTextBuffer GetBuffer(); + const wxRichTextBuffer& GetBuffer(); //@} /** Returns the current caret position. */ - long GetCaretPosition(); + long GetCaretPosition() const; /** Returns the caret height and position for the given character position @@ -602,79 +602,79 @@ public: /** Gets the command processor associated with the control's buffer. */ - wxCommandProcessor* GetCommandProcessor(); + wxCommandProcessor* GetCommandProcessor() const; /** Returns the current default style, which can be used to change how subsequently inserted text is displayed. */ - const wxTextAttr GetDefaultStyle(); + const wxTextAttr GetDefaultStyle() const; /** Gets the size of the buffer beyond which layout is delayed during resizing. This optimizes sizing for large buffers. The default is 20000. */ - long GetDelayedLayoutThreshold(); + long GetDelayedLayoutThreshold() const; /** Gets the current filename associated with the control. */ - wxString GetFilename(); + wxString GetFilename() const; /** Returns the first visible position in the current view. */ - long GetFirstVisiblePosition(); + long GetFirstVisiblePosition() const; /** Returns flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler. */ - int GetHandlerFlags(); + int GetHandlerFlags() const; /** Returns the current insertion point. */ - long GetInsertionPoint(); + long GetInsertionPoint() const; /** Returns the last position in the buffer. */ - wxTextPos GetLastPosition(); + wxTextPos GetLastPosition() const; /** Returns the length of the specified line in characters. */ - int GetLineLength(long lineNo); + int GetLineLength(long lineNo) const; /** Returns the text for the given line. */ - wxString GetLineText(long lineNo); + wxString GetLineText(long lineNo) const; /** Transforms physical window position to logical (unscrolled) position. */ - wxPoint GetLogicalPoint(const wxPoint& ptPhysical); + wxPoint GetLogicalPoint(const wxPoint& ptPhysical) const; /** Returns the number of lines in the buffer. */ - int GetNumberOfLines(); + int GetNumberOfLines() const; /** Transforms logical (unscrolled) position to physical window position. */ - wxPoint GetPhysicalPoint(const wxPoint& ptLogical); + wxPoint GetPhysicalPoint(const wxPoint& ptLogical) const; /** Gets the text for the given range. The end point of range is specified as the last character position of the span of text, plus one. */ - wxString GetRange(long from, long to); + wxString GetRange(long from, long to) const; /** Returns the range of the current selection. @@ -682,17 +682,17 @@ public: of text, plus one. If the return values @a from and @a to are the same, there is no selection. */ - void GetSelection(long* from, long* to); + void GetSelection(long* from, long* to) const; /** Returns the selection range in character positions. -1, -1 means no selection. */ - const wxRichTextRange GetSelectionRange(); + const wxRichTextRange GetSelectionRange() const; /** Returns the text within the current selection range, if any. */ - wxString GetStringSelection(); + wxString GetStringSelection() const; /** Gets the attributes at the given position. @@ -717,7 +717,7 @@ public: allows named character and paragraph styles to be applied. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Gets the attributes at the given position. @@ -735,7 +735,7 @@ public: /** Returns the content of the entire control as a string. */ - wxString GetValue(); + wxString GetValue() const; /** Internal helper function returning the line for the visible caret position. If @@ -744,7 +744,7 @@ public: on the following line. So this function gets the line we're expecting to find if this is the case. */ - wxRichTextLine* GetVisibleLineForCaretPosition(long caretPosition); + wxRichTextLine* GetVisibleLineForCaretPosition(long caretPosition) const; /** Test if this whole range has character attributes of the specified kind. If any @@ -753,7 +753,7 @@ public: flags indicating which attributes are of interest. */ bool HasCharacterAttributes(const wxRichTextRange& range, - const wxTextAttr& style); + const wxTextAttr& style) const; /** Test if this whole range has paragraph attributes of the specified kind. If any @@ -763,12 +763,12 @@ public: flags indicating which attributes are of interest. */ bool HasParagraphAttributes(const wxRichTextRange& range, - const wxTextAttr& style); + const wxTextAttr& style) const; /** Returns @true if there is a selection. */ - bool HasSelection(); + bool HasSelection() const; //@{ /** @@ -776,10 +776,10 @@ public: @a pt is in device coords (not adjusted for the client area origin nor for scrolling). */ - wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long* pos); - wxTextCtrlHitTestResult HitTest(const wxPoint& pt, - wxTextCoord* col, - wxTextCoord* row); + wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long* pos) const; + const wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord* col, + wxTextCoord* row) const; //@} /** @@ -790,7 +790,7 @@ public: /** Initialises the command event. */ - void InitCommandEvent(wxCommandEvent& event); + void InitCommandEvent(wxCommandEvent& event) const; /** Returns @true if the user has recently set the default style without moving @@ -802,59 +802,59 @@ public: See also SetAndShowDefaultStyle(). */ - bool IsDefaultStyleShowing(); + bool IsDefaultStyleShowing() const; /** Returns @true if the control is editable. */ - bool IsEditable(); + bool IsEditable() const; /** Returns @true if Freeze has been called without a Thaw. */ - bool IsFrozen(); + bool IsFrozen() const; /** Returns @true if the buffer has been modified. */ - bool IsModified(); + bool IsModified() const; /** Returns @true if the control is multiline. */ - bool IsMultiLine(); + bool IsMultiLine() const; /** Returns @true if the given position is visible on the screen. */ - bool IsPositionVisible(long pos); + bool IsPositionVisible(long pos) const; /** Returns @true if all of the selection is aligned according to the specified flag. */ - bool IsSelectionAligned(wxTextAttrAlignment alignment); + bool IsSelectionAligned(wxTextAttrAlignment alignment) const; /** Returns @true if all of the selection is bold. */ - bool IsSelectionBold(); + bool IsSelectionBold() const; /** Returns @true if all of the selection is italic. */ - bool IsSelectionItalics(); + bool IsSelectionItalics() const; /** Returns @true if all of the selection is underlined. */ - bool IsSelectionUnderlined(); + bool IsSelectionUnderlined() const; /** Returns @true if the control is single-line. Currently wxRichTextCtrl does not support single-line editing. */ - bool IsSingleLine(); + bool IsSingleLine() const; /** Helper function implementing keyboard navigation. @@ -1101,7 +1101,7 @@ public: /** Converts a text position to zero-based column and line numbers. */ - bool PositionToXY(long pos, long* x, long* y); + bool PositionToXY(long pos, long* x, long* y) const; //@{ /** @@ -1358,7 +1358,7 @@ public: /** Returns @true if undo history suppression is on. */ - bool SuppressingUndo(); + bool SuppressingUndo() const; /** Call this function to end a Freeze and refresh the display. @@ -1402,5 +1402,5 @@ public: /** Translates from column and line number to position. */ - long XYToPosition(long x, long y); + long XYToPosition(long x, long y) const; }; diff --git a/interface/richtext/richtextformatdlg.h b/interface/richtext/richtextformatdlg.h index 1ca12a751d..3882135de0 100644 --- a/interface/richtext/richtextformatdlg.h +++ b/interface/richtext/richtextformatdlg.h @@ -55,17 +55,17 @@ public: /** Enumerate all available page identifiers. */ - virtual int GetPageId(int i); + virtual int GetPageId(int i) const; /** Gets the number of available page identifiers. */ - virtual int GetPageIdCount(); + virtual int GetPageIdCount() const; /** Gets the image index for the given page identifier. */ - virtual int GetPageImage(int id); + virtual int GetPageImage(int id) const; /** Set the property sheet style, called at the start of @@ -168,7 +168,7 @@ public: Gets the attributes being edited. */ const wxTextAttr GetAttributes(); - wxTextAttr GetAttributes(); + const wxTextAttr& GetAttributes(); //@} /** @@ -195,7 +195,7 @@ public: Returns the image list associated with the dialog, used for example if showing the dialog as a toolbook. */ - wxImageList* GetImageList(); + wxImageList* GetImageList() const; /** Gets common attributes from the given range and calls SetAttributes. Attributes @@ -207,12 +207,12 @@ public: /** Gets the associated style definition, if any. */ - wxRichTextStyleDefinition* GetStyleDefinition(); + wxRichTextStyleDefinition* GetStyleDefinition() const; /** Gets the associated style sheet, if any. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Sets the attributes to be edited. diff --git a/interface/richtext/richtexthtml.h b/interface/richtext/richtexthtml.h index 7817e3708b..84bdc6d60d 100644 --- a/interface/richtext/richtexthtml.h +++ b/interface/richtext/richtexthtml.h @@ -39,10 +39,10 @@ class wxRichTextHTMLHandler : public wxRichTextFileHandler { public: /** - , @b const wxString&@e ext = wxT("html"), @b int@e type = wxRICHTEXT_TYPE_HTML) + , wxString&@e ext = wxT("html"), @b int@e type = wxRICHTEXT_TYPE_HTML) Constructor. */ - wxRichTextHTMLHandler(); + wxRichTextHTMLHandler() const; /** Clears the image locations generated by the last operation. @@ -75,12 +75,12 @@ public: /** Returns the directory used to store temporary image files. */ - const wxString GetTempDir(); + const wxString GetTempDir() const; /** Returns the image locations for the last operation. */ - const wxArrayString GetTemporaryImageLocations(); + const wxArrayString GetTemporaryImageLocations() const; /** Reset the file counter, in case, for example, the same names are required each diff --git a/interface/richtext/richtextprint.h b/interface/richtext/richtextprint.h index 47ccee35b8..68da983d78 100644 --- a/interface/richtext/richtextprint.h +++ b/interface/richtext/richtextprint.h @@ -57,48 +57,48 @@ public: /** Returns the font specified for printing the header and footer. */ - const wxFont GetFont(); + const wxFont GetFont() const; /** Returns the margin between the text and the footer. */ - int GetFooterMargin(); + int GetFooterMargin() const; /** Returns the footer text on odd or even pages, and at a given position on the page (left, centre or right). */ wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, - wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; /** Returns the margin between the text and the header. */ - int GetHeaderMargin(); + int GetHeaderMargin() const; /** Returns the header text on odd or even pages, and at a given position on the page (left, centre or right). */ wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, - wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; /** Returns @true if the header and footer will be shown on the first page. */ - bool GetShowOnFirstPage(); + bool GetShowOnFirstPage() const; /** Helper function for getting the header or footer text, odd or even pages, and at a given position on the page (left, centre or right). */ wxString GetText(int headerFooter, wxRichTextOddEvenPage page, - wxRichTextPageLocation location); + wxRichTextPageLocation location) const; /** Returns the text colour for drawing the header and footer. */ - const wxColour GetTextColour(); + const wxColour GetTextColour() const; /** Initialises the object. @@ -186,7 +186,7 @@ public: /** Returns the header and footer data associated with the printout. */ - const wxRichTextHeaderFooterData GetHeaderFooterData(); + const wxRichTextHeaderFooterData GetHeaderFooterData() const; /** Gets the page information. @@ -197,7 +197,7 @@ public: /** Returns a pointer to the buffer being rendered. */ - wxRichTextBuffer* GetRichTextBuffer(); + wxRichTextBuffer* GetRichTextBuffer() const; /** Returns @true if the given page exists in the printout. @@ -260,19 +260,19 @@ public: for details. */ wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, - wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; /** Returns the internal wxRichTextHeaderFooterData object. */ - const wxRichTextHeaderFooterData GetHeaderFooterData(); + const wxRichTextHeaderFooterData GetHeaderFooterData() const; /** A convenience function to get the header text. See wxRichTextHeaderFooterData for details. */ wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, - wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; /** Returns a pointer to the internal page setup data. @@ -283,12 +283,12 @@ public: Returns the parent window to be used for the preview window and printing wait dialog. */ - wxWindow* GetParentWindow(); + wxWindow* GetParentWindow() const; /** Returns the dimensions to be used for the preview window. */ - const wxRect GetPreviewRect(); + const wxRect GetPreviewRect() const; /** Returns a pointer to the internal print data. @@ -298,7 +298,7 @@ public: /** Returns the title of the preview window or printing wait caption. */ - const wxString GetTitle(); + const wxString GetTitle() const; /** Shows the page setup dialog. diff --git a/interface/richtext/richtextstyledlg.h b/interface/richtext/richtextstyledlg.h index ed395c6024..1e43258a9f 100644 --- a/interface/richtext/richtextstyledlg.h +++ b/interface/richtext/richtextstyledlg.h @@ -109,39 +109,39 @@ public: bool ApplyStyle(wxRichTextCtrl* ctrl = NULL); /** - , @b const wxPoint&@e pos = wxDefaultPosition, @b const wxSize&@e size = - wxDefaultSize, @b long@e style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX) + , wxPoint&@e pos = wxDefaultPosition, wxSize&@e size = wxDefaultSize, @b + long@e style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX) Creates the dialog. See */ bool Create(int flags, wxRichTextStyleSheet* sheet, wxRichTextCtrl* ctrl, wxWindow* parent, - wxWindowID id = wxID_ANY); + wxWindowID id = wxID_ANY) const; /** Returns @true if the user has opted to restart numbering. */ - bool GetRestartNumbering(); + bool GetRestartNumbering() const; /** Returns the associated rich text control (if any). */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Returns selected style name. */ - wxString GetSelectedStyle(); + wxString GetSelectedStyle() const; /** Returns selected style definition. */ - wxRichTextStyleDefinition* GetSelectedStyleDefinition(); + wxRichTextStyleDefinition* GetSelectedStyleDefinition() const; /** Returns the associated style sheet. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Sets the flags used to control the interface presented to the user. @@ -172,5 +172,5 @@ public: /** Returns the flags used to control the interface presented to the user. */ - int GetFlags(); + int GetFlags() const; }; diff --git a/interface/richtext/richtextstyles.h b/interface/richtext/richtextstyles.h index 93d769616d..aa0c035143 100644 --- a/interface/richtext/richtextstyles.h +++ b/interface/richtext/richtextstyles.h @@ -58,27 +58,27 @@ public: /** Returns the associated rich text control, if any. */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Returns the wxChoice control used for selecting the style category. */ - wxChoice* GetStyleChoice(); + wxChoice* GetStyleChoice() const; /** Returns the wxListBox control used to view the style list. */ - wxRichTextStyleListBox* GetStyleListBox(); + wxRichTextStyleListBox* GetStyleListBox() const; /** Returns the associated style sheet, if any. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Returns the type of style to show in the list box. */ - wxRichTextStyleListBox::wxRichTextStyleType GetStyleType(); + wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const; /** Associates the control with a wxRichTextCtrl. @@ -130,31 +130,31 @@ public: /** Returns the style on which this style is based. */ - const wxString GetBaseStyle(); + const wxString GetBaseStyle() const; /** Returns the style's description. */ - const wxString GetDescription(); + const wxString GetDescription() const; /** Returns the style name. */ - const wxString GetName(); + const wxString GetName() const; //@{ /** Returns the attributes associated with this style. */ - wxTextAttr GetStyle(); - const wxTextAttr GetStyle(); + wxTextAttr GetStyle() const; + const wxTextAttr GetStyle() const; //@} /** Returns the style attributes combined with the attributes of the specified base style, if any. This function works recursively. */ - wxTextAttr GetStyleMergedWithBase(wxRichTextStyleSheet* sheet); + wxTextAttr GetStyleMergedWithBase(wxRichTextStyleSheet* sheet) const; /** Sets the name of the style that this style is based on. @@ -204,7 +204,7 @@ public: /** Returns the style that should normally follow this style. */ - const wxString GetNextStyle(); + const wxString GetNextStyle() const; /** Sets the style that should normally follow this style. @@ -254,44 +254,44 @@ public: /** Converts units in tenths of a millimetre to device units. */ - int ConvertTenthsMMToPixels(wxDC& dc, int units); + int ConvertTenthsMMToPixels(wxDC& dc, int units) const; /** Creates a suitable HTML fragment for a definition. */ - wxString CreateHTML(wxRichTextStyleDefinition* def); + wxString CreateHTML(wxRichTextStyleDefinition* def) const; /** If the return value is @true, clicking on a style name in the list will immediately apply the style to the associated rich text control. */ - bool GetApplyOnSelection(); + bool GetApplyOnSelection() const; /** Returns the wxRichTextCtrl associated with this listbox. */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Gets a style for a listbox index. */ - wxRichTextStyleDefinition* GetStyle(size_t i); + wxRichTextStyleDefinition* GetStyle(size_t i) const; /** Returns the style sheet associated with this listbox. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Returns the type of style to show in the list box. */ - wxRichTextStyleListBox::wxRichTextStyleType GetStyleType(); + wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const; /** Returns the HTML for this item. */ - wxString OnGetItem(size_t n); + wxString OnGetItem(size_t n) const; /** Implements left click behaviour, applying the clicked style to the @@ -372,12 +372,12 @@ public: /** Returns the wxRichTextCtrl associated with this control. */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Returns the style sheet associated with this control. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Associates the control with a wxRichTextCtrl. @@ -472,7 +472,7 @@ public: This function finds the level (from 0 to 9) whose indentation attribute mostly closely matches @a indent (expressed in tenths of a millimetre). */ - int FindLevelForIndent(int indent); + int FindLevelForIndent(int indent) const; /** This function combines the list style's base attributes and the level style @@ -481,7 +481,7 @@ public: included in the result. */ wxTextAttr GetCombinedStyle(int indent, - wxRichTextStyleSheet* styleSheet = NULL); + wxRichTextStyleSheet* styleSheet = NULL) const; /** This function combines the list style's base attributes and the style for the @@ -490,23 +490,23 @@ public: included in the result. */ wxTextAttr GetCombinedStyleLevel(int level, - wxRichTextStyleSheet* styleSheet = NULL); + wxRichTextStyleSheet* styleSheet = NULL) const; /** Returns the style for the given level. @a level is a number between 0 and 9. */ - const wxTextAttr* GetLevelAttributes(int level); + const wxTextAttr* GetLevelAttributes(int level) const; /** Returns the number of levels. This is hard-wired to 10. Returns the style for the given level. @e level is a number between 0 and 9. */ - int GetLevelCount(); + int GetLevelCount() const; /** Returns @true if the given level has numbered list attributes. */ - int IsNumbered(int level); + int IsNumbered(int level) const; //@{ /** @@ -578,62 +578,62 @@ public: /** Finds a character definition by name. */ - wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name); + wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const; /** Finds a list definition by name. */ - wxRichTextListStyleDefinition* FindListStyle(const wxString& name); + wxRichTextListStyleDefinition* FindListStyle(const wxString& name) const; /** Finds a paragraph definition by name. */ - wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name); + wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const; /** Finds a style definition by name. */ - wxRichTextStyleDefinition* FindStyle(const wxString& name); + wxRichTextStyleDefinition* FindStyle(const wxString& name) const; /** Returns the @e nth character style. */ - wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n); + wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n) const; /** Returns the number of character styles. */ - size_t GetCharacterStyleCount(); + size_t GetCharacterStyleCount() const; /** Returns the style sheet's description. */ - const wxString GetDescription(); + const wxString GetDescription() const; /** Returns the @e nth list style. */ - wxRichTextListStyleDefinition* GetListStyle(size_t n); + wxRichTextListStyleDefinition* GetListStyle(size_t n) const; /** Returns the number of list styles. */ - size_t GetListStyleCount(); + size_t GetListStyleCount() const; /** Returns the style sheet's name. */ - const wxString GetName(); + const wxString GetName() const; /** Returns the @e nth paragraph style. */ - wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n); + wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n) const; /** Returns the number of paragraph styles. */ - size_t GetParagraphStyleCount(); + size_t GetParagraphStyleCount() const; /** Removes a character style. diff --git a/interface/richtext/richtextsymboldlg.h b/interface/richtext/richtextsymboldlg.h index a0de9df2a6..927721cc84 100644 --- a/interface/richtext/richtextsymboldlg.h +++ b/interface/richtext/richtextsymboldlg.h @@ -114,46 +114,46 @@ public: //@} /** - , @b const wxPoint&@e pos = wxDefaultPosition, @b const wxSize&@e size = - wxDefaultSize, @b long@e style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX) + , wxPoint&@e pos = wxDefaultPosition, wxSize&@e size = wxDefaultSize, @b + long@e style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX) Creation: see @ref wxsymbolpickerdialog() "the constructor" for details about the parameters. */ bool Create(const wxString& symbol, const wxString& initialFont, const wxString& normalTextFont, wxWindow* parent, - wxWindowID id = wxID_ANY); + wxWindowID id = wxID_ANY) const; /** Returns the font name (the font reflected in the font list). */ - wxString GetFontName(); + wxString GetFontName() const; /** Returns @true if the dialog is showing the full range of Unicode characters. */ - bool GetFromUnicode(); + bool GetFromUnicode() const; /** Gets the font name used for displaying symbols in the absence of a selected font. */ - wxString GetNormalTextFontName(); + wxString GetNormalTextFontName() const; /** Gets the current or initial symbol as a string. */ - wxString GetSymbol(); + wxString GetSymbol() const; /** Gets the selected symbol character as an integer. */ - int GetSymbolChar(); + int GetSymbolChar() const; /** Returns @true if a symbol is selected. */ - bool HasSelection(); + bool HasSelection() const; /** Sets the initial/selected font name. @@ -185,5 +185,5 @@ public: Returns @true if the has specified normal text - that is, there is no selected font. */ - bool UseNormalFont(); + bool UseNormalFont() const; }; diff --git a/interface/richtext/richtextxml.h b/interface/richtext/richtextxml.h index e429030d7f..eeb2572673 100644 --- a/interface/richtext/richtextxml.h +++ b/interface/richtext/richtextxml.h @@ -23,20 +23,20 @@ class wxRichTextXMLHandler : public wxRichTextFileHandler { public: /** - , @b const wxString&@e ext = wxT("xml"), @b int@e type = wxRICHTEXT_TYPE_XML) + , wxString&@e ext = wxT("xml"), @b int@e type = wxRICHTEXT_TYPE_XML) Constructor. */ - wxRichTextXMLHandler(); + wxRichTextXMLHandler() const; /** Returns @true. */ - bool CanLoad(); + bool CanLoad() const; /** Returns @true. */ - bool CanSave(); + bool CanSave() const; /** Creates XML code for a given character or paragraph style. diff --git a/interface/sashwin.h b/interface/sashwin.h index 87fc7604e1..bae169d61e 100644 --- a/interface/sashwin.h +++ b/interface/sashwin.h @@ -86,12 +86,12 @@ public: /** Gets the maximum window size in the x direction. */ - int GetMaximumSizeX(); + int GetMaximumSizeX() const; /** Gets the maximum window size in the y direction. */ - int GetMaximumSizeY(); + int GetMaximumSizeY() const; /** Gets the minimum window size in the x direction. @@ -101,7 +101,7 @@ public: /** Gets the minimum window size in the y direction. */ - int GetMinimumSizeY(); + int GetMinimumSizeY() const; /** Returns @true if a sash is visible on the given edge, @false otherwise. @@ -111,7 +111,7 @@ public: @see SetSashVisible() */ - bool GetSashVisible(wxSashEdgePosition edge); + bool GetSashVisible(wxSashEdgePosition edge) const; /** Returns @true if the sash has a border, @false otherwise. @@ -122,7 +122,7 @@ public: @see SetSashBorder() */ - bool HasBorder(wxSashEdgePosition edge); + bool HasBorder(wxSashEdgePosition edge) const; /** Sets the maximum window size in the x direction. @@ -195,7 +195,7 @@ public: resize was applied. It is up to the application to set the window size if required. */ - wxRect GetDragRect(); + wxRect GetDragRect() const; /** Returns the status of the sash: one of wxSASH_STATUS_OK, @@ -203,11 +203,11 @@ public: If the drag caused the notional bounding box of the window to flip over, for example, the drag will be out of rage. */ - wxSashDragStatus GetDragStatus(); + wxSashDragStatus GetDragStatus() const; /** Returns the dragged edge. The return value is one of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT. */ - wxSashEdgePosition GetEdge(); + wxSashEdgePosition GetEdge() const; }; diff --git a/interface/scrolbar.h b/interface/scrolbar.h index 1b1541ec06..4ea95c9ad3 100644 --- a/interface/scrolbar.h +++ b/interface/scrolbar.h @@ -88,28 +88,28 @@ public: @see SetScrollbar() */ - int GetPageSize(); + int GetPageSize() const; /** Returns the length of the scrollbar. @see SetScrollbar() */ - int GetRange(); + int GetRange() const; /** Returns the current position of the scrollbar thumb. @see SetThumbPosition() */ - int GetThumbPosition(); + int GetThumbPosition() const; /** Returns the thumb or 'view' size. @see SetScrollbar() */ - int GetThumbSize(); + int GetThumbSize() const; /** Sets the scrollbar properties. diff --git a/interface/scrolwin.h b/interface/scrolwin.h index acaf77d2f1..5806b95c52 100644 --- a/interface/scrolwin.h +++ b/interface/scrolwin.h @@ -149,7 +149,7 @@ public: @see CalcUnscrolledPosition() */ - void CalcScrolledPosition(int x, int y, int* xx, int* yy); + void CalcScrolledPosition(int x, int y, int* xx, int* yy) const; /** Translates the device coordinates to the logical ones. For example, if a window @@ -161,7 +161,7 @@ public: @see CalcScrolledPosition() */ - void CalcUnscrolledPosition(int x, int y, int* xx, int* yy); + void CalcUnscrolledPosition(int x, int y, int* xx, int* yy) const; /** Creates the window for two-step construction. Derived classes @@ -219,7 +219,7 @@ public: @see SetScrollbars(), GetVirtualSize() */ - void GetScrollPixelsPerUnit(int* xUnit, int* yUnit); + void GetScrollPixelsPerUnit(int* xUnit, int* yUnit) const; /** Get the position at which the visible portion of the window starts. @@ -240,7 +240,7 @@ public: @see SetScrollbars() */ - void GetViewStart(int* x, int* y); + void GetViewStart(int* x, int* y) const; /** Gets the size in device units of the scrollable window area (as @@ -257,12 +257,12 @@ public: @see SetScrollbars(), GetScrollPixelsPerUnit() */ - void GetVirtualSize(int* x, int* y); + void GetVirtualSize(int* x, int* y) const; /** Motif only: @true if the window has a backing bitmap. */ - bool IsRetained(); + bool IsRetained() const; /** Called by the default paint event handler to allow the application to define diff --git a/interface/sizer.h b/interface/sizer.h index 0928d5b78f..eb59f52bef 100644 --- a/interface/sizer.h +++ b/interface/sizer.h @@ -146,38 +146,38 @@ public: /** Return the border attribute. */ - int GetBorder(); + int GetBorder() const; /** Return the flags attribute. */ - int GetFlag(); + int GetFlag() const; /** Return the numeric id of wxSizerItem, or @c wxID_NONE if the id has not been set. */ - int GetId(); + int GetId() const; /** Get the minimum size needed for the item. */ - wxSize GetMinSize(); + wxSize GetMinSize() const; /** What is the current position of the item, as set in the last Layout. */ - wxPoint GetPosition(); + wxPoint GetPosition() const; /** Get the proportion item attribute. */ - int GetProportion(); + int GetProportion() const; /** Get the ration item attribute. */ - float GetRatio(); + float GetRatio() const; /** Get the rectangle of the item on the parent window, excluding borders. @@ -187,27 +187,27 @@ public: /** Get the current size of the item, as set in the last Layout. */ - wxSize GetSize(); + wxSize GetSize() const; /** If this item is tracking a sizer, return it. @NULL otherwise. */ - wxSizer* GetSizer(); + wxSizer* GetSizer() const; /** If this item is tracking a spacer, return its size. */ - const wxSize GetSpacer(); + const wxSize GetSpacer() const; /** Get the userData item attribute. */ - wxObject* GetUserData(); + wxObject* GetUserData() const; /** If this item is tracking a window then return it. @NULL otherwise. */ - wxWindow* GetWindow(); + wxWindow* GetWindow() const; /** Returns @true if this item is a window or a spacer and it is shown or if this @@ -215,22 +215,22 @@ public: items, all of the child elements must be hidden for the sizer itself to be considered hidden. */ - bool IsShown(); + bool IsShown() const; /** Is this item a sizer? */ - bool IsSizer(); + bool IsSizer() const; /** Is this item a spacer? */ - bool IsSpacer(); + bool IsSpacer() const; /** Is this item a window? */ - bool IsWindow(); + bool IsWindow() const; /** Set the border item attribute. @@ -556,7 +556,7 @@ public: @see SetFlexibleDirection() */ - int GetFlexibleDirection(); + int GetFlexibleDirection() const; /** Returns the value that specifies how the sizer grows in the "non-flexible" @@ -567,7 +567,7 @@ public: @see SetFlexibleDirection(), SetNonFlexibleGrowMode() */ - int GetNonFlexibleGrowMode(); + int GetNonFlexibleGrowMode() const; /** Specifies that column idx is no longer growable. @@ -949,13 +949,13 @@ public: @ref overview_wxsizeritem "wxSizerItem *". */ const wxSizerItemList GetChildren(); - wxSizerItemList GetChildren(); + const wxSizerItemList GetChildren(); //@} /** Returns the window this sizer is used in or @NULL if none. */ - wxWindow* GetContainingWindow(); + wxWindow* GetContainingWindow() const; //@{ /** @@ -1065,9 +1065,9 @@ public: @see Hide(), Show() */ - bool IsShown(wxWindow* window); - bool IsShown(wxSizer* sizer); - bool IsShown(size_t index); + bool IsShown(wxWindow* window) const; + const bool IsShown(wxSizer* sizer) const; + const bool IsShown(size_t index) const; //@} /** diff --git a/interface/slider.h b/interface/slider.h index 68e45f9928..1f9e7c66c8 100644 --- a/interface/slider.h +++ b/interface/slider.h @@ -123,28 +123,28 @@ public: @see SetLineSize() */ - int GetLineSize(); + int GetLineSize() const; /** Gets the maximum slider value. @see GetMin(), SetRange() */ - int GetMax(); + int GetMax() const; /** Gets the minimum slider value. @see GetMin(), SetRange() */ - int GetMin(); + int GetMin() const; /** Returns the page size. @see SetPageSize() */ - int GetPageSize(); + int GetPageSize() const; /** Returns the selection end point. @@ -153,7 +153,7 @@ public: @see GetSelStart(), SetSelection() */ - int GetSelEnd(); + int GetSelEnd() const; /** Returns the selection start point. @@ -162,7 +162,7 @@ public: @see GetSelEnd(), SetSelection() */ - int GetSelStart(); + int GetSelStart() const; /** Returns the thumb length. @@ -171,7 +171,7 @@ public: @see SetThumbLength() */ - int GetThumbLength(); + int GetThumbLength() const; /** Returns the tick frequency. @@ -180,14 +180,14 @@ public: @see SetTickFreq() */ - int GetTickFreq(); + int GetTickFreq() const; /** Gets the current slider value. @see GetMin(), GetMax(), SetValue() */ - int GetValue(); + int GetValue() const; /** Sets the line size for the slider. diff --git a/interface/snglinst.h b/interface/snglinst.h index 4090dc8c28..8547d6e199 100644 --- a/interface/snglinst.h +++ b/interface/snglinst.h @@ -102,5 +102,5 @@ public: Returns @true if another copy of this program is already running, @false otherwise. */ - bool IsAnotherRunning(); + bool IsAnotherRunning() const; }; diff --git a/interface/socket.h b/interface/socket.h index 08788d2c37..b95dafd1d5 100644 --- a/interface/socket.h +++ b/interface/socket.h @@ -368,12 +368,12 @@ public: Returns the socket object to which this event refers to. This makes it possible to use the same event handler for different sockets. */ - wxSocketBase* GetSocket(); + wxSocketBase* GetSocket() const; /** Returns the socket event type. */ - wxSocketNotify GetSocketEvent(); + wxSocketNotify GetSocketEvent() const; }; @@ -505,18 +505,18 @@ public: Use this function to check for an error condition after one of the following calls: Discard, Peek, Read, ReadMsg, Unread, Write, WriteMsg. */ - bool Error(); + bool Error() const; /** Returns a pointer of the client data for this socket, as set with SetClientData() */ - void* GetClientData(); + void* GetClientData() const; /** Returns current IO flags, as set with SetFlags() */ - wxSocketFlags GetFlags(); + wxSocketFlags GetFlags() const; /** This function returns the local address field of the socket. The local @@ -525,7 +525,7 @@ public: @returns @true if no error happened, @false otherwise. */ - bool GetLocal(wxSockAddress& addr); + bool GetLocal(wxSockAddress& addr) const; /** This function returns the peer address field of the socket. The peer @@ -534,7 +534,7 @@ public: @returns @true if no error happened, @false otherwise. */ - bool GetPeer(wxSockAddress& addr); + bool GetPeer(wxSockAddress& addr) const; /** Functions that allow applications to receive socket events. @@ -570,7 +570,7 @@ public: /** Returns @true if the socket is connected. */ - bool IsConnected(); + bool IsConnected() const; /** This function waits until the socket is readable. This might mean that @@ -579,18 +579,18 @@ public: immediately without blocking (unless the @b wxSOCKET_WAITALL flag is set, in which case the operation might still block). */ - bool IsData(); + bool IsData() const; /** Returns @true if the socket is not connected. */ - bool IsDisconnected(); + bool IsDisconnected() const; /** Returns @true if the socket is initialized and ready and @false in other cases. */ - bool IsOk(); + bool IsOk() const; /** Returns the number of bytes read or written by the last IO call. @@ -598,7 +598,7 @@ public: after using one of the following IO calls: Discard, Peek, Read, ReadMsg, Unread, Write, WriteMsg. */ - wxUint32 LastCount(); + wxUint32 LastCount() const; /** Returns the last wxSocket error. See @ref overview_wxsocketbase "wxSocket @@ -610,7 +610,7 @@ public: if the last IO call failed. If this returns @true, use LastError to discover the cause of the error. */ - wxSocketError LastError(); + wxSocketError LastError() const; /** According to the @a notify value, this function enables diff --git a/interface/sound.h b/interface/sound.h index 1a247877f1..2fff9caf3a 100644 --- a/interface/sound.h +++ b/interface/sound.h @@ -58,13 +58,13 @@ public: Returns @true if the object contains a successfully loaded file or resource, @false otherwise. */ - bool IsOk(); + bool IsOk() const; /** Returns @true if a sound is played at the moment. This method is currently not implemented under Windows. */ - static bool IsPlaying(); + static bool IsPlaying() const; //@{ /** @@ -95,8 +95,8 @@ public: The static form is shorthand for this code: */ bool Play(unsigned flags = wxSOUND_ASYNC); - static bool Play(const wxString& filename, - unsigned flags = wxSOUND_ASYNC); + const static bool Play(const wxString& filename, + unsigned flags = wxSOUND_ASYNC); //@} /** diff --git a/interface/spinbutt.h b/interface/spinbutt.h index 9f532fb2bd..1844319f9a 100644 --- a/interface/spinbutt.h +++ b/interface/spinbutt.h @@ -30,7 +30,7 @@ public: /** Retrieve the current spin button or control value. */ - int GetPosition(); + int GetPosition() const; /** Set the value associated with the event. @@ -125,21 +125,21 @@ public: @see SetRange() */ - int GetMax(); + int GetMax() const; /** Returns the minimum permissible value. @see SetRange() */ - int GetMin(); + int GetMin() const; /** Returns the current spin button value. @see SetValue() */ - int GetValue(); + int GetValue() const; /** Sets the range of the spin button. diff --git a/interface/spinctrl.h b/interface/spinctrl.h index 114faeefb8..884216ec7f 100644 --- a/interface/spinctrl.h +++ b/interface/spinctrl.h @@ -86,17 +86,17 @@ public: /** Gets maximal allowable value. */ - int GetMax(); + int GetMax() const; /** Gets minimal allowable value. */ - int GetMin(); + int GetMin() const; /** Gets the value of the spin control. */ - int GetValue(); + int GetValue() const; /** Sets range of allowable values. diff --git a/interface/splash.h b/interface/splash.h index 3bf0360243..ef06a2a4dd 100644 --- a/interface/splash.h +++ b/interface/splash.h @@ -65,17 +65,17 @@ public: Returns the splash style (see wxSplashScreen() for details). */ - long GetSplashStyle(); + long GetSplashStyle() const; /** Returns the window used to display the bitmap. */ - wxSplashScreenWindow* GetSplashWindow(); + wxSplashScreenWindow* GetSplashWindow() const; /** Returns the timeout in milliseconds. */ - int GetTimeout(); + int GetTimeout() const; /** Reimplement this event handler if you want to set an application variable on diff --git a/interface/splitter.h b/interface/splitter.h index 8a0fa9e393..9c86b3675d 100644 --- a/interface/splitter.h +++ b/interface/splitter.h @@ -102,7 +102,7 @@ public: @see SetMinimumPaneSize() */ - int GetMinimumPaneSize(); + int GetMinimumPaneSize() const; /** Returns the current sash gravity. @@ -124,17 +124,17 @@ public: @see SetSplitMode(), SplitVertically(), SplitHorizontally(). */ - int GetSplitMode(); + int GetSplitMode() const; /** Returns the left/top or only pane. */ - wxWindow* GetWindow1(); + wxWindow* GetWindow1() const; /** Returns the right/bottom pane. */ - wxWindow* GetWindow2(); + wxWindow* GetWindow2() const; /** Initializes the splitter window to have one pane. The child window is @@ -153,7 +153,7 @@ public: /** Returns @true if the window is split, @false otherwise. */ - bool IsSplit(); + bool IsSplit() const; /** Application-overridable function called when the sash is double-clicked with @@ -397,7 +397,7 @@ public: wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING and wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events. */ - int GetSashPosition(); + int GetSashPosition() const; /** Returns a pointer to the window being removed when a splitter window @@ -405,21 +405,21 @@ public: May only be called while processing wxEVT_COMMAND_SPLITTER_UNSPLIT events. */ - wxWindow* GetWindowBeingRemoved(); + wxWindow* GetWindowBeingRemoved() const; /** Returns the x coordinate of the double-click point. May only be called while processing wxEVT_COMMAND_SPLITTER_DOUBLECLICKED events. */ - int GetX(); + int GetX() const; /** Returns the y coordinate of the double-click point. May only be called while processing wxEVT_COMMAND_SPLITTER_DOUBLECLICKED events. */ - int GetY(); + int GetY() const; /** In the case of wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events, diff --git a/interface/sstream.h b/interface/sstream.h index a3711cadaa..a4d4420794 100644 --- a/interface/sstream.h +++ b/interface/sstream.h @@ -57,5 +57,5 @@ public: /** Returns the string containing all the data written to the stream so far. */ - const wxString GetString(); + const wxString GetString() const; }; diff --git a/interface/stackwalk.h b/interface/stackwalk.h index 50978638eb..630a736dac 100644 --- a/interface/stackwalk.h +++ b/interface/stackwalk.h @@ -106,7 +106,7 @@ public: /** Return the address of this frame. */ - void* GetAddress(); + void* GetAddress() const; /** Return the name of the file containing this frame, empty if @@ -114,35 +114,35 @@ public: Use HasSourceLocation() to check whether the file name is available. */ - wxString GetFileName(); + wxString GetFileName() const; /** Get the level of this frame (deepest/innermost one is 0). */ - size_t GetLevel(); + size_t GetLevel() const; /** Return the line number of this frame, 0 if unavailable. @see GetFileName() */ - size_t GetLine(); + size_t GetLine() const; /** Get the module this function belongs to (empty if not available). */ - wxString GetModule(); + wxString GetModule() const; /** Return the unmangled (if possible) name of the function containing this frame. */ - wxString GetName(); + wxString GetName() const; /** Return the return address of this frame. */ - size_t GetOffset(); + size_t GetOffset() const; /** Get the name, type and value (in text form) of the given parameter. @@ -153,17 +153,17 @@ public: file. */ bool GetParam(size_t n, wxString* type, wxString* name, - wxString* value); + wxString* value) const; /** Return the number of parameters of this function (may return 0 if we can't retrieve the parameters info even although the function does have parameters). */ - size_t GetParamCount(); + size_t GetParamCount() const; /** Return @true if we have the file name and line number for this frame. */ - bool HasSourceLocation(); + bool HasSourceLocation() const; }; diff --git a/interface/statbmp.h b/interface/statbmp.h index 9c32646962..635bd3516b 100644 --- a/interface/statbmp.h +++ b/interface/statbmp.h @@ -72,7 +72,7 @@ public: @see SetBitmap() */ - wxBitmap GetBitmap(); + wxBitmap GetBitmap() const; /** Returns the icon currently used in the control. Notice that this method can @@ -82,7 +82,7 @@ public: @see SetIcon() */ - wxIcon GetIcon(); + wxIcon GetIcon() const; /** Sets the bitmap label. diff --git a/interface/statline.h b/interface/statline.h index 084a275ed5..a4a99eb630 100644 --- a/interface/statline.h +++ b/interface/statline.h @@ -78,5 +78,5 @@ public: /** Returns @true if the line is vertical, @false if horizontal. */ - bool IsVertical(); + bool IsVertical() const; }; diff --git a/interface/stattext.h b/interface/stattext.h index 7c2da1dc22..5018856dde 100644 --- a/interface/stattext.h +++ b/interface/stattext.h @@ -95,7 +95,7 @@ public: Use GetLabelText() if only the label text is needed. */ - wxString GetLabel(); + wxString GetLabel() const; //@{ /** @@ -107,7 +107,7 @@ public: characters (if any) and without the markup. */ wxString GetLabelText(); - static wxString GetLabelText(const wxString& label); + const static wxString GetLabelText(const wxString& label); //@} /** diff --git a/interface/statusbr.h b/interface/statusbr.h index 7519844439..feb372b72c 100644 --- a/interface/statusbr.h +++ b/interface/statusbr.h @@ -87,12 +87,12 @@ public: @see wxRect */ - virtual bool GetFieldRect(int i, wxRect& rect); + virtual bool GetFieldRect(int i, wxRect& rect) const; /** Returns the number of fields in the status bar. */ - int GetFieldsCount(); + int GetFieldsCount() const; /** Returns the string associated with a status bar field. @@ -105,7 +105,7 @@ public: @see SetStatusText() */ - virtual wxString GetStatusText(int i = 0); + virtual wxString GetStatusText(int i = 0) const; /** Sets the field text to the top of the stack, and pops the stack of saved diff --git a/interface/stc/stc.h b/interface/stc/stc.h index 0c36146365..d467db2d7a 100644 --- a/interface/stc/stc.h +++ b/interface/stc/stc.h @@ -31,17 +31,17 @@ public: /** */ - wxEvent* Clone(); + wxEvent* Clone() const; /** */ - bool GetAlt(); + bool GetAlt() const; /** */ - bool GetControl(); + bool GetControl() const; /** @@ -61,92 +61,92 @@ public: /** */ - int GetFoldLevelNow(); + int GetFoldLevelNow() const; /** */ - int GetFoldLevelPrev(); + int GetFoldLevelPrev() const; /** */ - int GetKey(); + int GetKey() const; /** */ - int GetLParam(); + int GetLParam() const; /** */ - int GetLength(); + int GetLength() const; /** */ - int GetLine(); + int GetLine() const; /** */ - int GetLinesAdded(); + int GetLinesAdded() const; /** */ - int GetListType(); + int GetListType() const; /** */ - int GetMargin(); + int GetMargin() const; /** */ - int GetMessage(); + int GetMessage() const; /** */ - int GetModificationType(); + int GetModificationType() const; /** */ - int GetModifiers(); + int GetModifiers() const; /** */ - int GetPosition(); + int GetPosition() const; /** */ - bool GetShift(); + bool GetShift() const; /** */ - wxString GetText(); + wxString GetText() const; /** */ - int GetWParam(); + int GetWParam() const; /** */ - int GetX(); + int GetX() const; /** */ - int GetY(); + int GetY() const; /** diff --git a/interface/stdpaths.h b/interface/stdpaths.h index 6f4940266d..365a2846c7 100644 --- a/interface/stdpaths.h +++ b/interface/stdpaths.h @@ -61,7 +61,7 @@ public: @see wxFileConfig */ - wxString GetConfigDir(); + wxString GetConfigDir() const; /** Return the location of the applications global, i.e. not user-specific, @@ -73,7 +73,7 @@ public: @see GetLocalDataDir() */ - wxString GetDataDir(); + wxString GetDataDir() const; /** Return the directory containing the current user's documents. @@ -83,7 +83,7 @@ public: Mac: @c ~/Documents This function is new since wxWidgets version 2.7.0 */ - wxString GetDocumentsDir(); + wxString GetDocumentsDir() const; /** Return the directory and the filename for the current executable. @@ -92,7 +92,7 @@ public: Windows: @c C:\Programs\AppFolder\exename.exe Mac: @c /Programs/exename */ - wxString GetExecutablePath(); + wxString GetExecutablePath() const; /** @b Note: This function is only available under Unix. @@ -103,7 +103,7 @@ public: value, otherwise tries to determine it automatically (Linux only right now) and finally returns the default @c /usr/local value if it failed. */ - wxString GetInstallPrefix(); + wxString GetInstallPrefix() const; /** Return the location for application data files which are host-specific and @@ -111,7 +111,7 @@ public: This is the same as GetDataDir() except under Unix where it returns @c /etc/@e appname. */ - wxString GetLocalDataDir(); + wxString GetLocalDataDir() const; /** Return the localized resources directory containing the resource files of the @@ -124,7 +124,7 @@ public: This function is new since wxWidgets version 2.7.0 */ wxString GetLocalizedResourcesDir(const wxString& lang, - ResourceCat category = ResourceCat_None); + ResourceCat category = ResourceCat_None) const; /** Return the directory where the loadable modules (plugins) live. @@ -135,7 +135,7 @@ public: @see wxDynamicLibrary */ - wxString GetPluginsDir(); + wxString GetPluginsDir() const; /** Return the directory where the application resource files are located. The @@ -151,7 +151,7 @@ public: @see GetLocalizedResourcesDir() */ - wxString GetResourcesDir(); + wxString GetResourcesDir() const; /** Return the directory for storing temporary files. To create unique temporary @@ -160,7 +160,7 @@ public: multiple processes are attempting to create temporary files. This function is new since wxWidgets version 2.7.2 */ - wxString GetTempDir(); + wxString GetTempDir() const; /** Return the directory for the user config files: @@ -171,7 +171,7 @@ public: directory, otherwise GetUserDataDir() is more appropriate. */ - wxString GetUserConfigDir(); + wxString GetUserConfigDir() const; /** Return the directory for the user-dependent application data files: @@ -180,7 +180,7 @@ public: appname Mac: @c ~/Library/Application Support/@e appname */ - wxString GetUserDataDir(); + wxString GetUserDataDir() const; /** Return the directory for user data files which shouldn't be shared with @@ -190,7 +190,7 @@ public: @c C:\Documents and Settings\@e username\Local Settings\Application Data\@e appname */ - wxString GetUserLocalDataDir(); + wxString GetUserLocalDataDir() const; /** @b Note: This function is only available under Unix. diff --git a/interface/stopwatch.h b/interface/stopwatch.h index a94d6add20..6d778331b2 100644 --- a/interface/stopwatch.h +++ b/interface/stopwatch.h @@ -64,7 +64,7 @@ public: of Pause(). */ - long Time(); + long Time() const; }; diff --git a/interface/strconv.h b/interface/strconv.h index 53bc4f9a5b..7e76e2125a 100644 --- a/interface/strconv.h +++ b/interface/strconv.h @@ -28,13 +28,13 @@ public: Converts from UTF-7 encoding to Unicode. Returns the size of the destination buffer. */ - size_t MB2WC(wchar_t* buf, const char* psz, size_t n); + size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const; /** Converts from Unicode to UTF-7 encoding. Returns the size of the destination buffer. */ - size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; }; @@ -58,13 +58,13 @@ public: Converts from UTF-8 encoding to Unicode. Returns the size of the destination buffer. */ - size_t MB2WC(wchar_t* buf, const char* psz, size_t n); + size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const; /** Converts from Unicode to UTF-8 encoding. Returns the size of the destination buffer. */ - size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; }; @@ -94,13 +94,13 @@ public: Converts from UTF-16 encoding to Unicode. Returns the size of the destination buffer. */ - size_t MB2WC(wchar_t* buf, const char* psz, size_t n); + size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const; /** Converts from Unicode to UTF-16 encoding. Returns the size of the destination buffer. */ - size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; }; @@ -144,19 +144,19 @@ public: A malformed string may still make conversion functions return @c wxCONV_FAILED. This function is new since wxWidgets version 2.8.2 */ - bool IsOk(); + bool IsOk() const; /** Converts from the selected character set to Unicode. Returns length of string written to destination buffer. */ - size_t MB2WC(wchar_t* buf, const char* psz, size_t n); + size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const; /** Converts from Unicode to the selected character set. Returns length of string written to destination buffer. */ - size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; }; @@ -202,13 +202,13 @@ public: Converts from multibyte filename encoding to Unicode. Returns the size of the destination buffer. */ - size_t MB2WC(wchar_t* buf, const char* psz, size_t n); + size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const; /** Converts from Unicode to multibyte filename encoding. Returns the size of the destination buffer. */ - size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; }; @@ -238,13 +238,13 @@ public: Converts from UTF-32 encoding to Unicode. Returns the size of the destination buffer. */ - size_t MB2WC(wchar_t* buf, const char* psz, size_t n); + size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const; /** Converts from Unicode to UTF-32 encoding. Returns the size of the destination buffer. */ - size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; }; @@ -283,7 +283,7 @@ public: return a new copy of the object it is called on. It is used for copying the conversion objects while preserving their dynamic type. */ - virtual wxMBConv* Clone(); + virtual wxMBConv* Clone() const; /** This function has the same semantics as ToWChar() @@ -291,7 +291,7 @@ public: */ virtual size_t FromWChar(char* dst, size_t dstLen, const wchar_t* src, - size_t srcLen = wxNO_LEN); + size_t srcLen = wxNO_LEN) const; /** This function returns 1 for most of the multibyte encodings in which the @@ -300,7 +300,7 @@ public: The other cases are not currently supported and @c wxCONV_FAILED (defined as -1) is returned for them. */ - size_t GetMBNulLen(); + size_t GetMBNulLen() const; /** Returns the maximal value which can be returned by @@ -333,7 +333,7 @@ public: @returns The length of the converted string excluding the trailing NUL. */ virtual size_t MB2WC(wchar_t* out, const char* in, - size_t outLen); + size_t outLen) const; /** The most general function for converting a multibyte string to a wide string. @@ -353,7 +353,7 @@ public: */ virtual size_t ToWChar(wchar_t* dst, size_t dstLen, const char* src, - size_t srcLen = wxNO_LEN); + size_t srcLen = wxNO_LEN) const; /** This function is deprecated, please use FromWChar() instead @@ -365,7 +365,7 @@ public: into account the trailing @c NUL, which might take two or four bytes for some encodings (UTF-16 and UTF-32) and not one. */ - virtual size_t WC2MB(char* buf, const wchar_t* psz, size_t n); + virtual size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const; //@{ /** @@ -385,9 +385,10 @@ public: If @a outLen is not-@NULL, it receives the length of the converted string. */ - const wxWCharBuffer cMB2WC(const char* in); - const wxWCharBuffer cMB2WC(const char* in, size_t inLen, - size_t outLen); + const wxWCharBuffer cMB2WC(const char* in) const; + const const wxWCharBuffer cMB2WC(const char* in, + size_t inLen, + size_t outLen) const; //@} //@{ @@ -398,8 +399,8 @@ public: result in a wxWCharBuffer. The macro wxMB2WXbuf is defined as the correct return type (without const). */ - const char* cMB2WX(const char* psz); - const wxWCharBuffer cMB2WX(const char* psz); + const char* cMB2WX(const char* psz) const; + const const wxWCharBuffer cMB2WX(const char* psz) const; //@} //@{ @@ -415,9 +416,10 @@ public: If @a outLen is not-@NULL, it receives the length of the converted string. */ - const wxCharBuffer cWC2MB(const wchar_t* in); - const wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen, - size_t outLen); + const wxCharBuffer cWC2MB(const wchar_t* in) const; + const const wxCharBuffer cWC2MB(const wchar_t* in, + size_t inLen, + size_t outLen) const; //@} //@{ @@ -427,8 +429,8 @@ public: result in a wxCharBuffer. The macro wxWC2WXbuf is defined as the correct return type (without const). */ - const wchar_t* cWC2WX(const wchar_t* psz); - const wxCharBuffer cWC2WX(const wchar_t* psz); + const wchar_t* cWC2WX(const wchar_t* psz) const; + const const wxCharBuffer cWC2WX(const wchar_t* psz) const; //@} //@{ @@ -438,8 +440,8 @@ public: result in a wxCharBuffer. The macro wxWX2MBbuf is defined as the correct return type (without const). */ - const char* cWX2MB(const wxChar* psz); - const wxCharBuffer cWX2MB(const wxChar* psz); + const char* cWX2MB(const wxChar* psz) const; + const const wxCharBuffer cWX2MB(const wxChar* psz) const; //@} //@{ @@ -449,7 +451,7 @@ public: result in a wxWCharBuffer. The macro wxWX2WCbuf is defined as the correct return type (without const). */ - const wchar_t* cWX2WC(const wxChar* psz); - const wxWCharBuffer cWX2WC(const wxChar* psz); + const wchar_t* cWX2WC(const wxChar* psz) const; + const const wxWCharBuffer cWX2WC(const wxChar* psz) const; //@} }; diff --git a/interface/stream.h b/interface/stream.h index d6fdad29d9..6af9c7ff43 100644 --- a/interface/stream.h +++ b/interface/stream.h @@ -45,7 +45,7 @@ public: /** Returns the current size of the stream. */ - size_t GetSize(); + size_t GetSize() const; }; @@ -138,22 +138,22 @@ public: /** Returns a pointer on the end of the stream buffer. */ - void* GetBufferEnd(); + void* GetBufferEnd() const; /** Returns a pointer on the current position of the stream buffer. */ - void* GetBufferPos(); + void* GetBufferPos() const; /** Returns the size of the buffer. */ - size_t GetBufferSize(); + size_t GetBufferSize() const; /** Returns a pointer on the start of the stream buffer. */ - void* GetBufferStart(); + void* GetBufferStart() const; /** Gets a single char from the stream buffer. It acts like the Read call. @@ -170,12 +170,12 @@ public: /** Returns the current position (counted in bytes) in the stream buffer. */ - off_t GetIntPosition(); + off_t GetIntPosition() const; /** Returns the amount of bytes read during the last IO call to the parent stream. */ - size_t GetLastAccess(); + size_t GetLastAccess() const; /** Puts a single char to the stream buffer. @@ -259,7 +259,7 @@ public: @returns Returns the current position in the stream if possible, wxInvalidOffset in the other case. */ - off_t Tell(); + off_t Tell() const; /** Truncates the buffer to the current position. @@ -315,7 +315,7 @@ public: Write(). It may return 0 even if there is no error on the stream if it is only temporarily impossible to write to it. */ - size_t LastWrite(); + size_t LastWrite() const; /** Puts the specified character in the output queue and increments the @@ -338,7 +338,7 @@ public: /** Returns the current stream position. */ - off_t TellO(); + off_t TellO() const; //@{ /** @@ -390,7 +390,7 @@ public: can be a complete filename rather than just an extension. */ bool CanHandle(const wxString& protocol, - wxStreamProtocolType type = wxSTREAM_PROTOCOL); + wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; /** A static member that finds a factory that can handle a given protocol, MIME @@ -411,15 +411,15 @@ public: GetFirst()/GetNext() return a pointer to a factory or @NULL if no more are available. They do not give away ownership of the factory. */ - static const wxFilterClassFactory* GetFirst(); - const wxFilterClassFactory* GetNext(); + static const wxFilterClassFactory* GetFirst() const; + const wxFilterClassFactory* GetNext() const; //@} /** Returns the wxFileSystem protocol supported by this factory. Equivalent to wxString(*GetProtcols()). */ - wxString GetProtocol(); + wxString GetProtocol() const; /** Returns the protocols, MIME types, HTTP encodings or file extensions @@ -427,7 +427,7 @@ public: not give away ownership of the array or strings. For example, to list the file extensions a factory supports: */ - const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL); + const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; //@{ /** @@ -435,17 +435,17 @@ public: If the parent stream is passed as a pointer then the new filter stream takes ownership of it. If it is passed by reference then it does not. */ - wxFilterInputStream* NewStream(wxInputStream& stream); - wxFilterOutputStream* NewStream(wxOutputStream& stream); - wxFilterInputStream* NewStream(wxInputStream* stream); - wxFilterOutputStream* NewStream(wxOutputStream* stream); + wxFilterInputStream* NewStream(wxInputStream& stream) const; + const wxFilterOutputStream* NewStream(wxOutputStream& stream) const; + const wxFilterInputStream* NewStream(wxInputStream* stream) const; + const wxFilterOutputStream* NewStream(wxOutputStream* stream) const; //@} /** Remove the file extension of @a location if it is one of the file extensions handled by this factory. */ - wxString PopExtension(const wxString& location); + wxString PopExtension(const wxString& location) const; /** Adds this class factory to the list returned @@ -603,13 +603,13 @@ public: Returns @true if some data is available in the stream right now, so that calling Read() wouldn't block. */ - bool CanRead(); + bool CanRead() const; /** Returns @true after an attempt has been made to read past the end of the stream. */ - bool Eof(); + bool Eof() const; /** Returns the first character in the input queue and removes it, @@ -620,7 +620,7 @@ public: /** Returns the last number of bytes read. */ - size_t LastRead(); + size_t LastRead() const; /** Returns the first character in the input queue without removing it. @@ -657,7 +657,7 @@ public: /** Returns the current stream position. */ - off_t TellI(); + off_t TellI() const; //@{ /** @@ -716,7 +716,7 @@ public: A generic error occurred on the last read call. */ - wxStreamError GetLastError(); + wxStreamError GetLastError() const; /** Returns the length of the stream in bytes. If the length cannot be determined @@ -724,26 +724,26 @@ public: @c wxInvalidOffset. This function is new since wxWidgets version 2.5.4 */ - wxFileOffset GetLength(); + wxFileOffset GetLength() const; /** GetLength() This function returns the size of the stream. For example, for a file it is the size of the file. */ - size_t GetSize(); + size_t GetSize() const; /** Returns @true if no error occurred on the stream. @see GetLastError() */ - virtual bool IsOk(); + virtual bool IsOk() const; /** Returns @true if the streams supports seeking to arbitrary offsets. */ - bool IsSeekable(); + bool IsSeekable() const; /** Internal function. It is called when the stream wants to read data of the @@ -761,7 +761,7 @@ public: Internal function. Is is called when the stream needs to know the real position. */ - off_t OnSysTell(); + off_t OnSysTell() const; /** See OnSysRead(). diff --git a/interface/string.h b/interface/string.h index 11639efeca..fc57852172 100644 --- a/interface/string.h +++ b/interface/string.h @@ -138,13 +138,13 @@ public: Gets all the characters after the first occurrence of @e ch. Returns the empty string if @a ch is not found. */ - wxString AfterFirst(wxChar ch); + wxString AfterFirst(wxChar ch) const; /** Gets all the characters after the last occurrence of @e ch. Returns the whole string if @a ch is not found. */ - wxString AfterLast(wxChar ch); + wxString AfterLast(wxChar ch) const; /** Preallocate enough space for wxString to store @a nLen characters. This function @@ -174,13 +174,13 @@ public: Gets all characters before the first occurrence of @e ch. Returns the whole string if @a ch is not found. */ - wxString BeforeFirst(wxChar ch); + wxString BeforeFirst(wxChar ch) const; /** Gets all characters before the last occurrence of @e ch. Returns the empty string if @a ch is not found. */ - wxString BeforeLast(wxChar ch); + wxString BeforeLast(wxChar ch) const; /** The MakeXXX() variants modify the string in place, while the other functions @@ -246,8 +246,8 @@ public: as the standard @e strcmp() function). See also CmpNoCase(), IsSameAs(). */ - int Cmp(const wxString& s); - int Cmp(const wxChar* psz); + int Cmp(const wxString& s) const; + const int Cmp(const wxChar* psz) const; //@} //@{ @@ -259,15 +259,15 @@ public: as the standard @e strcmp() function). See also Cmp(), IsSameAs(). */ - int CmpNoCase(const wxString& s); - int CmpNoCase(const wxChar* psz); + int CmpNoCase(const wxString& s) const; + const int CmpNoCase(const wxChar* psz) const; //@} /** Case-sensitive comparison. Returns 0 if equal, 1 if greater or -1 if less. This is a wxWidgets 1.xx compatibility function; use Cmp() instead. */ - int CompareTo(const wxChar* psz, caseCompare cmp = exact); + int CompareTo(const wxChar* psz, caseCompare cmp = exact) const; /** The default comparison function Cmp() is case-sensitive and @@ -351,7 +351,7 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - bool Contains(const wxString& str); + bool Contains(const wxString& str) const; /** The string provides functions for conversion to signed and unsigned integer and @@ -383,15 +383,15 @@ public: @NULL. Otherwise, the function returns @false and doesn't modify the @e rest. */ - bool EndsWith(const wxString& suffix, wxString rest = NULL); + bool EndsWith(const wxString& suffix, wxString rest = NULL) const; //@{ /** Searches for the given string. Returns the starting index, or @c wxNOT_FOUND if not found. */ - int Find(wxUniChar ch, bool fromEnd = false); - int Find(const wxString& sub); + int Find(wxUniChar ch, bool fromEnd = false) const; + const int Find(const wxString& sub) const; //@} //@{ @@ -400,9 +400,9 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - int First(wxChar c); - int First(const wxChar* psz); - int First(const wxString& str); + int First(wxChar c) const; + int First(const wxChar* psz) const; + const int First(const wxString& str) const; //@} /** @@ -426,7 +426,7 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - int Freq(wxChar ch); + int Freq(wxChar ch) const; //@{ /** @@ -471,13 +471,13 @@ public: /** Returns the character at position @a n (read-only). */ - wxChar GetChar(size_t n); + wxChar GetChar(size_t n) const; /** wxWidgets compatibility conversion. Returns a constant pointer to the data in the string. */ - const wxChar* GetData(); + const wxChar* GetData() const; /** Returns a reference to the character at position @e n. @@ -502,8 +502,8 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - size_t Index(wxChar ch); - size_t Index(const wxChar* sz); + size_t Index(wxChar ch) const; + const size_t Index(const wxChar* sz) const; //@} /** @@ -511,26 +511,26 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - bool IsAscii(); + bool IsAscii() const; /** Returns @true if the string is empty. */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns @true if the string is empty (same as wxString::IsEmpty). This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - bool IsNull(); + bool IsNull() const; /** Returns @true if the string is an integer (with possible sign). This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - bool IsNumber(); + bool IsNumber() const; //@{ /** @@ -540,8 +540,8 @@ public: Returns @true if the string is equal to the character, @false otherwise. See also Cmp(), CmpNoCase() */ - bool IsSameAs(const wxChar* psz, bool caseSensitive = true); - bool IsSameAs(wxChar c, bool caseSensitive = true); + bool IsSameAs(const wxChar* psz, bool caseSensitive = true) const; + const bool IsSameAs(wxChar c, bool caseSensitive = true) const; //@} /** @@ -549,7 +549,7 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - bool IsWord(); + bool IsWord() const; //@{ /** @@ -558,30 +558,30 @@ public: code. */ wxChar Last(); - wxChar Last(); + const wxChar Last(); //@} /** Returns the first @a count characters of the string. */ - wxString Left(size_t count); + wxString Left(size_t count) const; /** Returns the length of the string. */ - size_t Len(); + size_t Len() const; /** Returns the length of the string (same as Len). This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - size_t Length(); + size_t Length() const; /** Returns this string converted to the lower case. */ - wxString Lower(); + wxString Lower() const; /** Same as MakeLower. @@ -603,7 +603,7 @@ public: /** Returns @true if the string contents matches a mask containing '*' and '?'. */ - bool Matches(const wxString& mask); + bool Matches(const wxString& mask) const; /** These are "advanced" functions and they will be needed quite rarely. @@ -627,7 +627,7 @@ public: Returns a substring starting at @e first, with length @e count, or the rest of the string if @a count is the default value. */ - wxString Mid(size_t first, size_t count = wxSTRING_MAXLEN); + wxString Mid(size_t first, size_t count = wxSTRING_MAXLEN) const; /** Other string functions. @@ -698,7 +698,7 @@ public: /** Returns the last @a count characters. */ - wxString Right(size_t count); + wxString Right(size_t count) const; /** These functions replace the standard @e strchr() and @e strstr() @@ -727,7 +727,7 @@ public: @NULL. Otherwise, the function returns @false and doesn't modify the @e rest. */ - bool StartsWith(const wxString& prefix, wxString rest = NULL); + bool StartsWith(const wxString& prefix, wxString rest = NULL) const; /** These functions return the string length and check whether the string is empty @@ -750,7 +750,7 @@ public: This is a wxWidgets 1.xx compatibility function; you should not use it in new code. */ - wxString Strip(stripType s = trailing); + wxString Strip(stripType s = trailing) const; /** Returns the part of the string between the indices @a from and @e to @@ -758,7 +758,7 @@ public: This is a wxWidgets 1.xx compatibility function, use Mid() instead (but note that parameters have different meaning). */ - wxString SubString(size_t from, size_t to); + wxString SubString(size_t from, size_t to) const; /** These functions allow to extract substring from this string. All of them don't @@ -795,8 +795,8 @@ public: @see wxString::From8BitData */ - const char* To8BitData(); - const wxCharBuffer To8BitData(); + const char* To8BitData() const; + const const wxCharBuffer To8BitData() const; //@} //@{ @@ -807,8 +807,8 @@ public: characters. The @ref mbstr() mb_str method provides more powerful means of converting wxString to C string. */ - const char* ToAscii(); - const wxCharBuffer ToAscii(); + const char* ToAscii() const; + const const wxCharBuffer ToAscii() const; //@} /** @@ -819,7 +819,7 @@ public: @see ToLong(), ToULong() */ - bool ToDouble(double val); + bool ToDouble(double val) const; /** Attempts to convert the string to a signed integer in base @e base. Returns @@ -837,7 +837,7 @@ public: @see ToDouble(), ToULong() */ - bool ToLong(long val, int base = 10); + bool ToLong(long val, int base = 10) const; /** This is exactly the same as ToLong() but works with 64 @@ -848,7 +848,7 @@ public: @see ToLong(), ToULongLong() */ - bool ToLongLong(wxLongLong_t val, int base = 10); + bool ToLongLong(wxLongLong_t val, int base = 10) const; /** Attempts to convert the string to an unsigned integer in base @e base. @@ -864,21 +864,21 @@ public: @see ToDouble(), ToLong() */ - bool ToULong(unsigned long val, int base = 10); + bool ToULong(unsigned long val, int base = 10) const; /** This is exactly the same as ToULong() but works with 64 bit integer numbers. Please see ToLongLong() for additional remarks. */ - bool ToULongLong(wxULongLong_t val, int base = 10); + bool ToULongLong(wxULongLong_t val, int base = 10) const; //@{ /** Same as @ref wxString::utf8str utf8_str. */ - const char* ToUTF8(); - const wxCharBuffer ToUF8(); + const char* ToUTF8() const; + const const wxCharBuffer ToUF8() const; //@} /** @@ -914,7 +914,7 @@ public: /** Returns this string converted to upper case. */ - wxString Upper(); + wxString Upper() const; /** The same as MakeUpper. @@ -953,7 +953,7 @@ public: fnstr() fn_str, @ref charstr() char_str, @ref wcharstr() wchar_string */ - const wxChar* c_str(); + const wxChar* c_str() const; /** Returns an object with string data that is implicitly convertible to @@ -966,7 +966,7 @@ public: fnstr() fn_str, @ref cstr() c_str, @ref wcharstr() wchar_str */ - wxWritableCharBuffer char_str(const wxMBConv& conv = wxConvLibc); + wxWritableCharBuffer char_str(const wxMBConv& conv = wxConvLibc) const; //@{ /** @@ -978,9 +978,9 @@ public: @see wxMBConv, @ref wcstr() wc_str, @ref wcstr() mb_str */ - const wchar_t* fn_str(); - const char* fn_str(); - const wxCharBuffer fn_str(); + const wchar_t* fn_str() const; + const const char* fn_str() const; + const const wxCharBuffer fn_str() const; //@} //@{ @@ -994,8 +994,8 @@ public: @see wxMBConv, @ref cstr() c_str, @ref wcstr() wc_str, @ref fnstr() fn_str, @ref charstr() char_str */ - const char* mb_str(const wxMBConv& conv = wxConvLibc); - const wxCharBuffer mb_str(const wxMBConv& conv = wxConvLibc); + const char* mb_str(const wxMBConv& conv = wxConvLibc) const; + const const wxCharBuffer mb_str(const wxMBConv& conv = wxConvLibc) const; //@} /** @@ -1057,16 +1057,16 @@ public: /** Element extraction. */ - wxChar operator [](size_t i); - wxChar operator [](size_t i); - wxChar operator [](int i); - wxChar operator [](int i); + wxChar operator [](size_t i) const; + wxChar operator [](size_t i) const; + const wxChar operator [](int i) const; + wxChar operator [](int i) const; //@} /** Implicit conversion to a C string. */ - operator const wxChar*(); + operator const wxChar*() const; /** Empty string is @false, so !string will only return @true if the string is @@ -1076,7 +1076,7 @@ public: to wxString. See also IsEmpty(). */ - bool operator!(); + bool operator!() const; /** The supported functions are only listed here, please see any STL reference for @@ -1090,8 +1090,8 @@ public: wxCharBuffer object or as a pointer to the internal string contents in UTF-8 build. */ - const char* utf8_str(); - const wxCharBuffer utf8_str(); + const char* utf8_str() const; + const const wxCharBuffer utf8_str() const; //@} //@{ @@ -1105,8 +1105,8 @@ public: @see wxMBConv, @ref cstr() c_str, @ref wcstr() mb_str, @ref fnstr() fn_str, @ref wcharstr() wchar_str */ - const wchar_t* wc_str(const wxMBConv& conv); - const wxWCharBuffer wc_str(const wxMBConv& conv); + const wchar_t* wc_str(const wxMBConv& conv) const; + const const wxWCharBuffer wc_str(const wxMBConv& conv) const; //@} /** @@ -1120,7 +1120,7 @@ public: fnstr() fn_str, @ref cstr() c_str, @ref charstr() char_str */ - wxWritableWCharBuffer wchar_str(); + wxWritableWCharBuffer wchar_str() const; /** These functions are deprecated, please consider using new wxWidgets 2.0 diff --git a/interface/sysopt.h b/interface/sysopt.h index 63c9d68d0f..b0fee1b0d2 100644 --- a/interface/sysopt.h +++ b/interface/sysopt.h @@ -40,7 +40,7 @@ public: @see SetOption(), GetOptionInt(), HasOption() */ - wxString GetOption(const wxString& name); + wxString GetOption(const wxString& name) const; /** Gets an option as an integer. The function is case-insensitive to @e name. @@ -49,7 +49,7 @@ public: @see SetOption(), GetOption(), HasOption() */ - int GetOptionInt(const wxString& name); + int GetOptionInt(const wxString& name) const; /** Returns @true if the given option is present. The function is @@ -58,7 +58,7 @@ public: @see SetOption(), GetOption(), GetOptionInt() */ - bool HasOption(const wxString& name); + bool HasOption(const wxString& name) const; /** Returns @true if the option with the given @a name had been set to 0 @@ -66,7 +66,7 @@ public: @c GetOptionInt(name) == 0 as this would also be @true if the option hadn't been set at all. */ - bool IsFalse(const wxString& name); + bool IsFalse(const wxString& name) const; //@{ /** diff --git a/interface/tarstrm.h b/interface/tarstrm.h index 8ee3d5d9f3..29193c5943 100644 --- a/interface/tarstrm.h +++ b/interface/tarstrm.h @@ -184,7 +184,7 @@ public: specified in the POSIX standards. */ int GetBlockingFactor(); - void SetBlockingFactor(int factor); + const void SetBlockingFactor(int factor); //@} /** @@ -239,7 +239,7 @@ public: wxArchiveEntry::Get/SetDateTime. */ wxDateTime GetAccessTime(); - void SetAccessTime(const wxDateTime& dt); + const void SetAccessTime(const wxDateTime& dt); //@} //@{ @@ -248,7 +248,7 @@ public: wxArchiveEntry::Get/SetDateTime. */ wxDateTime GetCreateTime(); - void SetCreateTime(const wxDateTime& dt); + const void SetCreateTime(const wxDateTime& dt); //@} //@{ @@ -258,8 +258,8 @@ public: or @e wxTAR_BLKTYPE. */ int GetDevMajor(); - int GetDevMinor(); - void SetDevMajor(int dev); + const int GetDevMinor(); + const void SetDevMajor(int dev); void SetDevMinor(int dev); //@} @@ -272,8 +272,8 @@ public: Get/SetUserName" can be used instead. */ int GetGroupId(); - int GetUserId(); - void SetGroupId(int id); + const int GetUserId(); + const void SetGroupId(int id); void SetUserId(int id); //@} @@ -283,8 +283,8 @@ public: over this entry. These are not present in very old tars. */ wxString GetGroupName(); - wxString GetUserName(); - void SetGroupName(const wxString& group); + const wxString GetUserName(); + const void SetGroupName(const wxString& group); void SetUserName(const wxString& user); //@} @@ -295,7 +295,7 @@ public: to @e wxTAR_LNKTYPE or @e wxTAR_SYMTYPE. */ wxString GetLinkName(); - void SetLinkName(const wxString& link); + const void SetLinkName(const wxString& link); //@} //@{ @@ -305,7 +305,7 @@ public: Symbols are defined for them in wx/file.h. */ int GetMode(); - void SetMode(int mode); + const void SetMode(int mode); //@} //@{ @@ -318,8 +318,8 @@ public: to seek back and fix the entry's header when the entry is closed, though it is still more efficient if the size is given beforehand. */ - void SetSize(wxFileOffset size); - wxFileOffset GetSize(); + void SetSize(wxFileOffset size) const; + wxFileOffset GetSize() const; //@} //@{ @@ -330,7 +330,7 @@ public: any other values should be treated as @e wxTAR_REGTYPE. */ int GetTypeFlag(); - void SetTypeFlag(int type); + const void SetTypeFlag(int type); //@} //@{ @@ -341,9 +341,9 @@ public: (i.e. has a trailing path separator). */ wxString GetInternalName(); - wxString GetInternalName(const wxString& name, - wxPathFormat format = wxPATH_NATIVE, - bool* pIsDir = NULL); + const wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE, + bool* pIsDir = NULL); //@} /** diff --git a/interface/textctrl.h b/interface/textctrl.h index f489c8e037..2ae1403b86 100644 --- a/interface/textctrl.h +++ b/interface/textctrl.h @@ -50,25 +50,25 @@ public: /** Creates a font from the font attributes. */ - wxFont CreateFont(); + wxFont CreateFont() const; /** Returns the alignment flags. See SetAlignment() for a list of available styles. */ - wxTextAttrAlignment GetAlignment(); + wxTextAttrAlignment GetAlignment() const; /** Returns the background colour. */ - const wxColour GetBackgroundColour(); + const wxColour GetBackgroundColour() const; /** Returns a string containing the name of the font associated with the bullet symbol. Only valid for attributes with wxTEXT_ATTR_BULLET_SYMBOL. */ - const wxString GetBulletFont(); + const wxString GetBulletFont() const; /** Returns the standard bullet name, applicable if the bullet style is @@ -84,35 +84,35 @@ public: DrawStandardBullet and @c EnumerateStandardBulletNames, and set an instance of the class using wxRichTextBuffer::SetRenderer. */ - const wxString GetBulletName(); + const wxString GetBulletName() const; /** Returns the bullet number. */ - int GetBulletNumber(); + int GetBulletNumber() const; /** Returns the bullet style. See SetBulletStyle() for a list of available styles. */ - int GetBulletStyle(); + int GetBulletStyle() const; /** Returns the bullet text, which could be a symbol, or (for example) cached outline text. */ - const wxString GetBulletText(); + const wxString GetBulletText() const; /** Returns the name of the character style. */ - const wxString GetCharacterStyleName(); + const wxString GetCharacterStyleName() const; /** Returns flags indicating which attributes are applicable. See SetFlags() for a list of available flags. */ - long GetFlags(); + long GetFlags() const; /** Creates and returns a font specified by the font attributes in the wxTextAttr @@ -121,7 +121,7 @@ public: For greater efficiency, access the font attributes directly. */ - wxFont GetFont(); + wxFont GetFont() const; /** Gets the font attributes from the given font, using only the attributes @@ -133,78 +133,78 @@ public: /** Returns the font encoding. */ - wxFontEncoding GetFontEncoding(); + wxFontEncoding GetFontEncoding() const; /** Returns the font face name. */ - const wxString GetFontFaceName(); + const wxString GetFontFaceName() const; /** Returns the font size in points. */ - int GetFontSize(); + int GetFontSize() const; /** Returns the font style. */ - int GetFontStyle(); + int GetFontStyle() const; /** Returns @true if the font is underlined. */ - bool GetFontUnderlined(); + bool GetFontUnderlined() const; /** Returns the font weight. */ - int GetFontWeight(); + int GetFontWeight() const; /** Returns the left indent in tenths of a millimetre. */ - long GetLeftIndent(); + long GetLeftIndent() const; /** Returns the left sub-indent in tenths of a millimetre. */ - long GetLeftSubIndent(); + long GetLeftSubIndent() const; /** Returns the line spacing value, one of wxTEXT_ATTR_LINE_SPACING_NORMAL, wxTEXT_ATTR_LINE_SPACING_HALF, and wxTEXT_ATTR_LINE_SPACING_TWICE. */ - int GetLineSpacing(); + int GetLineSpacing() const; /** Returns the name of the list style. */ - const wxString GetListStyleName(); + const wxString GetListStyleName() const; /** Returns the outline level. */ - bool GetOutlineLevel(); + bool GetOutlineLevel() const; /** Returns the space in tenths of a millimeter after the paragraph. */ - int GetParagraphSpacingAfter(); + int GetParagraphSpacingAfter() const; /** Returns the space in tenths of a millimeter before the paragraph. */ - int GetParagraphSpacingBefore(); + int GetParagraphSpacingBefore() const; /** Returns the name of the paragraph style. */ - const wxString GetParagraphStyleName(); + const wxString GetParagraphStyleName() const; /** Returns the right indent in tenths of a millimeter. */ - long GetRightIndent(); + long GetRightIndent() const; /** Returns an array of tab stops, each expressed in tenths of a millimeter. Each @@ -212,24 +212,24 @@ public: is measured from the left margin and therefore each value must be larger than the last. */ - const wxArrayInt GetTabs(); + const wxArrayInt GetTabs() const; /** Returns the text foreground colour. */ - const wxColour GetTextColour(); + const wxColour GetTextColour() const; /** Returns the text effect bits of interest. See SetFlags() for further information. */ - int GetTextEffectFlags(); + int GetTextEffectFlags() const; /** Returns the text effects, a bit list of styles. See SetTextEffects() for details. */ - int GetTextEffects(); + int GetTextEffects() const; /** Returns the URL for the content. Content with wxTEXT_ATTR_URL style @@ -237,170 +237,170 @@ public: generates a wxTextUrlEvent when the content is clicked. */ - const wxString GetURL(); + const wxString GetURL() const; /** Returns @true if the attribute object specifies alignment. */ - bool HasAlignment(); + bool HasAlignment() const; /** Returns @true if the attribute object specifies a background colour. */ - bool HasBackgroundColour(); + bool HasBackgroundColour() const; /** Returns @true if the attribute object specifies a standard bullet name. */ - bool HasBulletName(); + bool HasBulletName() const; /** Returns @true if the attribute object specifies a bullet number. */ - bool HasBulletNumber(); + bool HasBulletNumber() const; /** Returns @true if the attribute object specifies a bullet style. */ - bool HasBulletStyle(); + bool HasBulletStyle() const; /** Returns @true if the attribute object specifies bullet text (usually specifying a symbol). */ - bool HasBulletText(); + bool HasBulletText() const; /** Returns @true if the attribute object specifies a character style name. */ - bool HasCharacterStyleName(); + bool HasCharacterStyleName() const; /** Returns @true if the @a flag is present in the attribute object's flag bitlist. */ - bool HasFlag(long flag); + bool HasFlag(long flag) const; /** Returns @true if the attribute object specifies any font attributes. */ - bool HasFont(); + bool HasFont() const; /** Returns @true if the attribute object specifies an encoding. */ - bool HasFontEncoding(); + bool HasFontEncoding() const; /** Returns @true if the attribute object specifies a font face name. */ - bool HasFontFaceName(); + bool HasFontFaceName() const; /** Returns @true if the attribute object specifies italic style. */ - bool HasFontItalic(); + bool HasFontItalic() const; /** Returns @true if the attribute object specifies a font point size. */ - bool HasFontSize(); + bool HasFontSize() const; /** Returns @true if the attribute object specifies either underlining or no underlining. */ - bool HasFontUnderlined(); + bool HasFontUnderlined() const; /** Returns @true if the attribute object specifies font weight (bold, light or normal). */ - bool HasFontWeight(); + bool HasFontWeight() const; /** Returns @true if the attribute object specifies a left indent. */ - bool HasLeftIndent(); + bool HasLeftIndent() const; /** Returns @true if the attribute object specifies line spacing. */ - bool HasLineSpacing(); + bool HasLineSpacing() const; /** Returns @true if the attribute object specifies a list style name. */ - bool HasListStyleName(); + bool HasListStyleName() const; /** Returns @true if the attribute object specifies an outline level. */ - bool HasOutlineLevel(); + bool HasOutlineLevel() const; /** Returns @true if the attribute object specifies a page break before this paragraph. */ - bool HasPageBreak(); + bool HasPageBreak() const; /** Returns @true if the attribute object specifies spacing after a paragraph. */ - bool HasParagraphSpacingAfter(); + bool HasParagraphSpacingAfter() const; /** Returns @true if the attribute object specifies spacing before a paragraph. */ - bool HasParagraphSpacingBefore(); + bool HasParagraphSpacingBefore() const; /** Returns @true if the attribute object specifies a paragraph style name. */ - bool HasParagraphStyleName(); + bool HasParagraphStyleName() const; /** Returns @true if the attribute object specifies a right indent. */ - bool HasRightIndent(); + bool HasRightIndent() const; /** Returns @true if the attribute object specifies tab stops. */ - bool HasTabs(); + bool HasTabs() const; /** Returns @true if the attribute object specifies a text foreground colour. */ - bool HasTextColour(); + bool HasTextColour() const; /** Returns @true if the attribute object specifies text effects. */ - bool HasTextEffects(); + bool HasTextEffects() const; /** Returns @true if the attribute object specifies a URL. */ - bool HasURL(); + bool HasURL() const; /** Returns @true if the object represents a character style, that is, the flags specify a font or a text background or foreground colour. */ - bool IsCharacterStyle(); + bool IsCharacterStyle() const; /** Returns @false if we have any attributes set, @true otherwise. */ - bool IsDefault(); + bool IsDefault() const; /** Returns @true if the object represents a paragraph style, that is, the flags specify alignment, indentation, tabs, paragraph spacing, or bullet style. */ - bool IsParagraphStyle(); + bool IsParagraphStyle() const; //@{ /** @@ -892,7 +892,7 @@ public: @see SetDefaultStyle() */ - const wxTextAttr GetDefaultStyle(); + const wxTextAttr GetDefaultStyle() const; /** Returns the insertion point. This is defined as the zero based index of the @@ -903,13 +903,13 @@ public: The following code snippet safely returns the character at the insertion point or the zero character if the point is at the end of the control. */ - virtual long GetInsertionPoint(); + virtual long GetInsertionPoint() const; /** Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control. */ - virtual wxTextPos GetLastPosition(); + virtual wxTextPos GetLastPosition() const; /** Gets the length of the specified line, not including any trailing newline @@ -920,7 +920,7 @@ public: @returns The length of the line, or -1 if lineNo was invalid. */ - int GetLineLength(long lineNo); + int GetLineLength(long lineNo) const; /** Returns the contents of a given line in the text control, not including @@ -931,7 +931,7 @@ public: @returns The contents of the line. */ - wxString GetLineText(long lineNo); + wxString GetLineText(long lineNo) const; /** Returns the number of lines in the text control buffer. @@ -940,7 +940,7 @@ public: insertion point is), so GetNumberOfLines() never returns 0. */ - int GetNumberOfLines(); + int GetNumberOfLines() const; /** Returns the string containing the text starting in the positions @a from and @@ -953,7 +953,7 @@ public: obtain the correct results instead of extracting parts of the entire value. It may also be more efficient, especially if the control contains a lot of data. */ - virtual wxString GetRange(long from, long to); + virtual wxString GetRange(long from, long to) const; /** Gets the current selection span. If the returned values are equal, there was @@ -970,7 +970,7 @@ public: @param to The returned last position. */ - virtual void GetSelection(long* from, long* to); + virtual void GetSelection(long* from, long* to) const; /** Gets the text currently selected in the control. If there is no selection, the @@ -995,7 +995,7 @@ public: under Windows where they are separated by a \r\n sequence in the native control. */ - wxString GetValue(); + wxString GetValue() const; /** This function finds the character at the specified position expressed in @@ -1009,7 +1009,7 @@ public: */ wxTextCtrlHitTestResult HitTest(const wxPoint& pt, wxTextCoord col, - wxTextCoord row); + wxTextCoord row) const; /** Returns @true if the controls contents may be edited by user (note that it @@ -1017,7 +1017,7 @@ public: read-only mode by a previous call to SetEditable(). */ - bool IsEditable(); + bool IsEditable() const; /** Returns @true if the control is currently empty. This is the same as @@ -1025,7 +1025,7 @@ public: controls containing big amounts of text. This function is new since wxWidgets version 2.7.1 */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns @true if the text has been modified by user. Note that calling @@ -1033,7 +1033,7 @@ public: @see MarkDirty() */ - bool IsModified(); + bool IsModified() const; /** Returns @true if this is a multi line edit control and @false @@ -1041,7 +1041,7 @@ public: @see IsSingleLine() */ - bool IsMultiLine(); + bool IsMultiLine() const; /** Returns @true if this is a single line edit control and @false @@ -1049,7 +1049,7 @@ public: @see @ref issingleline() IsMultiLine */ - bool IsSingleLine(); + bool IsSingleLine() const; /** Loads and displays the named file, if it exists. @@ -1104,7 +1104,7 @@ public: @see XYToPosition() */ - bool PositionToXY(long pos, long* x, long* y); + bool PositionToXY(long pos, long* x, long* y) const; /** If there is a redo facility and the last operation can be redone, redoes the diff --git a/interface/textdlg.h b/interface/textdlg.h index 107da9c523..20b28d5eeb 100644 --- a/interface/textdlg.h +++ b/interface/textdlg.h @@ -76,7 +76,7 @@ public: original value if the user has pressed Cancel. */ - wxString GetValue(); + wxString GetValue() const; /** Sets the default text value. diff --git a/interface/textfile.h b/interface/textfile.h index 24ee8ea6a9..6289a57fce 100644 --- a/interface/textfile.h +++ b/interface/textfile.h @@ -65,29 +65,29 @@ public: /** Constructor does not load the file into memory, use Open() to do it. */ - wxTextFile(const wxString& strFile); + wxTextFile(const wxString& strFile) const; /** Destructor does nothing. */ - ~wxTextFile(); + ~wxTextFile() const; /** Adds a line to the end of file. */ void AddLine(const wxString& str, - wxTextFileType type = typeDefault); + wxTextFileType type = typeDefault) const; /** Delete all lines from the file, set current line number to 0. */ - void Clear(); + void Clear() const; /** Closes the file and frees memory, @b losing all changes. Use Write() if you want to save them. */ - bool Close(); + bool Close() const; //@{ /** @@ -97,20 +97,20 @@ public: It will fail if the file already exists, Open() should be used in this case. */ - bool Create(); - bool Create(const wxString& strFile); + bool Create() const; + const bool Create(const wxString& strFile) const; //@} /** Returns @true if the current line is the last one. */ - bool Eof(); + bool Eof() const; /** Return @true if file exists - the name of the file should have been specified in the constructor before calling Exists(). */ - bool Exists(); + bool Exists() const; /** Returns the current line: it has meaning only when you're using @@ -119,7 +119,7 @@ public: GetLastLine() also change the value of the current line, as well as GoToLine(). */ - size_t GetCurrentLine(); + size_t GetCurrentLine() const; /** Get the line termination string corresponding to given constant. @e typeDefault @@ -130,14 +130,14 @@ public: Apple Developer Tools) and wxTextFileType_Mac under Mac OS (including Mac OS X when compiling with CodeWarrior). */ - static const char* GetEOL(wxTextFileType type = typeDefault); + static const char* GetEOL(wxTextFileType type = typeDefault) const; /** This method together with GetNextLine() allows more "iterator-like" traversal of the list of lines, i.e. you may write something like: */ - wxString GetFirstLine(); + wxString GetFirstLine() const; /** Gets the last line of the file. Together with @@ -151,22 +151,22 @@ public: modified but you shouldn't add line terminator at the end - this will be done by wxTextFile. */ - wxString GetLine(size_t n); + wxString GetLine(size_t n) const; /** Get the number of lines in the file. */ - size_t GetLineCount(); + size_t GetLineCount() const; /** Get the type of the line (see also wxTextFile::GetEOL) */ - wxTextFileType GetLineType(size_t n); + wxTextFileType GetLineType(size_t n) const; /** Get the name of the file. */ - const char* GetName(); + const char* GetName() const; /** Gets the next line (see GetFirstLine() for @@ -183,25 +183,25 @@ public: Changes the value returned by GetCurrentLine() and used by wxTextFile::GetFirstLine/GetNextLine(). */ - void GoToLine(size_t n); + void GoToLine(size_t n) const; /** Guess the type of file (which is supposed to be opened). If sufficiently many lines of the file are in DOS/Unix/Mac format, the corresponding value will be returned. If the detection mechanism fails wxTextFileType_None is returned. */ - wxTextFileType GuessType(); + wxTextFileType GuessType() const; /** Insert a line before the line number @e n. */ void InsertLine(const wxString& str, size_t n, - wxTextFileType type = typeDefault); + wxTextFileType type = typeDefault) const; /** Returns @true if the file is currently opened. */ - bool IsOpened(); + bool IsOpened() const; //@{ /** @@ -213,14 +213,14 @@ public: The @e conv argument is only meaningful in Unicode build of wxWidgets when it is used to convert the file to wide character representation. */ - bool Open(); - bool Open(const wxString& strFile); + bool Open() const; + const bool Open(const wxString& strFile) const; //@} /** Delete line number @a n from the file. */ - void RemoveLine(size_t n); + void RemoveLine(size_t n) const; /** ) @@ -232,10 +232,10 @@ public: them to physical file. Returns @true if operation succeeded, @false if it failed. */ - bool Write(wxTextFileType typeNew = wxTextFileType_None); + bool Write(wxTextFileType typeNew = wxTextFileType_None) const; /** The same as GetLine(). */ - wxString operator[](size_t n); + wxString operator[](size_t n) const; }; diff --git a/interface/tglbtn.h b/interface/tglbtn.h index 27e10963e7..a48dc9c580 100644 --- a/interface/tglbtn.h +++ b/interface/tglbtn.h @@ -58,7 +58,7 @@ public: @returns Returns @true if it is pressed, @false otherwise. */ - bool GetValue(); + bool GetValue() const; /** Sets the toggle button to the given state. This does not cause a @@ -156,7 +156,7 @@ public: @returns Returns @true if it is pressed, @false otherwise. */ - bool GetValue(); + bool GetValue() const; /** Sets the toggle button to the given state. This does not cause a diff --git a/interface/thread.h b/interface/thread.h index bfd661a200..4a51723acb 100644 --- a/interface/thread.h +++ b/interface/thread.h @@ -66,7 +66,7 @@ public: Returns @true if the object had been initialized successfully, @false if an error occurred. */ - bool IsOk(); + bool IsOk() const; /** Signals the object waking up at most one thread. If several threads are waiting @@ -459,7 +459,7 @@ public: thread throughout the system during its existence (i.e. the thread identifiers may be reused). */ - unsigned long GetId(); + unsigned long GetId() const; /** Gets the priority of the thread, between zero and 100. @@ -477,7 +477,7 @@ public: 100 */ - int GetPriority(); + int GetPriority() const; /** Returns @true if the thread is alive (i.e. started and not terminating). @@ -486,14 +486,14 @@ public: no longer alive, it is not possible to call this function because the wxThread object no longer exists. */ - bool IsAlive(); + bool IsAlive() const; /** Returns @true if the thread is of the detached kind, @false if it is a joinable one. */ - bool IsDetached(); + bool IsDetached() const; /** Returns @true if the calling thread is the main application thread. @@ -503,14 +503,14 @@ public: /** Returns @true if the thread is paused. */ - bool IsPaused(); + bool IsPaused() const; /** Returns @true if the thread is running. This method may only be safely used for joinable threads, see the remark in IsAlive(). */ - bool IsRunning(); + bool IsRunning() const; /** Immediately terminates the target thread. @b This function is dangerous and @@ -658,7 +658,7 @@ public: See @ref overview_deletionwxthread "wxThread deletion" for a broader explanation of this routine. */ - ExitCode Wait(); + ExitCode Wait() const; /** Give the rest of the thread time slice to the system allowing the other threads @@ -844,7 +844,7 @@ public: /** Returns @true if mutex was acquired in the constructor, @false otherwise. */ - bool IsOk(); + bool IsOk() const; }; diff --git a/interface/timer.h b/interface/timer.h index d9f99ec7b4..9fa88d5796 100644 --- a/interface/timer.h +++ b/interface/timer.h @@ -60,30 +60,30 @@ public: /** Returns the ID of the events generated by this timer. */ - int GetId(); + int GetId() const; /** Returns the current interval for the timer (in milliseconds). */ - int GetInterval(); + int GetInterval() const; /** Returns the current @e owner of the timer. If non-@NULL this is the event handler which will receive the @ref overview_wxtimerevent "timer events" when the timer is running. */ - wxEvtHandler GetOwner(); + wxEvtHandler GetOwner() const; /** Returns @true if the timer is one shot, i.e. if it will stop after firing the first notification automatically. */ - bool IsOneShot(); + bool IsOneShot() const; /** Returns @true if the timer is running, @false if it is stopped. */ - bool IsRunning(); + bool IsRunning() const; /** This member should be overridden by the user if the default constructor was @@ -175,10 +175,10 @@ public: /** Returns the interval of the timer which generated this event. */ - int GetInterval(); + int GetInterval() const; /** Returns the timer object which generated this event. */ - wxTimer GetTimer(); + wxTimer GetTimer() const; }; diff --git a/interface/tipdlg.h b/interface/tipdlg.h index bce84c8837..e82a2fbd8b 100644 --- a/interface/tipdlg.h +++ b/interface/tipdlg.h @@ -44,7 +44,7 @@ public: was passed to wxShowTip + 1 because the user might have pressed the "Next" button in the tip dialog. */ - size_t GetCurrentTip(); + size_t GetCurrentTip() const; /** Return the text of the current tip and pass to the next one. This function is diff --git a/interface/tokenzr.h b/interface/tokenzr.h index 6250d27dc0..6d188c59b2 100644 --- a/interface/tokenzr.h +++ b/interface/tokenzr.h @@ -123,7 +123,7 @@ public: reaches 0 HasMoreTokens() returns @false. */ - int CountTokens(); + int CountTokens() const; /** Returns the delimiter which ended scan for the last token returned by @@ -137,24 +137,24 @@ public: /** Returns the next token or empty string if the end of string was reached. */ - wxString GetNextToken(); + wxString GetNextToken() const; /** Returns the current position (i.e. one index after the last returned token or 0 if GetNextToken() has never been called) in the original string. */ - size_t GetPosition(); + size_t GetPosition() const; /** Returns the part of the starting string without all token already extracted. */ - wxString GetString(); + wxString GetString() const; /** Returns @true if the tokenizer has further tokens, @false if none are left. */ - bool HasMoreTokens(); + bool HasMoreTokens() const; /** Initializes the tokenizer. diff --git a/interface/toolbar.h b/interface/toolbar.h index ce44a080fe..260a01ccbb 100644 --- a/interface/toolbar.h +++ b/interface/toolbar.h @@ -270,7 +270,7 @@ public: @remarks Currently not implemented in wxGTK (always returns @NULL there). */ - wxToolBarToolBase* FindToolForPosition(wxCoord x, wxCoord y); + wxToolBarToolBase* FindToolForPosition(wxCoord x, wxCoord y) const; /** Returns the left/right and top/bottom margins, which are also used for @@ -278,7 +278,7 @@ public: @see SetMargins() */ - wxSize GetMargins(); + wxSize GetMargins() const; /** Returns the size of bitmap that the toolbar expects to have. The default bitmap @@ -300,7 +300,7 @@ public: @returns Client data, or @NULL if there is none. */ - wxObject* GetToolClientData(int toolId); + wxObject* GetToolClientData(int toolId) const; /** Called to determine whether a tool is enabled (responds to user input). @@ -312,7 +312,7 @@ public: @see EnableTool() */ - bool GetToolEnabled(int toolId); + bool GetToolEnabled(int toolId) const; /** Returns the long help for the given tool. @@ -322,27 +322,27 @@ public: @see SetToolLongHelp(), SetToolShortHelp() */ - wxString GetToolLongHelp(int toolId); + wxString GetToolLongHelp(int toolId) const; /** Returns the value used for packing tools. @see SetToolPacking() */ - int GetToolPacking(); + int GetToolPacking() const; /** Returns the tool position in the toolbar, or @c wxNOT_FOUND if the tool is not found. */ - int GetToolPos(int toolId); + int GetToolPos(int toolId) const; /** Returns the default separator size. @see SetToolSeparation() */ - int GetToolSeparation(); + int GetToolSeparation() const; /** Returns the short help for the given tool. @@ -352,7 +352,7 @@ public: @see GetToolLongHelp(), SetToolShortHelp() */ - wxString GetToolShortHelp(int toolId); + wxString GetToolShortHelp(int toolId) const; /** Returns the size of a whole button, which is usually larger than a tool bitmap @@ -373,12 +373,12 @@ public: @see ToggleTool() */ - bool GetToolState(int toolId); + bool GetToolState(int toolId) const; /** Returns the number of tools in the toolbar. */ - int GetToolsCount(); + int GetToolsCount() const; /** Inserts the control into the toolbar at the given position. diff --git a/interface/tooltip.h b/interface/tooltip.h index 20635ad568..66c090a879 100644 --- a/interface/tooltip.h +++ b/interface/tooltip.h @@ -39,12 +39,12 @@ public: /** Get the tooltip text. */ - wxString GetTip(); + wxString GetTip() const; /** Get the associated window. */ - wxWindow* GetWindow(); + wxWindow* GetWindow() const; /** Set the delay after which the tooltip disappears or how long a diff --git a/interface/toplevel.h b/interface/toplevel.h index c503ab4dec..d089b1e1ab 100644 --- a/interface/toplevel.h +++ b/interface/toplevel.h @@ -63,7 +63,7 @@ public: @NULL. The default button is the one activated by pressing the Enter key. */ - wxWindow* GetDefaultItem(); + wxWindow* GetDefaultItem() const; /** Returns the standard icon of the window. The icon will be invalid if it hadn't @@ -71,7 +71,7 @@ public: @see GetIcons() */ - const wxIcon GetIcon(); + const wxIcon GetIcon() const; /** Returns all icons associated with the window, there will be none of them if @@ -82,14 +82,14 @@ public: @see wxIconBundle */ - const wxIconBundle GetIcons(); + const wxIconBundle GetIcons() const; /** Gets a string containing the window title. @see SetTitle() */ - wxString GetTitle(); + wxString GetTitle() const; /** Unique to the wxWinCE port. Responds to showing/hiding SIP (soft input panel) @@ -115,14 +115,14 @@ public: currently working with it. */ - bool IsActive(); + bool IsActive() const; /** Returns @true if this window is expected to be always maximized, either due to platform policy or due to local policy regarding particular class. */ - virtual bool IsAlwaysMaximized(); + virtual bool IsAlwaysMaximized() const; /** Returns @true if the window is in fullscreen mode. @@ -134,12 +134,12 @@ public: /** Returns @true if the window is iconized. */ - bool IsIconized(); + bool IsIconized() const; /** Returns @true if the window is maximized. */ - bool IsMaximized(); + bool IsMaximized() const; /** @b @c This method is specific to wxUniversal port @@ -149,7 +149,7 @@ public: @see UseNativeDecorations(), UseNativeDecorationsByDefault() */ - bool IsUsingNativeDecorations(); + bool IsUsingNativeDecorations() const; /** Maximizes or restores the window. @@ -320,7 +320,7 @@ public: By default, the application stays alive as long as there are any open top level windows. */ - virtual bool ShouldPreventAppExit(); + virtual bool ShouldPreventAppExit() const; /** Depending on the value of @a show parameter the window is either shown full diff --git a/interface/treebase.h b/interface/treebase.h index 1daf8cc422..f52b638313 100644 --- a/interface/treebase.h +++ b/interface/treebase.h @@ -32,14 +32,14 @@ public: /** Returns @true if this instance is referencing a valid tree item. */ - bool IsOk(); + bool IsOk() const; //@{ /** Operators for comparison between wxTreeItemId objects. */ - void operator !(); - bool operator ==(const wxTreeItemId& item); - bool operator !=(const wxTreeItemId& item); + void operator !() const; + const bool operator ==(const wxTreeItemId& item) const; + const bool operator !=(const wxTreeItemId& item) const; //@} }; diff --git a/interface/treebook.h b/interface/treebook.h index d4d469e12e..e68b202f72 100644 --- a/interface/treebook.h +++ b/interface/treebook.h @@ -41,12 +41,12 @@ public: Returns the page that was selected before the change, wxNOT_FOUND if none was selected. */ - int GetOldSelection(); + int GetOldSelection() const; /** Returns the currently selected page, or wxNOT_FOUND if none was selected. */ - int GetSelection(); + int GetSelection() const; }; @@ -180,18 +180,18 @@ public: /** Returns the image index for the given page. */ - int GetPageImage(size_t n); + int GetPageImage(size_t n) const; /** Returns the parent page of the given one or @c wxNOT_FOUND if this is a top-level page. */ - int GetPageParent(size_t page); + int GetPageParent(size_t page) const; /** Returns the string for the given page. */ - wxString GetPageText(size_t n); + wxString GetPageText(size_t n) const; /** Returns the currently selected page, or wxNOT_FOUND if none was selected. @@ -200,7 +200,7 @@ public: depending on the platform and so wxTreebookEvent::GetSelection should be used instead in this case. */ - int GetSelection(); + int GetSelection() const; /** Inserts a new page just before the page indicated by pagePos. @@ -224,7 +224,7 @@ public: /** Gets the pagePos page state -- whether it is expanded or collapsed */ - bool IsNodeExpanded(size_t pageId); + bool IsNodeExpanded(size_t pageId) const; /** Sets the image list for the page control. It does not take ownership of the diff --git a/interface/treectrl.h b/interface/treectrl.h index b67e630933..60cd852688 100644 --- a/interface/treectrl.h +++ b/interface/treectrl.h @@ -333,14 +333,14 @@ public: scrollbar and its position is not 0. */ bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, - bool textOnly = false); + bool textOnly = false) const; /** Returns the buttons image list (from which application-defined button images are taken). This function is only available in the generic version. */ - wxImageList* GetButtonsImageList(); + wxImageList* GetButtonsImageList() const; /** Returns the number of items in the branch. If @a recursively is @true, @@ -348,19 +348,19 @@ public: of descendants, otherwise only one level of children is counted. */ unsigned int GetChildrenCount(const wxTreeItemId& item, - bool recursively = true); + bool recursively = true) const; /** Returns the number of items in the control. */ - unsigned int GetCount(); + unsigned int GetCount() const; /** Returns the edit control being currently used to edit a label. Returns @NULL if no label is being edited. @b NB: It is currently only implemented for wxMSW. */ - wxTextCtrl* GetEditControl(); + wxTextCtrl* GetEditControl() const; /** Returns the first child; call GetNextChild() for the next child. @@ -375,34 +375,36 @@ public: @see GetNextChild(), GetNextSibling() */ wxTreeItemId GetFirstChild(const wxTreeItemId& item, - wxTreeItemIdValue& cookie); + wxTreeItemIdValue& cookie) const; /** Returns the first visible item. */ - wxTreeItemId GetFirstVisibleItem(); + wxTreeItemId GetFirstVisibleItem() const; /** Returns the normal image list. */ - wxImageList* GetImageList(); + wxImageList* GetImageList() const; /** Returns the current tree control indentation. */ - int GetIndent(); + int GetIndent() const; /** Returns the background colour of the item. */ - wxColour GetItemBackgroundColour(const wxTreeItemId& item); + wxColour GetItemBackgroundColour(const wxTreeItemId& item) const; //@{ /** Returns the font of the item label. */ - wxTreeItemData* GetItemData(const wxTreeItemId& item); -See also wxPython note: + wxTreeItemData* GetItemData(const wxTreeItemId& item) const; + const See also + wxTreeItemData +wxPython note: wxPython provides the following shortcut method: @@ -425,7 +427,7 @@ wxPython provides the following shortcut method: - wxFont GetItemFont(const wxTreeItemId& item); + wxFont GetItemFont(const wxTreeItemId& item) const; //@} /** @@ -440,28 +442,28 @@ wxPython provides the following shortcut method: (which is shown when an expanded item is currently selected) */ int GetItemImage(const wxTreeItemId& item, - wxTreeItemIcon which = wxTreeItemIcon_Normal); + wxTreeItemIcon which = wxTreeItemIcon_Normal) const; /** Returns the item's parent. */ - wxTreeItemId GetItemParent(const wxTreeItemId& item); + wxTreeItemId GetItemParent(const wxTreeItemId& item) const; /** Gets the selected item image (this function is obsolete, use @c GetItemImage(item, wxTreeItemIcon_Selected) instead). */ - int GetItemSelectedImage(const wxTreeItemId& item); + int GetItemSelectedImage(const wxTreeItemId& item) const; /** Returns the item label. */ - wxString GetItemText(const wxTreeItemId& item); + wxString GetItemText(const wxTreeItemId& item) const; /** Returns the colour of the item label. */ - wxColour GetItemTextColour(const wxTreeItemId& item); + wxColour GetItemTextColour(const wxTreeItemId& item) const; /** Returns the last child of the item (or an invalid tree item if this item has no @@ -470,7 +472,7 @@ wxPython provides the following shortcut method: @see GetFirstChild(), GetNextSibling(), GetLastChild() */ - wxTreeItemId GetLastChild(const wxTreeItemId& item); + wxTreeItemId GetLastChild(const wxTreeItemId& item) const; /** Returns the next child; call GetFirstChild() for the first child. @@ -484,7 +486,7 @@ wxPython provides the following shortcut method: @see GetFirstChild() */ wxTreeItemId GetNextChild(const wxTreeItemId& item, - wxTreeItemIdValue& cookie); + wxTreeItemIdValue& cookie) const; /** Returns the next sibling of the specified item; call GetPrevSibling() for the @@ -493,14 +495,14 @@ wxPython provides the following shortcut method: @see GetPrevSibling() */ - wxTreeItemId GetNextSibling(const wxTreeItemId& item); + wxTreeItemId GetNextSibling(const wxTreeItemId& item) const; /** Returns the next visible item or an invalid item if this item is the last visible one. Notice that the @a item itself must be visible. */ - wxTreeItemId GetNextVisible(const wxTreeItemId& item); + wxTreeItemId GetNextVisible(const wxTreeItemId& item) const; /** Returns the previous sibling of the specified item; call GetNextSibling() for @@ -509,14 +511,14 @@ wxPython provides the following shortcut method: @see GetNextSibling() */ - wxTreeItemId GetPrevSibling(const wxTreeItemId& item); + wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const; /** Returns the previous visible item or an invalid item if this item is the first visible one. Notice that the @a item itself must be visible. */ - wxTreeItemId GetPrevVisible(const wxTreeItemId& item); + wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const; /** Returns @true if the control will use a quick calculation for the best size, @@ -524,12 +526,12 @@ wxPython provides the following shortcut method: @see SetQuickBestSize() */ - bool GetQuickBestSize(); + bool GetQuickBestSize() const; /** Returns the root item for the tree control. */ - wxTreeItemId GetRootItem(); + wxTreeItemId GetRootItem() const; /** Returns the selection, or an invalid item if there is no selection. @@ -537,20 +539,20 @@ wxPython provides the following shortcut method: GetSelections() for the controls which do have this style. */ - wxTreeItemId GetSelection(); + wxTreeItemId GetSelection() const; /** Fills the array of tree items passed in with the currently selected items. This function can be called only if the control has the wxTR_MULTIPLE style. Returns the number of selected items. */ - unsigned int GetSelections(wxArrayTreeItemIds& selection); + unsigned int GetSelections(wxArrayTreeItemIds& selection) const; /** Returns the state image list (from which application-defined state images are taken). */ - wxImageList* GetStateImageList(); + wxImageList* GetStateImageList() const; /** Calculates which (if any) item is under the given point, returning the tree item @@ -601,7 +603,7 @@ wxPython provides the following shortcut method: To the left of the client area. */ - wxTreeItemId HitTest(const wxPoint& point, int& flags); + wxTreeItemId HitTest(const wxPoint& point, int& flags) const; //@{ /** @@ -632,32 +634,32 @@ wxPython provides the following shortcut method: Returns @true if the given item is in bold state. See also: SetItemBold() */ - bool IsBold(const wxTreeItemId& item); + bool IsBold(const wxTreeItemId& item) const; /** Returns @true if the control is empty (i.e. has no items, even no root one). */ - bool IsEmpty(); + bool IsEmpty() const; /** Returns @true if the item is expanded (only makes sense if it has children). */ - bool IsExpanded(const wxTreeItemId& item); + bool IsExpanded(const wxTreeItemId& item) const; /** Returns @true if the item is selected. */ - bool IsSelected(const wxTreeItemId& item); + bool IsSelected(const wxTreeItemId& item) const; /** Returns @true if the item is visible on the screen. */ - bool IsVisible(const wxTreeItemId& item); + bool IsVisible(const wxTreeItemId& item) const; /** Returns @true if the item has children. */ - bool ItemHasChildren(const wxTreeItemId& item); + bool ItemHasChildren(const wxTreeItemId& item) const; /** Override this function in the derived class to change the sort order of the @@ -897,29 +899,29 @@ public: /** Returns the item (valid for all events). */ - wxTreeItemId GetItem(); + wxTreeItemId GetItem() const; /** Returns the key code if the event is a key event. Use GetKeyEvent() to get the values of the modifier keys for this event (i.e. Shift or Ctrl). */ - int GetKeyCode(); + int GetKeyCode() const; /** Returns the key event for @c EVT_TREE_KEY_DOWN events. */ - const wxKeyEvent GetKeyEvent(); + const wxKeyEvent GetKeyEvent() const; /** Returns the label if the event is a begin or end edit label event. */ - const wxString GetLabel(); + const wxString GetLabel() const; /** Returns the old item index (valid for EVT_TREE_ITEM_CHANGING and CHANGED events) */ - wxTreeItemId GetOldItem(); + wxTreeItemId GetOldItem() const; /** Returns the position of the mouse pointer if the event is a drag or @@ -928,13 +930,13 @@ public: wxTreeCtrl window (so that you can pass it directly to e.g. wxWindow::PopupMenu). */ - wxPoint GetPoint(); + wxPoint GetPoint() const; /** Returns @true if the label edit was cancelled. This should be called from within an EVT_TREE_END_LABEL_EDIT handler. */ - bool IsEditCancelled(); + bool IsEditCancelled() const; /** Set the tooltip for the item (valid for EVT_TREE_ITEM_GETTOOLTIP events). diff --git a/interface/uri.h b/interface/uri.h index 20b9d96b56..5a18ea3101 100644 --- a/interface/uri.h +++ b/interface/uri.h @@ -54,7 +54,7 @@ public: the URI that is returned from Get is the same one passed to Create. */ - wxString BuildURI(); + wxString BuildURI() const; /** Builds the URI from its individual components, adds proper separators, and @@ -62,7 +62,7 @@ public: Note that it is preferred to call this over Unescape(BuildURI()) since BuildUnescapedURI() performs some optimizations over the plain method. */ - wxString BuildUnescapedURI(); + wxString BuildUnescapedURI() const; /** Creates this URI from the string @@ -91,7 +91,7 @@ public: of the URI. @c http://mysite.com/mypath#fragment */ - const wxString GetFragment(); + const wxString GetFragment() const; /** Obtains the host type of this URI, which is of type @@ -113,7 +113,7 @@ public: Server is an IP address, but not versions 4 or 6 */ - const HostType GetHostType(); + const HostType GetHostType() const; /** Returns the password part of the userinfo component of @@ -121,7 +121,7 @@ public: RFC 1396 and should generally be avoided if possible. @c http://user:password@mysite.com/mypath */ - const wxString GetPassword(); + const wxString GetPassword() const; /** Returns the (normalized) path of the URI. @@ -133,7 +133,7 @@ public: character. @c http://mysite.compath */ - const wxString GetPath(); + const wxString GetPath() const; /** Returns a string representation of the URI's port. @@ -143,7 +143,7 @@ public: Note that you can easily get the numeric value of the port by using wxAtoi or wxString::Format. */ - const wxString GetPort(); + const wxString GetPort() const; /** Returns the Query component of the URI. @@ -152,14 +152,14 @@ public: and after a '?' character. @c http://mysite.com/mypath?query */ - const wxString GetQuery(); + const wxString GetQuery() const; /** Returns the Scheme component of the URI. The first part of the uri. @c scheme://mysite.com */ - const wxString GetScheme(); + const wxString GetScheme() const; /** Returns the Server component of the URI. @@ -170,7 +170,7 @@ public: server component. @c http://server/mypath */ - const wxString GetServer(); + const wxString GetServer() const; /** Returns the username part of the userinfo component of @@ -178,7 +178,7 @@ public: RFC 1396 and should generally be avoided if possible. @c http://user:password@mysite.com/mypath */ - const wxString GetUser(); + const wxString GetUser() const; /** Returns the UserInfo component of the URI. @@ -186,49 +186,49 @@ public: that is postfixed by a '@' character. @c http://userinfo@mysite.com/mypath */ - const wxString GetUserInfo(); + const wxString GetUserInfo() const; /** Returns @true if the Fragment component of the URI exists. */ - bool HasFragment(); + bool HasFragment() const; /** Returns @true if the Path component of the URI exists. */ - bool HasPath(); + bool HasPath() const; /** Returns @true if the Port component of the URI exists. */ - bool HasPort(); + bool HasPort() const; /** Returns @true if the Query component of the URI exists. */ - bool HasQuery(); + bool HasQuery() const; /** Returns @true if the Scheme component of the URI exists. */ - bool HasScheme(); + bool HasScheme() const; /** Returns @true if the Server component of the URI exists. */ - bool HasServer(); + bool HasServer() const; /** Returns @true if the User component of the URI exists. */ - bool HasUser(); + bool HasUser() const; /** Returns @true if a valid [absolute] URI, otherwise this URI is a URI reference and not a full URI, and IsReference returns @false. */ - bool IsReference(); + bool IsReference() const; /** To obtain individual components you can use diff --git a/interface/url.h b/interface/url.h index dceb2096d1..638a09155c 100644 --- a/interface/url.h +++ b/interface/url.h @@ -78,7 +78,7 @@ public: An error occurred during negotiation. */ - wxURLError GetError(); + wxURLError GetError() const; /** Creates a new input stream on the specified URL. You can use all but seek @@ -104,7 +104,7 @@ public: Returns @true if this object is correctly initialized, i.e. if GetError() returns @c wxURL_NOERR. */ - bool IsOk(); + bool IsOk() const; /** Sets the default proxy server to use to get the URL. The string specifies diff --git a/interface/valgen.h b/interface/valgen.h index 854507dcec..4813c517e7 100644 --- a/interface/valgen.h +++ b/interface/valgen.h @@ -65,7 +65,7 @@ public: /** Clones the generic validator using the copy constructor. */ - virtual wxValidator* Clone(); + virtual wxValidator* Clone() const; /** Transfers the value from the window to the appropriate data type. diff --git a/interface/validate.h b/interface/validate.h index a0c4ec1ace..19c5921b36 100644 --- a/interface/validate.h +++ b/interface/validate.h @@ -60,12 +60,12 @@ public: data. This base function returns @NULL. */ - virtual wxObject* Clone(); + virtual wxObject* Clone() const; /** Returns the window associated with the validator. */ - wxWindow* GetWindow(); + wxWindow* GetWindow() const; /** This functions switches on or turns off the error sound produced by the diff --git a/interface/valtext.h b/interface/valtext.h index 7e9db73762..77c0120e5b 100644 --- a/interface/valtext.h +++ b/interface/valtext.h @@ -157,22 +157,22 @@ public: /** Clones the text validator using the copy constructor. */ - virtual wxValidator* Clone(); + virtual wxValidator* Clone() const; /** Returns a reference to the exclude list (the list of invalid values). */ - wxArrayString GetExcludes(); + wxArrayString GetExcludes() const; /** Returns a reference to the include list (the list of valid values). */ - wxArrayString GetIncludes(); + wxArrayString GetIncludes() const; /** Returns the validator style. */ - long GetStyle(); + long GetStyle() const; /** Receives character input from the window and filters it according to the diff --git a/interface/variant.h b/interface/variant.h index 2855455edc..31748972ac 100644 --- a/interface/variant.h +++ b/interface/variant.h @@ -159,12 +159,12 @@ public: /** Retrieves and converts the value of this variant to the type that @a value is. */ - bool Convert(long* value); - bool Convert(bool* value); - bool Convert(double* value); - bool Convert(wxString* value); - bool Convert(wxChar* value); - bool Convert(wxDateTime* value); + bool Convert(long* value) const; + const bool Convert(bool* value) const; + const bool Convert(double* value) const; + const bool Convert(wxString* value) const; + const bool Convert(wxChar* value) const; + const bool Convert(wxDateTime* value) const; //@} /** @@ -175,22 +175,22 @@ public: /** Returns the string array value. */ - wxArrayString GetArrayString(); + wxArrayString GetArrayString() const; /** Returns the boolean value. */ - bool GetBool(); + bool GetBool() const; /** Returns the character value. */ - wxChar GetChar(); + wxChar GetChar() const; /** Returns the number of elements in the list. */ - size_t GetCount(); + size_t GetCount() const; /** Returns a pointer to the internal variant data. To take ownership @@ -198,38 +198,38 @@ public: method. When you stop using it, wxVariantData::DecRef must be likewise called. */ - wxVariantData* GetData(); + wxVariantData* GetData() const; /** Returns the date value. */ - wxDateTime GetDateTime(); + wxDateTime GetDateTime() const; /** Returns the floating point value. */ - double GetDouble(); + double GetDouble() const; /** Returns a reference to the wxVariantList class used by wxVariant if this wxVariant is currently a list of variants. */ - wxVariantList GetList(); + wxVariantList GetList() const; /** Returns the integer value. */ - long GetLong(); + long GetLong() const; /** Returns a constant reference to the variant name. */ - const wxString GetName(); + const wxString GetName() const; /** Gets the string value. */ - wxString GetString(); + wxString GetString() const; /** Returns the value type as a string. The built-in types are: bool, char, @@ -237,17 +237,17 @@ public: If the variant is null, the value type returned is the string "null" (not the empty string). */ - wxString GetType(); + wxString GetType() const; /** Gets the void pointer value. */ - void* GetVoidPtr(); + void* GetVoidPtr() const; /** Gets the wxObject pointer value. */ - wxObject* GetWxObjectPtr(); + wxObject* GetWxObjectPtr() const; /** Inserts a value at the front of the list. @@ -258,18 +258,18 @@ public: Returns @true if there is no data associated with this variant, @false if there is data. */ - bool IsNull(); + bool IsNull() const; /** Returns @true if @a type matches the type of the variant, @false otherwise. */ - bool IsType(const wxString& type); + bool IsType(const wxString& type) const; /** Returns @true if the data is derived from the class described by @e type, @false otherwise. */ - bool IsValueKindOf(const wxClassInfo* type type); + bool IsValueKindOf(const wxClassInfo* type type) const; /** Makes the variant null by deleting the internal data. @@ -279,12 +279,12 @@ public: /** Makes a string representation of the variant value (for any type). */ - wxString MakeString(); + wxString MakeString() const; /** Returns @true if @a value matches an element in the list. */ - bool Member(const wxVariant& value); + bool Member(const wxVariant& value) const; /** Makes an empty list. This differs from a null variant which has no data; a null @@ -310,18 +310,18 @@ public: /** Inequality test operators. */ - bool operator !=(const wxVariant& value); - bool operator !=(const wxString& value); - bool operator !=(const wxChar* value); - bool operator !=(wxChar value); - bool operator !=(const long value); - bool operator !=(const bool value); - bool operator !=(const double value); - bool operator !=(void* value); - bool operator !=(wxObject* value); - bool operator !=(const wxVariantList& value); - bool operator !=(const wxArrayString& value); - bool operator !=(const wxDateTime& value); + bool operator !=(const wxVariant& value) const; + const bool operator !=(const wxString& value) const; + const bool operator !=(const wxChar* value) const; + const bool operator !=(wxChar value) const; + const bool operator !=(const long value) const; + const bool operator !=(const bool value) const; + const bool operator !=(const double value) const; + const bool operator !=(void* value) const; + const bool operator !=(wxObject* value) const; + const bool operator !=(const wxVariantList& value) const; + const bool operator !=(const wxArrayString& value) const; + const bool operator !=(const wxDateTime& value) const; //@} //@{ @@ -351,18 +351,18 @@ public: /** Equality test operators. */ - bool operator ==(const wxVariant& value); - bool operator ==(const wxString& value); - bool operator ==(const wxChar* value); - bool operator ==(wxChar value); - bool operator ==(const long value); - bool operator ==(const bool value); - bool operator ==(const double value); - bool operator ==(void* value); - bool operator ==(wxObject* value); - bool operator ==(const wxVariantList& value); - bool operator ==(const wxArrayString& value); - bool operator ==(const wxDateTime& value); + bool operator ==(const wxVariant& value) const; + const bool operator ==(const wxString& value) const; + const bool operator ==(const wxChar* value) const; + const bool operator ==(wxChar value) const; + const bool operator ==(const long value) const; + const bool operator ==(const bool value) const; + const bool operator ==(const double value) const; + const bool operator ==(void* value) const; + const bool operator ==(wxObject* value) const; + const bool operator ==(const wxVariantList& value) const; + const bool operator ==(const wxArrayString& value) const; + const bool operator ==(const wxDateTime& value) const; //@} //@{ @@ -371,37 +371,37 @@ public: to change the value at this index. */ wxVariant operator [](size_t idx); - wxVariant operator [](size_t idx); + const wxVariant& operator [](size_t idx); //@} //@{ /** Operator for implicit conversion to a long, using GetLong(). */ - double operator double(); - long operator long(); + double operator double() const; + const long operator long() const; //@} /** Operator for implicit conversion to a pointer to a void, using GetVoidPtr(). */ - void* operator void*(); + void* operator void*() const; /** Operator for implicit conversion to a wxChar, using GetChar(). */ - char operator wxChar(); + char operator wxChar() const; /** Operator for implicit conversion to a pointer to a wxDateTime, using GetDateTime(). */ - void* operator wxDateTime(); + void* operator wxDateTime() const; /** Operator for implicit conversion to a string, using MakeString(). */ - wxString operator wxString(); + wxString operator wxString() const; }; @@ -446,7 +446,7 @@ public: Implement Clone if you wish wxVariant::Unshare to work for your data. This function is implemented for all built-in data types. */ - wxVariantData* Clone(); + wxVariantData* Clone() const; /** Decreases reference count. If the count reaches zero, the object is @@ -459,19 +459,19 @@ public: /** Returns @true if this object is equal to @e data. */ - bool Eq(wxVariantData& data); + bool Eq(wxVariantData& data) const; /** Returns the string type of the data. */ - wxString GetType(); + wxString GetType() const; /** If the data is a wxObject returns a pointer to the objects wxClassInfo structure, if the data isn't a wxObject the method returns @NULL. */ - wxClassInfo* GetValueClassInfo(); + wxClassInfo* GetValueClassInfo() const; /** Increases reference count. Note that initially wxVariantData has reference @@ -491,8 +491,8 @@ public: /** Writes the data to @a stream or @e string. */ - bool Write(ostream& stream); - bool Write(wxString& string); + bool Write(ostream& stream) const; + const bool Write(wxString& string) const; //@} /** diff --git a/interface/vector.h b/interface/vector.h index 7b6e04158d..2476ab8c40 100644 --- a/interface/vector.h +++ b/interface/vector.h @@ -45,7 +45,7 @@ public: Returns item at position @e idx. */ const value_type at(size_type idx); - value_type at(size_type idx); + const value_type at(size_type idx); //@} //@{ @@ -53,7 +53,7 @@ public: Return last item. */ const value_type back(); - value_type back(); + const value_type back(); //@} //@{ @@ -61,13 +61,13 @@ public: Return iterator to beginning of the vector. */ const_iterator begin(); - iterator begin(); + const iterator begin(); //@} /** */ - size_type capacity(); + size_type capacity() const; /** Clears the vector. @@ -77,14 +77,14 @@ public: /** Returns @true if the vector is empty. */ - bool empty(); + bool empty() const; //@{ /** Returns iterator to the end of the vector. */ const_iterator end(); - iterator end(); + const iterator end(); //@} //@{ @@ -102,7 +102,7 @@ public: Returns first item. */ const value_type front(); - value_type front(); + const value_type front(); //@} /** @@ -123,7 +123,7 @@ public: Returns item at position @e idx. */ const value_type operator[](size_type idx); - value_type operator[](size_type idx); + const value_type operator[](size_type idx); //@} /** diff --git a/interface/vlbox.h b/interface/vlbox.h index 67e2e4fa71..40f7561267 100644 --- a/interface/vlbox.h +++ b/interface/vlbox.h @@ -91,14 +91,14 @@ public: This method is only valid for multi selection listboxes. */ - int GetFirstSelected(unsigned long& cookie); + int GetFirstSelected(unsigned long& cookie) const; /** Get the number of items in the control. @see SetItemCount() */ - size_t GetItemCount(); + size_t GetItemCount() const; /** Returns the margins used by the control. The @c x field of the returned @@ -106,7 +106,7 @@ public: @see SetMargins() */ - wxPoint GetMargins(); + wxPoint GetMargins() const; /** Returns the index of the next selected item or @c wxNOT_FOUND if there are @@ -115,7 +115,7 @@ public: @see GetFirstSelected() */ - int GetNextSelected(unsigned long& cookie); + int GetNextSelected(unsigned long& cookie) const; /** Returns the number of the items currently selected. @@ -125,12 +125,12 @@ public: @see IsSelected(), GetFirstSelected(), GetNextSelected() */ - size_t GetSelectedCount(); + size_t GetSelectedCount() const; /** Get the currently selected item or @c wxNOT_FOUND if there is no selection. */ - int GetSelection(); + int GetSelection() const; /** Returns the background colour used for the selected cells. By default the @@ -138,14 +138,14 @@ public: @see wxSystemSettings::GetColour, SetSelectionBackground() */ - const wxColour GetSelectionBackground(); + const wxColour GetSelectionBackground() const; /** Returns @true if the listbox was created with @c wxLB_MULTIPLE style and so supports multiple selection or @false if it is a single selection listbox. */ - bool HasMultipleSelection(); + bool HasMultipleSelection() const; /** Returns @true if this item is the current one, @false otherwise. @@ -155,12 +155,12 @@ public: selection listboxes where many items may be selected but only one (at most) is current. */ - bool IsCurrent(size_t item); + bool IsCurrent(size_t item) const; /** Returns @true if this item is selected, @false otherwise. */ - bool IsSelected(size_t item); + bool IsSelected(size_t item) const; /** This method is used to draw the items background and, maybe, a border @@ -170,7 +170,7 @@ public: colour and drawing a border around the item if it is either selected or current. */ - void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n); + void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; /** The derived class must implement this function to actually draw the item @@ -184,7 +184,7 @@ public: @param n The index of the item to be drawn */ - void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n); + void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; /** This method may be used to draw separators between the lines. The rectangle @@ -199,13 +199,13 @@ public: @param n The index of the item */ - void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n); + 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). */ - wxCoord OnMeasureItem(size_t n); + wxCoord OnMeasureItem(size_t n) const; /** Selects or deselects the specified item which must be valid (i.e. not diff --git a/interface/vscroll.h b/interface/vscroll.h index aea2012930..702d2cb485 100644 --- a/interface/vscroll.h +++ b/interface/vscroll.h @@ -44,37 +44,37 @@ public: Please note that this function will not be called if @c EstimateTotalSize() is overridden in your derived class. */ - virtual wxCoord EstimateTotalWidth(); + virtual wxCoord EstimateTotalWidth() const; /** Returns the number of columns the target window contains. @see SetColumnCount() */ - size_t GetColumnCount(); + size_t GetColumnCount() const; /** Returns the index of the first visible column based on the scroll position. */ - size_t GetVisibleColumnsBegin(); + size_t GetVisibleColumnsBegin() const; /** Returns the index of the last visible column based on the scroll position. This includes the last column even if it is only partially visible. */ - size_t GetVisibleColumnsEnd(); + size_t GetVisibleColumnsEnd() const; /** Returns @true if the given column is currently visible (even if only partially visible) or @false otherwise. */ - bool IsColumnVisible(size_t column); + 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); + virtual wxCoord OnGetColumnWidth(size_t column) const; /** This function doesn't have to be overridden but it may be useful to do so if @@ -89,7 +89,7 @@ public: Finally, note that columnMin is inclusive, while columnMax is exclusive. */ virtual void OnGetColumnsWidthHint(size_t columnMin, - size_t columnMax); + size_t columnMax) const; /** Triggers a refresh for just the given column's area of the window if it's @@ -173,37 +173,37 @@ public: Please note that this function will not be called if @c EstimateTotalSize() is overridden in your derived class. */ - virtual wxCoord EstimateTotalHeight(); + virtual wxCoord EstimateTotalHeight() const; /** Returns the number of rows the target window contains. @see SetRowCount() */ - size_t GetRowCount(); + size_t GetRowCount() const; /** Returns the index of the first visible row based on the scroll position. */ - size_t GetVisibleRowsBegin(); + size_t GetVisibleRowsBegin() const; /** Returns the index of the last visible row based on the scroll position. This includes the last row even if it is only partially visible. */ - size_t GetVisibleRowsEnd(); + size_t GetVisibleRowsEnd() const; /** Returns @true if the given row is currently visible (even if only partially visible) or @false otherwise. */ - bool IsRowVisible(size_t row); + 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); + virtual wxCoord OnGetRowHeight(size_t row) const; /** This function doesn't have to be overridden but it may be useful to do so if @@ -217,7 +217,7 @@ public: units outside of this interval, so this is really just a hint, not a promise. Finally, note that rowMin is inclusive, while rowMax is exclusive. */ - virtual void OnGetRowsHeightHint(size_t rowMin, size_t rowMax); + virtual void OnGetRowsHeightHint(size_t rowMin, size_t rowMax) const; /** Triggers a refresh for just the given row's area of the window if it's visible. @@ -307,7 +307,7 @@ public: @see CalcUnscrolledPosition() */ - int CalcScrolledPosition(int coord); + int CalcScrolledPosition(int coord) const; /** Translates the device coordinate given to the corresponding logical @@ -318,7 +318,7 @@ public: @see CalcScrolledPosition() */ - int CalcUnscrolledPosition(int coord); + int CalcUnscrolledPosition(int coord) const; /** With physical scrolling on (when this is @true), the device origin is @@ -341,7 +341,7 @@ public: resulting in very strange scrollbar behaviour so this function should really try to make the best guess possible. */ - virtual wxCoord EstimateTotalSize(); + virtual wxCoord EstimateTotalSize() const; /** This function needs to be overridden in the in the derived class to return the @@ -350,13 +350,13 @@ public: @see GetOrientationTargetSize() */ - virtual int GetNonOrientationTargetSize(); + virtual int GetNonOrientationTargetSize() const; /** 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(); + virtual wxOrientation GetOrientation() const; /** This function needs to be overridden in the in the derived class to return the @@ -365,7 +365,7 @@ public: @see GetNonOrientationTargetSize() */ - virtual int GetOrientationTargetSize(); + virtual int GetOrientationTargetSize() const; /** This function will return the target window this helper class is currently @@ -373,30 +373,30 @@ public: @see SetTargetWindow() */ - wxWindow* GetTargetWindow(); + wxWindow* GetTargetWindow() const; /** Returns the index of the first visible unit based on the scroll position. */ - size_t GetVisibleBegin(); + size_t GetVisibleBegin() const; /** Returns the index of the last visible unit based on the scroll position. This includes the last unit even if it is only partially visible. */ - size_t GetVisibleEnd(); + size_t GetVisibleEnd() const; /** Returns @true if the given scroll unit is currently visible (even if only partially visible) or @false otherwise. */ - bool IsVisible(size_t unit); + 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); + virtual wxCoord OnGetUnitSize(size_t unit) const; /** This function doesn't have to be overridden but it may be useful to do so if @@ -410,7 +410,7 @@ public: units outside of this interval, so this is really just a hint, not a promise. Finally, note that unitMin is inclusive, while unitMax is exclusive. */ - virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax); + virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax) const; /** Recalculate all parameters and repaint all units. @@ -437,7 +437,7 @@ public: scroll position or @c wxNOT_FOUND if none (i.e. if it is below the last item). */ - int VirtualHitTest(wxCoord coord); + int VirtualHitTest(wxCoord coord) const; }; @@ -538,13 +538,14 @@ public: Deprecated for wxVarVScrollHelper::SetRowCount. */ size_t GetFirstVisibleLine(); - size_t GetLastVisibleLine(); - size_t GetLineCount(); - int HitTest(wxCoord x, wxCoord y); - int HitTest(const wxPoint& pt); - virtual wxCoord OnGetLineHeight(size_t line); - virtual void OnGetLinesHint(size_t lineMin, size_t lineMax); - virtual void RefreshLine(size_t line); + const size_t GetLastVisibleLine(); + const size_t GetLineCount(); + const int HitTest(wxCoord x, wxCoord y); + const int HitTest(const wxPoint& pt); + const virtual wxCoord OnGetLineHeight(size_t line); + const virtual void OnGetLinesHint(size_t lineMin, + size_t lineMax); + const virtual void RefreshLine(size_t line); virtual void RefreshLines(size_t from, size_t to); virtual bool ScrollLines(int lines); virtual bool ScrollPages(int pages); @@ -695,27 +696,27 @@ public: @see SetRowColumnCount() */ - wxSize GetRowColumnCount(); + wxSize GetRowColumnCount() const; /** Returns the index of the first visible column and row based on the current scroll position. */ - wxPosition GetVisibleBegin(); + wxPosition GetVisibleBegin() const; /** Returns the index of the last visible column and row based on the scroll position. This includes any partially visible columns or rows. */ - wxPosition GetVisibleEnd(); + wxPosition GetVisibleEnd() const; //@{ /** Returns @true if both the given row and column are currently visible (even if only partially visible) or @false otherwise. */ - bool IsVisible(size_t row, size_t column); - bool IsVisible(const wxPosition& pos); + bool IsVisible(size_t row, size_t column) const; + const bool IsVisible(const wxPosition& pos) const; //@} //@{ @@ -767,8 +768,8 @@ public: scroll position or @c wxNOT_FOUND (for the row, column, or possibly both values) if none. */ - wxPosition VirtualHitTest(wxCoord x, wxCoord y); - wxPosition VirtualHitTest(const wxPoint& pos); + wxPosition VirtualHitTest(wxCoord x, wxCoord y) const; + const wxPosition VirtualHitTest(const wxPoint& pos) const; //@} }; diff --git a/interface/weakref.h b/interface/weakref.h index 4041dd0d06..d5ab880924 100644 --- a/interface/weakref.h +++ b/interface/weakref.h @@ -88,7 +88,7 @@ public: /** Returns pointer to the tracked object or @NULL. */ - T* get(); + T* get() const; /** Release currently tracked object and start tracking the same object as @@ -100,13 +100,13 @@ public: Implicit conversion to T*. Returns pointer to the tracked object or @NULL. */ - T* operator*(); + T* operator*() const; /** Returns a reference to the tracked object. If the internal pointer is @NULL this method will cause an assert in debug mode. */ - T operator*(); + T operator*() const; /** Smart pointer member access. Returns a pointer to the diff --git a/interface/wfstream.h b/interface/wfstream.h index b9bc3e7e6a..24ae931e43 100644 --- a/interface/wfstream.h +++ b/interface/wfstream.h @@ -90,7 +90,7 @@ public: /** Returns @true if the stream is initialized and ready. */ - bool IsOk(); + bool IsOk() const; }; @@ -133,7 +133,7 @@ public: /** Returns @true if the stream is initialized and ready. */ - bool IsOk(); + bool IsOk() const; }; @@ -176,7 +176,7 @@ public: /** Returns @true if the stream is initialized and ready. */ - bool IsOk(); + bool IsOk() const; }; @@ -221,7 +221,7 @@ public: /** Returns @true if the stream is initialized and ready. */ - bool IsOk(); + bool IsOk() const; }; diff --git a/interface/window.h b/interface/window.h index 31ff77b150..9cb9d949d3 100644 --- a/interface/window.h +++ b/interface/window.h @@ -188,7 +188,7 @@ public: @see AcceptsFocusFromKeyboard() */ - bool AcceptsFocus(); + bool AcceptsFocus() const; /** This method may be overridden in the derived classes to return @false to @@ -196,7 +196,7 @@ public: clicks it with the mouse, it shouldn't be included in the TAB traversal chain when using the keyboard. */ - bool AcceptsFocusFromKeyboard(); + bool AcceptsFocusFromKeyboard() const; /** Adds a child window. This is called automatically by window creation @@ -226,7 +226,7 @@ public: /** Sets the cached best size value. */ - void CacheBestSize(const wxSize& size); + void CacheBestSize(const wxSize& size) const; /** Returns @true if the system supports transparent windows and calling @@ -319,8 +319,8 @@ public: @param pt The client position for the second form of the function. */ - virtual void ClientToScreen(int* x, int* y); - virtual wxPoint ClientToScreen(const wxPoint& pt); + virtual void ClientToScreen(int* x, int* y) const; + const virtual wxPoint ClientToScreen(const wxPoint& pt) const; //@} /** @@ -428,7 +428,7 @@ public: the minimal size which doesn't truncate the control, for a panel - the same size as it would have after a call to Fit(). */ - virtual wxSize DoGetBestSize(); + virtual wxSize DoGetBestSize() const; /** Does the window-specific updating after processing the update event. @@ -481,8 +481,8 @@ public: /** Find a child of this window, by name. */ - wxWindow* FindWindow(long id); - wxWindow* FindWindow(const wxString& name); + wxWindow* FindWindow(long id) const; + const wxWindow* FindWindow(const wxString& name) const; //@} /** @@ -564,7 +564,7 @@ public: /** Gets the accelerator table for this window. See wxAcceleratorTable. */ - wxAcceleratorTable* GetAcceleratorTable(); + wxAcceleratorTable* GetAcceleratorTable() const; /** Returns the accessible object for this window, if any. @@ -576,7 +576,7 @@ public: This method is deprecated, use GetEffectiveMinSize() instead. */ - wxSize GetAdjustedBestSize(); + wxSize GetAdjustedBestSize() const; /** Returns the background colour of the window. @@ -584,7 +584,7 @@ public: @see SetBackgroundColour(), SetForegroundColour(), GetForegroundColour() */ - virtual wxColour GetBackgroundColour(); + virtual wxColour GetBackgroundColour() const; /** Returns the background style of the window. The background style can be one of: @@ -619,7 +619,7 @@ public: @see SetBackgroundColour(), GetForegroundColour(), SetBackgroundStyle(), SetTransparent() */ - virtual wxBackgroundStyle GetBackgroundStyle(); + virtual wxBackgroundStyle GetBackgroundStyle() const; /** This functions returns the best acceptable minimal size for the window. For @@ -629,7 +629,7 @@ public: same as the size the window would have had after calling Fit(). */ - wxSize GetBestSize(); + wxSize GetBestSize() const; /** Returns the currently captured window. @@ -642,17 +642,17 @@ public: /** Returns the caret associated with the window. */ - wxCaret* GetCaret(); + wxCaret* GetCaret() const; /** Returns the character height for this window. */ - virtual int GetCharHeight(); + virtual int GetCharHeight() const; /** Returns the average character width for this window. */ - virtual int GetCharWidth(); + virtual int GetCharWidth() const; //@{ /** @@ -660,8 +660,8 @@ public: is a type-safe wxList-like class whose elements are of type @c wxWindow *. */ - wxWindowList GetChildren(); - const wxWindowList GetChildren(); + wxWindowList GetChildren() const; + const wxWindowList GetChildren() const; //@} /** @@ -703,27 +703,27 @@ public: @see GetSize(), GetVirtualSize() */ - void GetClientSize(int* width, int* height); - wxSize GetClientSize(); + void GetClientSize(int* width, int* height) const; + const wxSize GetClientSize() const; //@} /** Returns a pointer to the window's layout constraints, or @NULL if there are none. */ - wxLayoutConstraints* GetConstraints(); + wxLayoutConstraints* GetConstraints() const; /** Return the sizer that this window is a member of, if any, otherwise @NULL. */ - const wxSizer* GetContainingSizer(); + const wxSizer* GetContainingSizer() const; /** Return the cursor associated with this window. @see SetCursor() */ - const wxCursor GetCursor(); + const wxCursor GetCursor() const; /** Currently this is the same as calling @@ -738,14 +738,14 @@ public: function without actually having an object to apply it to whereas the static version can be used without having to create an object first. */ - virtual wxVisualAttributes GetDefaultAttributes(); + virtual wxVisualAttributes GetDefaultAttributes() const; /** Returns the associated drop target, which may be @NULL. @see SetDropTarget(), @ref overview_wxdndoverview */ - wxDropTarget* GetDropTarget(); + wxDropTarget* GetDropTarget() const; /** Merges the window's best size into the min size and returns the @@ -754,7 +754,7 @@ public: @see GetBestSize(), SetInitialSize() */ - wxSize GetEffectiveMinSize(); + wxSize GetEffectiveMinSize() const; /** Returns the event handler for this window. By default, the window is its @@ -763,19 +763,19 @@ public: @see SetEventHandler(), PushEventHandler(), PopEventHandler(), wxEvtHandler::ProcessEvent, wxEvtHandler */ - wxEvtHandler* GetEventHandler(); + wxEvtHandler* GetEventHandler() const; /** Returns the extra style bits for the window. */ - long GetExtraStyle(); + long GetExtraStyle() const; /** Returns the font for this window. @see SetFont() */ - wxFont GetFont(); + wxFont GetFont() const; /** Returns the foreground colour of the window. @@ -793,7 +793,7 @@ public: /** Returns the grandparent of a window, or @NULL if there isn't one. */ - wxWindow* GetGrandParent(); + wxWindow* GetGrandParent() const; /** Returns the platform-specific handle of the physical window. Cast it to an @@ -801,7 +801,7 @@ public: handle, such as @b HWND for Windows, @b Widget for Motif, @b GtkWidget for GTK or @b WinHandle for PalmOS. */ - void* GetHandle(); + void* GetHandle() const; /** Gets the help text to be used as context-sensitive help for this window. @@ -811,7 +811,7 @@ public: @see SetHelpText(), GetHelpTextAtPoint(), wxHelpProvider */ - virtual wxString GetHelpText(); + virtual wxString GetHelpText() const; /** Gets the help text to be used as context-sensitive help for this window. This @@ -824,7 +824,7 @@ public: Help event origin, see also wxHelpEvent::GetOrigin. */ virtual wxString GetHelpTextAtPoint(const wxPoint point, - wxHelpEvent::Origin origin); + wxHelpEvent::Origin origin) const; /** Returns the identifier of the window. @@ -835,7 +835,7 @@ public: @see SetId(), @ref overview_windowids "Window identifiers" */ - int GetId(); + int GetId() const; /** Generic way of getting a label from any window, for @@ -848,7 +848,7 @@ public: meta-programs (such as testing tools or special-needs access programs) which need to identify windows by name. */ - virtual wxString GetLabel(); + virtual wxString GetLabel() const; /** Returns the maximum size of window's client area. @@ -858,7 +858,7 @@ public: @see GetMaxSize() */ - wxSize GetMaxClientSize(); + wxSize GetMaxClientSize() const; /** Returns the maximum size of the window. This is an indication to the sizer @@ -867,7 +867,7 @@ public: @see GetMaxClientSize() */ - wxSize GetMaxSize(); + wxSize GetMaxSize() const; /** Returns the minimum size of window's client area, an indication to the sizer @@ -878,7 +878,7 @@ public: @see GetMinSize() */ - virtual wxSize GetMinClientSize(); + virtual wxSize GetMinClientSize() const; /** Returns the minimum size of the window, an indication to the sizer layout @@ -889,7 +889,7 @@ public: @see GetMinClientSize() */ - virtual wxSize GetMinSize(); + virtual wxSize GetMinSize() const; /** Returns the window's name. @@ -900,7 +900,7 @@ public: @see SetName() */ - virtual wxString GetName(); + virtual wxString GetName() const; /** Returns the next window after this one among the parent children or @NULL if @@ -909,12 +909,12 @@ public: @see GetPrevSibling() */ - wxWindow* GetNextSibling(); + wxWindow* GetNextSibling() const; /** Returns the parent of the window, or @NULL if there is no parent. */ - virtual wxWindow* GetParent(); + virtual wxWindow* GetParent() const; //@{ /** @@ -953,8 +953,8 @@ public: @see GetScreenPosition() */ - virtual void GetPosition(int* x, int* y); - wxPoint GetPosition(); + virtual void GetPosition(int* x, int* y) const; + const wxPoint GetPosition() const; //@} /** @@ -965,14 +965,14 @@ public: @see GetNextSibling() */ - wxWindow* GetPrevSibling(); + wxWindow* GetPrevSibling() const; /** Returns the position and size of the window as a wxRect object. @see GetScreenRect() */ - virtual wxRect GetRect(); + virtual wxRect GetRect() const; //@{ /** @@ -986,8 +986,8 @@ public: @see GetPosition() */ - virtual void GetScreenPosition(int* x, int* y); - wxPoint GetScreenPosition(); + virtual void GetScreenPosition(int* x, int* y) const; + const wxPoint GetScreenPosition() const; //@} /** @@ -996,7 +996,7 @@ public: @see GetRect() */ - virtual wxRect GetScreenRect(); + virtual wxRect GetScreenRect() const; /** Returns the built-in scrollbar position. @@ -1033,15 +1033,15 @@ public: @see GetClientSize(), GetVirtualSize() */ - void GetSize(int* width, int* height); - wxSize GetSize(); + void GetSize(int* width, int* height) const; + const wxSize GetSize() const; //@} /** Return the sizer associated with the window by a previous call to SetSizer() or @NULL. */ - wxSizer* GetSizer(); + wxSizer* GetSizer() const; //@{ /** @@ -1070,14 +1070,14 @@ public: int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, - bool use16 = false); - wxSize GetTextExtent(const wxString& string); + bool use16 = false) const; + const wxSize GetTextExtent(const wxString& string) const; //@} /** Get the associated tooltip or @NULL if none. */ - wxToolTip* GetToolTip(); + wxToolTip* GetToolTip() const; /** Returns the region specifying which parts of the window have been damaged. @@ -1086,13 +1086,13 @@ public: @see wxRegion, wxRegionIterator */ - virtual wxRegion GetUpdateRegion(); + virtual wxRegion GetUpdateRegion() const; /** Returns a pointer to the current validator for the window, or @NULL if there is none. */ - wxValidator* GetValidator(); + wxValidator* GetValidator() const; //@{ /** @@ -1106,27 +1106,27 @@ public: @param height Receives the window virtual height. */ - void GetVirtualSize(int* width, int* height); - wxSize GetVirtualSize(); + void GetVirtualSize(int* width, int* height) const; + const wxSize GetVirtualSize() const; //@} /** Returns the size of the left/right and top/bottom borders of this window in x and y components of the result respectively. */ - wxSize GetWindowBorderSize(); + wxSize GetWindowBorderSize() const; /** Gets the window style that was passed to the constructor or @b Create method. @b GetWindowStyle() is another name for the same function. */ - long GetWindowStyleFlag(); + long GetWindowStyleFlag() const; /** Returns the value previously passed to SetWindowVariant(). */ - wxWindowVariant GetWindowVariant(); + wxWindowVariant GetWindowVariant() const; /** This function will generate the appropriate call to @@ -1152,7 +1152,7 @@ public: @see CaptureMouse(), ReleaseMouse(), wxMouseCaptureLostEvent, wxMouseCaptureChangedEvent */ - virtual bool HasCapture(); + virtual bool HasCapture() const; /** Returns @true if the window has the given @a exFlag bit set in its @@ -1160,12 +1160,12 @@ public: @see SetExtraStyle() */ - bool HasExtraStyle(int exFlag); + bool HasExtraStyle(int exFlag) const; /** Returns @true if the window has the given @a flag bit set. */ - bool HasFlag(int flag); + bool HasFlag(int flag) const; /** Returns @true if the window (or in case of composite controls, its main @@ -1173,7 +1173,7 @@ public: @see FindFocus() */ - virtual bool HasFocus(); + virtual bool HasFocus() const; /** This method should be overridden to return @true if this window has @@ -1183,7 +1183,7 @@ public: and user-defined classes with similar behaviour should do it as well to allow the library to handle such windows appropriately. */ - virtual bool HasMultiplePages(); + virtual bool HasMultiplePages() const; /** Returns @true if this window has a scroll bar for this orientation. @@ -1191,7 +1191,7 @@ public: @param orient Orientation to check, either wxHORIZONTAL or wxVERTICAL. */ - virtual bool HasScrollbar(int orient); + virtual bool HasScrollbar(int orient) const; /** Returns @true if this window background is transparent (as, for example, for @@ -1200,7 +1200,7 @@ public: shouldn't have to call it. You may, however, have to override it in your wxWindow-derived class to ensure that background is painted correctly. */ - virtual bool HasTransparentBackground(); + virtual bool HasTransparentBackground() const; /** Equivalent to calling wxWindow::Show(@false). @@ -1263,7 +1263,7 @@ public: @see wxBufferedDC */ - virtual bool IsDoubleBuffered(); + virtual bool IsDoubleBuffered() const; /** Returns @true if the window is enabled, i.e. if it accepts user input, @c @@ -1276,7 +1276,7 @@ public: @see Enable() */ - virtual bool IsEnabled(); + virtual bool IsEnabled() const; //@{ /** @@ -1284,10 +1284,10 @@ public: last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed. */ - bool IsExposed(int x, int y); - bool IsExposed(wxPoint amp;pt); - bool IsExposed(int x, int y, int w, int h); - bool IsExposed(wxRect amp;rect); + bool IsExposed(int x, int y) const; + const bool IsExposed(wxPoint amp;pt) const; + const bool IsExposed(int x, int y, int w, int h) const; + const bool IsExposed(wxRect amp;rect) const; //@} /** @@ -1296,14 +1296,14 @@ public: @see Thaw() */ - virtual bool IsFrozen(); + virtual bool IsFrozen() const; /** Returns @true if the window is retained, @false otherwise. @remarks Retained windows are only available on X platforms. */ - virtual bool IsRetained(); + virtual bool IsRetained() const; /** Return whether a scrollbar is always shown. @@ -1320,7 +1320,7 @@ public: @see IsShownOnScreen() */ - virtual bool IsShown(); + virtual bool IsShown() const; /** Returns @true if the window is physically visible on the screen, i.e. it @@ -1328,7 +1328,7 @@ public: @see IsShown() */ - virtual bool IsShownOnScreen(); + virtual bool IsShownOnScreen() const; /** Returns @true if this window is intrinsically enabled, @false otherwise, @@ -1337,14 +1337,14 @@ public: mostly used for wxWidgets itself, user code should normally use IsEnabled() instead. */ - bool IsThisEnabled(); + bool IsThisEnabled() const; /** Returns @true if the given window is a top-level one. Currently all frames and dialogs are considered to be top-level windows (even if they have a parent window). */ - bool IsTopLevel(); + bool IsTopLevel() const; /** Invokes the constraint-based layout algorithm or the sizer-based algorithm @@ -1501,7 +1501,7 @@ public: @see SetEventHandler(), GetEventHandler(), PushEventHandler(), wxEvtHandler::ProcessEvent, wxEvtHandler */ - wxEvtHandler* PopEventHandler(bool deleteHandler = false); + wxEvtHandler* PopEventHandler(bool deleteHandler = false) const; //@{ /** @@ -1677,8 +1677,8 @@ public: @param pt The screen position for the second form of the function. */ - virtual void ScreenToClient(int* x, int* y); - virtual wxPoint ScreenToClient(const wxPoint& pt); + virtual void ScreenToClient(int* x, int* y) const; + const virtual wxPoint ScreenToClient(const wxPoint& pt) const; //@} /** @@ -1804,7 +1804,7 @@ public: /** Sets the caret associated with the window. */ - void SetCaret(wxCaret* caret); + void SetCaret(wxCaret* caret) const; //@{ /** diff --git a/interface/wizard.h b/interface/wizard.h index 6d9ba969f6..ab869ad39d 100644 --- a/interface/wizard.h +++ b/interface/wizard.h @@ -53,7 +53,7 @@ public: The only cases when you would want to override this function is if the page bitmap depends dynamically on the user choices, i.e. almost never. */ - wxBitmap GetBitmap(); + wxBitmap GetBitmap() const; /** Get the page which should be shown when the user chooses the @c "Next" @@ -63,7 +63,7 @@ public: @see GetPrev() */ - wxWizardPage* GetNext(); + wxWizardPage* GetNext() const; /** Get the page which should be shown when the user chooses the @c "Back" @@ -73,7 +73,7 @@ public: @see GetNext() */ - wxWizardPage* GetPrev(); + wxWizardPage* GetPrev() const; }; @@ -108,13 +108,13 @@ public: we came from the previous page and @false if we returned from the next one. */ - bool GetDirection(); + bool GetDirection() const; /** Returns the wxWizardPage which was active when this event was generated. */ - wxWizardPage* GetPage(); + wxWizardPage* GetPage() const; }; @@ -290,7 +290,7 @@ public: /** Returns the bitmap used for the wizard. */ - const wxBitmap GetBitmap(); + const wxBitmap GetBitmap() const; /** Returns the colour that should be used to fill the area not taken up by the @@ -298,7 +298,7 @@ public: if a non-zero bitmap placement flag has been set. See also SetBitmapPlacement(). */ - const wxColour GetBitmapBackgroundColour(); + const wxColour GetBitmapBackgroundColour() const; /** Returns the flags indicating how the wizard or page bitmap should be expanded @@ -312,7 +312,7 @@ public: Get the current page while the wizard is running. @NULL is returned if RunWizard() is not being executed now. */ - wxWizardPage* GetCurrentPage(); + wxWizardPage* GetCurrentPage() const; /** Returns the minimum width for the bitmap that will be constructed to contain @@ -320,7 +320,7 @@ public: if a non-zero bitmap placement flag has been set. See also SetBitmapPlacement(). */ - int GetMinimumBitmapWidth(); + int GetMinimumBitmapWidth() const; /** Returns pointer to page area sizer. The wizard is laid out using sizers and @@ -350,12 +350,12 @@ public: Adding pages to the page area sizer affects the default border width around page area that can be altered with SetBorder(). */ - virtual wxSizer* GetPageAreaSizer(); + virtual wxSizer* GetPageAreaSizer() const; /** Returns the size available for the pages. */ - wxSize GetPageSize(); + wxSize GetPageSize() const; /** Return @true if this page is not the last one in the wizard. The base diff --git a/interface/xml/xml.h b/interface/xml/xml.h index faa4fa12fe..a507cb6456 100644 --- a/interface/xml/xml.h +++ b/interface/xml/xml.h @@ -76,22 +76,22 @@ public: Returns the value of the attribute named @a attrName if it does exist. If it does not exist, the @a defaultVal is returned. */ - bool GetAttribute(const wxString& attrName, wxString* value); - wxString GetAttribute(const wxString& attrName, - const wxString& defaultVal); + bool GetAttribute(const wxString& attrName, wxString* value) const; + const wxString GetAttribute(const wxString& attrName, + const wxString& defaultVal) const; //@} /** Return a pointer to the first attribute of this node. */ - wxXmlAttribute* GetAttributes(); + wxXmlAttribute* GetAttributes() const; /** Returns the first child of this node. To get a pointer to the second child of this node (if it does exist), use the GetNext() function on the returned value. */ - wxXmlNode* GetChildren(); + wxXmlNode* GetChildren() const; /** Returns the content of this node. Can be an empty string. @@ -99,7 +99,7 @@ public: the content is an empty string. See GetNodeContent() for more details. */ - wxString GetContent(); + wxString GetContent() const; /** Returns the number of nodes which separe this node from @c grandparent. @@ -108,24 +108,24 @@ public: or the @NULL node (which is the parent of non-linked nodes or the parent of a wxXmlDocument's root node). */ - int GetDepth(wxXmlNode* grandparent = NULL); + int GetDepth(wxXmlNode* grandparent = NULL) const; /** Returns line number of the node in the input XML file or -1 if it is unknown. */ - int GetLineNumber(); + int GetLineNumber() const; /** Returns the name of this node. Can be an empty string (e.g. for nodes of type @c wxXML_TEXT_NODE or @c wxXML_CDATA_SECTION_NODE). */ - wxString GetName(); + wxString GetName() const; /** Returns a pointer to the sibling of this node or @NULL if there are no siblings. */ - wxXmlNode* GetNext(); + wxXmlNode* GetNext() const; /** Returns the content of the first child node of type @c wxXML_TEXT_NODE or @c @@ -139,23 +139,23 @@ public: An empty string is returned if the node has no children of type @c wxXML_TEXT_NODE or @c wxXML_CDATA_SECTION_NODE, or if the content of the first child of such types is empty. */ - wxString GetNodeContent(); + wxString GetNodeContent() const; /** Returns a pointer to the parent of this node or @NULL if this node has no parent. */ - wxXmlNode* GetParent(); + wxXmlNode* GetParent() const; /** Returns the type of this node. */ - wxXmlNodeType GetType(); + wxXmlNodeType GetType() const; /** Returns @true if this node has a attribute named @e attrName. */ - bool HasAttribute(const wxString& attrName); + bool HasAttribute(const wxString& attrName) const; /** Inserts the @a child node after @a before_node in the children list. @@ -175,7 +175,7 @@ public: documents must always produce the exact same tree regardless of the locale it runs under. */ - bool IsWhitespaceOnly(); + bool IsWhitespaceOnly() const; /** Removes the given node from the children list. Returns @true if the node was @@ -272,17 +272,17 @@ public: /** Returns the name of this attribute. */ - wxString GetName(); + wxString GetName() const; /** Returns the sibling of this attribute or @NULL if there are no siblings. */ - wxXmlAttribute* GetNext(); + wxXmlAttribute* GetNext() const; /** Returns the value of this attribute. */ - wxString GetValue(); + wxString GetValue() const; /** Sets the name of this attribute. @@ -411,19 +411,19 @@ public: (same as passed to Load() or constructor, defaults to UTF-8). NB: this is meaningless in Unicode build where data are stored as @c wchar_t*. */ - wxString GetEncoding(); + wxString GetEncoding() const; /** Returns encoding of document (may be empty). Note: this is the encoding original file was saved in, @b not the encoding of in-memory representation! */ - wxString GetFileEncoding(); + wxString GetFileEncoding() const; /** Returns the root node of the document. */ - wxXmlNode* GetRoot(); + wxXmlNode* GetRoot() const; /** Returns the version of document. @@ -431,12 +431,12 @@ public: If the version attribute was not explicitely given in the header, this function returns an empty string. */ - wxString GetVersion(); + wxString GetVersion() const; /** Returns @true if the document has been loaded successfully. */ - bool IsOk(); + bool IsOk() const; //@{ /** @@ -452,8 +452,8 @@ public: Saves XML tree in the given output stream. See other overload for a description of @c indentstep. */ - bool Save(const wxString& filename, int indentstep = 1); - bool Save(wxOutputStream& stream, int indentstep = 1); + bool Save(const wxString& filename, int indentstep = 1) const; + const bool Save(wxOutputStream& stream, int indentstep = 1) const; //@} /** diff --git a/interface/xrc/xmlres.h b/interface/xrc/xmlres.h index d6809f76b2..ed3460945e 100644 --- a/interface/xrc/xmlres.h +++ b/interface/xrc/xmlres.h @@ -83,7 +83,7 @@ public: is less than the argument, +1 if greater, and 0 if they equal. */ int CompareVersion(int major, int minor, int release, - int revision); + int revision) const; /** Gets the global resources object or creates one if none exists. @@ -105,7 +105,7 @@ public: /** Returns version information (a.b.c.d = d+ 256*c + 256@c 2*b + 256@c 3*a). */ - long GetVersion(); + long GetVersion() const; /** Returns a numeric ID that is equivalent to the string ID used in an XML diff --git a/interface/zipstrm.h b/interface/zipstrm.h index e2ea0877a4..77de1f552f 100644 --- a/interface/zipstrm.h +++ b/interface/zipstrm.h @@ -67,14 +67,14 @@ public: /** Make a copy of this entry. */ - wxZipEntry* Clone(); + wxZipEntry* Clone() const; //@{ /** A short comment for this entry. */ wxString GetComment(); - void SetComment(const wxString& comment); + const void SetComment(const wxString& comment); //@} //@{ @@ -95,7 +95,7 @@ public: @ref mode() Get/SetMode */ wxUint32 GetExternalAttributes(); - void SetExternalAttributes(wxUint32 attr); + const void SetExternalAttributes(wxUint32 attr); //@} //@{ @@ -105,8 +105,8 @@ public: data. See Pkware's document 'appnote.txt' for information on its format. */ const char* GetExtra(); - size_t GetExtraLen(); - void SetExtra(const char* extra, size_t len); + const size_t GetExtraLen(); + const void SetExtra(const char* extra, size_t len); //@} //@{ @@ -116,8 +116,8 @@ public: data. See Pkware's document 'appnote.txt' for information on its format. */ const char* GetLocalExtra(); - size_t GetLocalExtraLen(); - void SetLocalExtra(const char* extra, size_t len); + const size_t GetLocalExtraLen(); + const void SetLocalExtra(const char* extra, size_t len); //@} //@{ @@ -129,7 +129,7 @@ public: choose the method when writing the entry. */ int GetMethod(); - void SetMethod(int method); + const void SetMethod(int method); //@} //@{ @@ -145,7 +145,7 @@ public: permissions when creating zips, call SetSystemMadeBy(wxZIP_SYSTEM_UNIX). */ int GetMode(); - void SetMode(int mode); + const void SetMode(int mode); //@} //@{ @@ -155,23 +155,23 @@ public: able to store unix permissions using @ref mode() SetMode. */ int GetSystemMadeBy(); - void SetSystemMadeBy(int system); + const void SetSystemMadeBy(int system); //@} /** The compressed size of this entry in bytes. */ - off_t GetCompressedSize(); + off_t GetCompressedSize() const; /** CRC32 for this entry's data. */ - wxUint32 GetCrc(); + wxUint32 GetCrc() const; /** Returns a combination of the bits flags in the enumeration @c wxZipFlags. */ - int GetFlags(); + int GetFlags() const; //@{ /** @@ -183,23 +183,23 @@ public: @see @ref overview_wxarcbyname "Looking up an archive entry by name" */ wxString GetInternalName(); - wxString GetInternalName(const wxString& name, - wxPathFormat format = wxPATH_NATIVE, - bool* pIsDir = NULL); + const wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE, + bool* pIsDir = NULL); //@} /** Returns @true if @ref systemmadeby() GetSystemMadeBy is a flavour of unix. */ - bool IsMadeByUnix(); + bool IsMadeByUnix() const; //@{ /** Indicates that this entry's data is text in an 8-bit encoding. */ bool IsText(); - void SetIsText(bool isText = true); + const void SetIsText(bool isText = true); //@} //@{ @@ -409,7 +409,7 @@ public: which currently is equivalent to 6. */ int GetLevel(); - void SetLevel(int level); + const void SetLevel(int level); //@} /** -- 2.45.2