Sdk/Canvas: Implement tab/shift-tab to switch to next/previous widget

This commit is contained in:
Jérôme Leclercq
2017-11-23 14:48:59 +01:00
parent 4116984f9f
commit 377dd992b9
6 changed files with 81 additions and 17 deletions

View File

@@ -88,9 +88,10 @@ namespace Ndk
virtual void Layout();
void InvalidateNode() override;
virtual bool IsFocusable() const;
virtual void OnFocusLost();
virtual void OnFocusReceived();
virtual void OnKeyPressed(const Nz::WindowEvent::KeyEvent& key);
virtual bool OnKeyPressed(const Nz::WindowEvent::KeyEvent& key);
virtual void OnKeyReleased(const Nz::WindowEvent::KeyEvent& key);
virtual void OnMouseEnter();
virtual void OnMouseMoved(int x, int y, int deltaX, int deltaY);

View File

@@ -76,7 +76,7 @@ namespace Ndk
bool IsFocusable() const override;
void OnFocusLost() override;
void OnFocusReceived() override;
void OnKeyPressed(const Nz::WindowEvent::KeyEvent& key) override;
bool OnKeyPressed(const Nz::WindowEvent::KeyEvent& key) override;
void OnKeyReleased(const Nz::WindowEvent::KeyEvent& key) override;
void OnMouseButtonPress(int /*x*/, int /*y*/, Nz::Mouse::Button button) override;
void OnTextEntered(char32_t character, bool repeated) override;