Widget.text() is const

This commit is contained in:
Denis Feklushkin 2017-11-07 17:09:05 +07:00
parent 25877effa1
commit bd4e4a1ff6
8 changed files with 9 additions and 9 deletions

View File

@ -614,7 +614,7 @@ class EditableContent {
@property EditStateMark[] editMarks() { return _editMarks; } @property EditStateMark[] editMarks() { return _editMarks; }
/// returns all lines concatenated delimited by '\n' /// returns all lines concatenated delimited by '\n'
@property dstring text() { @property dstring text() const {
if (_lines.length == 0) if (_lines.length == 0)
return ""; return "";
if (_lines.length == 1) if (_lines.length == 1)

View File

@ -1210,7 +1210,7 @@ class FileNameEditLine : HorizontalLayout {
@property void caption(dstring s) { _caption = s; } @property void caption(dstring s) { _caption = s; }
/// returns widget content text (override to support this) /// returns widget content text (override to support this)
override @property dstring text() { return _edFileName.text; } override @property dstring text() const { return _edFileName.text; }
/// sets widget content text (override to support this) /// sets widget content text (override to support this)
override @property Widget text(dstring s) { _edFileName.text = s; return this; } override @property Widget text(dstring s) { _edFileName.text = s; return this; }
/// sets widget content text (override to support this) /// sets widget content text (override to support this)

View File

@ -284,7 +284,7 @@ class ComboBox : ComboBoxBase {
return cast(StringListAdapter)_adapter; return cast(StringListAdapter)_adapter;
} }
@property override dstring text() { @property override dstring text() const {
return _body.text; return _body.text;
} }
@ -403,7 +403,7 @@ class IconTextComboBox : ComboBoxBase {
return cast(StringListAdapter)_adapter; return cast(StringListAdapter)_adapter;
} }
@property override dstring text() { @property override dstring text() const {
return _body.text; return _body.text;
} }

View File

@ -355,7 +355,7 @@ class ImageTextButton : HorizontalLayout {
protected TextWidget _label; protected TextWidget _label;
/// Get label text /// Get label text
override @property dstring text() { return _label.text; } override @property dstring text() const { return _label.text; }
/// Set label plain unicode string /// Set label plain unicode string
override @property Widget text(dstring s) { _label.text = s; requestLayout(); return this; } override @property Widget text(dstring s) { _label.text = s; requestLayout(); return this; }
/// Set label string resource Id /// Set label string resource Id

View File

@ -995,7 +995,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
protected bool _lastReportedModifiedState; protected bool _lastReportedModifiedState;
/// get widget text /// get widget text
override @property dstring text() { return _content.text; } override @property dstring text() const { return _content.text; }
/// set text /// set text
override @property Widget text(dstring s) { override @property Widget text(dstring s) {

View File

@ -53,7 +53,7 @@ class GroupBox : LinearLayout {
} }
/// get widget text /// get widget text
override @property dstring text() { return _caption.text; } override @property dstring text() const { return _caption.text; }
/// set text to show /// set text to show
override @property Widget text(dstring s) { override @property Widget text(dstring s) {
_caption.text = s; _caption.text = s;

View File

@ -38,7 +38,7 @@ class StatusLineTextPanel : StatusLinePanelBase {
addChild(_text); addChild(_text);
} }
/// returns widget content text (override to support this) /// returns widget content text (override to support this)
override @property dstring text() { return _text.text; } override @property dstring text() const { return _text.text; }
/// sets widget content text (override to support this) /// sets widget content text (override to support this)
override @property Widget text(dstring s) { _text.text = s; return this; } override @property Widget text(dstring s) { _text.text = s; return this; }
/// sets widget content text (override to support this) /// sets widget content text (override to support this)

View File

@ -570,7 +570,7 @@ public:
@property FontRef font() const { return stateStyle.font; } @property FontRef font() const { return stateStyle.font; }
/// returns widget content text (override to support this) /// returns widget content text (override to support this)
@property dstring text() { return ""; } @property dstring text() const { return ""; }
/// sets widget content text (override to support this) /// sets widget content text (override to support this)
@property Widget text(dstring s) { return this; } @property Widget text(dstring s) { return this; }
/// sets widget content text (override to support this) /// sets widget content text (override to support this)