From be84ddd03d3b59c0c27aa538d5ef5129f94d511c Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 23 Sep 2018 23:08:54 +0800 Subject: Add keyboard events to control. --- CruUI/ui/control.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'CruUI/ui/control.cpp') diff --git a/CruUI/ui/control.cpp b/CruUI/ui/control.cpp index 25f7c028..eaf206ac 100644 --- a/CruUI/ui/control.cpp +++ b/CruUI/ui/control.cpp @@ -472,6 +472,51 @@ namespace cru { } + void Control::OnKeyDown(KeyEventArgs& args) + { + } + + void Control::OnKeyUp(KeyEventArgs& args) + { + } + + void Control::OnChar(events::CharEvent& args) + { + } + + void Control::OnKeyDownCore(KeyEventArgs& args) + { + } + + void Control::OnKeyUpCore(KeyEventArgs& args) + { + } + + void Control::OnCharCore(events::CharEvent& args) + { + } + + void Control::RaiseKeyDownEvent(KeyEventArgs& args) + { + OnKeyDownCore(args); + OnKeyDown(args); + key_down_event.Raise(args); + } + + void Control::RaiseKeyUpEvent(KeyEventArgs& args) + { + OnKeyUpCore(args); + OnKeyUp(args); + key_up_event.Raise(args); + } + + void Control::RaiseCharEvent(CharEvent& args) + { + OnCharCore(args); + OnChar(args); + char_event.Raise(args); + } + void Control::OnGetFocus(FocusChangeEventArgs& args) { -- cgit v1.2.3