Add widget state support.
This commit is contained in:
parent
19091a0e80
commit
8536908eab
19 changed files with 385 additions and 46 deletions
|
@ -11,7 +11,10 @@ public:
|
|||
enum class Action
|
||||
{
|
||||
Pressed,
|
||||
Released
|
||||
Released,
|
||||
Move,
|
||||
Enter,
|
||||
Leave
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue