From 857adcb7ee2d45b2e29d4250fa4246bb8861a8f9 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 20 Apr 2020 01:17:28 +0800 Subject: ... --- include/cru/win/graph/direct/text_layout.hpp | 4 ++-- include/cru/win/native/input_method.hpp | 2 ++ include/cru/win/native/window.hpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'include/cru/win') diff --git a/include/cru/win/graph/direct/text_layout.hpp b/include/cru/win/graph/direct/text_layout.hpp index 5f7be9f3..462a5fd3 100644 --- a/include/cru/win/graph/direct/text_layout.hpp +++ b/include/cru/win/graph/direct/text_layout.hpp @@ -45,8 +45,8 @@ class DWriteTextLayout : public DirectGraphResource, std::string text_; std::wstring w_text_; std::shared_ptr font_; - float max_width_ = 0.0f; - float max_height_ = 0.0f; + float max_width_ = 10000.0f; + float max_height_ = 10000.0f; Microsoft::WRL::ComPtr text_layout_; }; } // namespace cru::platform::graph::win::direct diff --git a/include/cru/win/native/input_method.hpp b/include/cru/win/native/input_method.hpp index 566eada2..8e17abd5 100644 --- a/include/cru/win/native/input_method.hpp +++ b/include/cru/win/native/input_method.hpp @@ -64,6 +64,8 @@ class WinInputMethodContext : public WinNativeResource, private: void OnWindowNativeMessage(WindowNativeMessageEventArgs& args); + std::string GetResultString(); + std::optional TryGetHIMC(); private: diff --git a/include/cru/win/native/window.hpp b/include/cru/win/native/window.hpp index 45f1f16a..83497fa6 100644 --- a/include/cru/win/native/window.hpp +++ b/include/cru/win/native/window.hpp @@ -72,7 +72,7 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { IEvent* KeyUpEvent() override { return &key_up_event_; } - IEvent* CharEvent() override { return &char_event_; }; + IEvent* CharEvent() override { return &char_event_; }; IEvent* NativeMessageEvent() { return &native_message_event_; @@ -146,7 +146,7 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { Event mouse_up_event_; Event key_down_event_; Event key_up_event_; - Event char_event_; + Event char_event_; Event native_message_event_; -- cgit v1.2.3