Add widget state support.

This commit is contained in:
jmsgrogan 2023-01-18 13:29:31 +00:00
parent 19091a0e80
commit 8536908eab
19 changed files with 385 additions and 46 deletions

View file

@ -11,7 +11,10 @@ public:
enum class Action
{
Pressed,
Released
Released,
Move,
Enter,
Leave
};
public:

View file

@ -16,7 +16,7 @@ std::unique_ptr<UiEvent> UiEvent::Create()
return std::make_unique<UiEvent>();
}
UiEvent::Type UiEvent::GetType() const
UiEvent::Type UiEvent::getType() const
{
return mType;
}

View file

@ -5,26 +5,38 @@
class UiEvent
{
public:
enum class Type{
enum class Type {
Unknown,
Paint,
Mouse,
Keyboard,
Resize
Resize,
Focus
};
protected:
UiEvent::Type mType;
public:
UiEvent();
virtual ~UiEvent();
static std::unique_ptr<UiEvent> Create();
Type GetType() const;
Type getType() const;
protected:
UiEvent::Type mType;
};
using UiEventUPtr = std::unique_ptr<UiEvent>;
class FocusEvent : public UiEvent
{
public:
FocusEvent()
: UiEvent()
{
};
virtual ~FocusEvent() = default;
};