Returns the bullet text, which could be a symbol, or (for example) cached
outline text.
*/
- const wxString GetBulletText() const;
+ const wxString& GetBulletText() const;
/**
Returns the name of the character style.
*/
- const wxString GetCharacterStyleName() const;
+ const wxString& GetCharacterStyleName() const;
/**
Returns flags indicating which attributes are applicable.
/**
Returns the font face name.
*/
- const wxString GetFontFaceName() const;
+ const wxString& GetFontFaceName() const;
/**
Returns the font size in points.
/**
Returns the name of the list style.
*/
- const wxString GetListStyleName() const;
+ const wxString& GetListStyleName() const;
/**
Returns the outline level.
*/
- bool GetOutlineLevel() const;
+ int GetOutlineLevel() const;
/**
Returns the space in tenths of a millimeter after the paragraph.
/**
Returns the name of the paragraph style.
*/
- const wxString GetParagraphStyleName() const;
+ const wxString& GetParagraphStyleName() const;
/**
Returns the right indent in tenths of a millimeter.
Each stop is measured from the left margin and therefore each value must
be larger than the last.
*/
- const wxArrayInt GetTabs() const;
+ const wxArrayInt& GetTabs() const;
/**
Returns the text foreground colour.
*/
- const wxColour GetTextColour() const;
+ const wxColour& GetTextColour() const;
/**
Returns the text effect bits of interest.
hand cursor over it, and wxRichTextCtrl generates a wxTextUrlEvent
when the content is clicked.
*/
- const wxString GetURL() const;
+ const wxString& GetURL() const;
/**
Returns @true if the attribute object specifies alignment.
Sets the bullet text, which could be a symbol, or (for example) cached
outline text.
*/
- void SetBulletText(const wxString text);
+ void SetBulletText(const wxString& text);
/**
Sets the character style name.
Sets the attributes for the given font.
Note that wxTextAttr does not store an actual wxFont object.
*/
- void SetFont(const wxFont& font);
+ void SetFont(const wxFont& font, int flags = wxTEXT_ATTR_FONT);
/**
Sets the font encoding.
@library{wxcore}
@category{ctrl}
- <!-- @appearance{textctrl.png} -->
+ @appearance{textctrl.png}
@see wxTextCtrl::Create, wxValidator
*/
@see WriteText()
*/
- void AppendText(const wxString& text);
+ virtual void AppendText(const wxString& text);
/**
Call this function to enable auto-completion of the text typed in a
@see AutoCompleteFileNames()
*/
- bool AutoComplete(const wxArrayString& choices);
+ virtual bool AutoComplete(const wxArrayString& choices);
/**
Call this function to enable auto-completion of the text typed in a
@see AutoComplete()
*/
- bool AutoCompleteFileNames();
+ virtual bool AutoCompleteFileNames();
/**
Returns @true if the selection can be copied to the clipboard.
*/
- virtual bool CanCopy();
+ virtual bool CanCopy() const;
/**
Returns @true if the selection can be cut to the clipboard.
*/
- virtual bool CanCut();
+ virtual bool CanCut() const;
/**
Returns @true if the contents of the clipboard can be pasted into the
On some platforms (Motif, GTK) this is an approximation and returns
@true if the control is editable, @false otherwise.
*/
- virtual bool CanPaste();
+ virtual bool CanPaste() const;
/**
Returns @true if there is a redo facility available and the last
operation can be redone.
*/
- virtual bool CanRedo();
+ virtual bool CanRedo() const;
/**
Returns @true if there is an undo facility available and the last
operation can be undone.
*/
- virtual bool CanUndo();
+ virtual bool CanUndo() const;
/**
- Sets the text value and marks the control as not-modified (which means
- that IsModified() would return @false immediately after the call to SetValue()).
+ Sets the new text control value.
+
+ It also marks the control as not-modified which means that IsModified()
+ would return @false immediately after the call to SetValue().
+
+ The insertion point is set to the start of the control (i.e. position
+ 0) by this function.
This functions does not generate the @c wxEVT_COMMAND_TEXT_UPDATED
event but otherwise is identical to SetValue().
+
See @ref overview_eventhandling_prog for more information.
@since 2.7.1
non-default constructor.
*/
bool Create(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
+ const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
+ const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
@see SetDefaultStyle()
*/
- const wxTextAttr GetDefaultStyle() const;
+ virtual const wxTextAttr& GetDefaultStyle() const;
/**
Returns the insertion point, or cursor, position.
If there is no selection, the returned string is empty.
*/
- virtual wxString GetStringSelection();
+ virtual wxString GetStringSelection() const;
/**
Returns the style at this position in the text control.
@return
@true if the operation was successful, @false otherwise.
*/
- bool SaveFile(const wxString& filename,
+ bool SaveFile(const wxString& filename = wxEmptyString,
int fileType = wxTEXT_TYPE_ANY);
/**
@see IsEditable()
*/
- virtual void SetEditable(const bool editable);
+ virtual void SetEditable(bool editable);
/**
Sets the insertion point at the given position.
@param pos
- Position to set.
+ Position to set, in the range from 0 to GetLastPosition() inclusive.
*/
virtual void SetInsertionPoint(long pos);
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
/**
- Sets the text value and marks the control as not-modified (which means
- that IsModified() would return @false immediately after the call to SetValue()).
+ Sets the new text control value.
+
+ It also marks the control as not-modified which means that IsModified()
+ would return @false immediately after the call to SetValue().
+
+ The insertion point is set to the start of the control (i.e. position
+ 0) by this function.
- Note that this function generates a @c wxEVT_COMMAND_TEXT_UPDATED
- event, to avoid this you can use ChangeValue() instead.
+ Note that, unlike most other functions changing the controls values,
+ this function generates a @c wxEVT_COMMAND_TEXT_UPDATED event. To avoid
+ this you can use ChangeValue() instead.
@param value
The new value to set. It may contain newline characters if the text
@param ostr
The C++ stream to redirect, cout is used if it is @NULL
*/
- wxStreamToTextRedirector(wxTextCtrl text, ostream* ostr = NULL);
+ wxStreamToTextRedirector(wxTextCtrl *text, ostream* ostr);
/**
When a wxStreamToTextRedirector object is destroyed, the redirection is ended