diff options
author | crupest <crupest@outlook.com> | 2018-10-02 01:09:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-10-02 01:09:35 +0800 |
commit | 040a6c18f18100b825a56443a73aa1de64e4518c (patch) | |
tree | a271bddb244fa2041f14f8d46d249457cee09e5f /src/ui/controls/text_box.h | |
parent | a3b78397f71c35e51681104b572de06a1780e4ee (diff) | |
download | cru-040a6c18f18100b825a56443a73aa1de64e4518c.tar.gz cru-040a6c18f18100b825a56443a73aa1de64e4518c.tar.bz2 cru-040a6c18f18100b825a56443a73aa1de64e4518c.zip |
Make text box use border delegate. Fix layout bug in margin container.
Diffstat (limited to 'src/ui/controls/text_box.h')
-rw-r--r-- | src/ui/controls/text_box.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/controls/text_box.h b/src/ui/controls/text_box.h index 07c4abe4..a6e4566d 100644 --- a/src/ui/controls/text_box.h +++ b/src/ui/controls/text_box.h @@ -2,6 +2,7 @@ #include "text_control.h" #include "timer.h" +#include "border_delegate.h" namespace cru::ui::controls { @@ -36,6 +37,8 @@ namespace cru::ui::controls void OnKeyDownCore(events::KeyEventArgs& args) override final; void OnCharCore(events::CharEventArgs& args) override final; + Size OnMeasure(const Size& available_size) override; + void RequestChangeCaretPosition(unsigned position) override; private: @@ -44,5 +47,7 @@ namespace cru::ui::controls ActionPtr caret_action_; Microsoft::WRL::ComPtr<ID2D1Brush> caret_brush_; bool is_caret_show_ = false; + + std::unique_ptr<BorderDelegate> border_delegate_; }; } |