aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/text_control.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-20 18:14:07 +0800
committercrupest <crupest@outlook.com>2019-03-20 18:14:07 +0800
commit7f1acd3ab4bddf6c61551ebc867667fbdd3ad7b8 (patch)
tree933f3e417b0d40503cfa9cc55abc80cabc0df1d4 /src/ui/controls/text_control.hpp
parent62080f78c900aa41e456aa37a1825310121de881 (diff)
downloadcru-7f1acd3ab4bddf6c61551ebc867667fbdd3ad7b8.tar.gz
cru-7f1acd3ab4bddf6c61551ebc867667fbdd3ad7b8.tar.bz2
cru-7f1acd3ab4bddf6c61551ebc867667fbdd3ad7b8.zip
...
Diffstat (limited to 'src/ui/controls/text_control.hpp')
-rw-r--r--src/ui/controls/text_control.hpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ui/controls/text_control.hpp b/src/ui/controls/text_control.hpp
index 58d48c13..83d4753f 100644
--- a/src/ui/controls/text_control.hpp
+++ b/src/ui/controls/text_control.hpp
@@ -62,7 +62,6 @@ namespace cru::ui::controls
protected:
void SetSelectable(bool is_selectable);
- Size OnMeasureContent(const Size& available_size, const AdditionalMeasureInfo&) override final;
virtual void RequestChangeCaretPosition(unsigned position);
@@ -82,14 +81,12 @@ namespace cru::ui::controls
Microsoft::WRL::ComPtr<ID2D1Brush> brush_;
Microsoft::WRL::ComPtr<ID2D1Brush> selection_brush_;
Microsoft::WRL::ComPtr<IDWriteTextFormat> text_format_;
- protected:
Microsoft::WRL::ComPtr<IDWriteTextLayout> text_layout_;
- private:
bool is_selectable_ = false;
+ std::optional<TextRange> selected_range_ = std::nullopt;
bool is_selecting_ = false;
unsigned mouse_down_position_ = 0;
- std::optional<TextRange> selected_range_ = std::nullopt;
};
}