add const qualifiers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-09 16:24:26 +00:00
parent 1fee6e2577
commit 328f5751e8
193 changed files with 2525 additions and 2513 deletions

View File

@@ -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;
};

View File

@@ -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;
};

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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;
};

View File

@@ -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.

View File

@@ -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;
};

View File

@@ -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.