Initial commit.
This commit is contained in:
commit
59c6161fdb
134 changed files with 4751 additions and 0 deletions
42
src/ui_elements/ui_events/MouseEvent.h
Normal file
42
src/ui_elements/ui_events/MouseEvent.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "DiscretePoint.h"
|
||||
#include "UiEvent.h"
|
||||
|
||||
class MouseEvent : public UiEvent
|
||||
{
|
||||
public:
|
||||
enum class Action
|
||||
{
|
||||
Pressed,
|
||||
Released
|
||||
};
|
||||
|
||||
private:
|
||||
Pixel mClientLocation;
|
||||
Pixel mScreenLocation;
|
||||
Action mAction;
|
||||
|
||||
public:
|
||||
|
||||
MouseEvent();
|
||||
|
||||
~MouseEvent();
|
||||
|
||||
static std::shared_ptr<MouseEvent> Create();
|
||||
|
||||
void SetClientLocation(Pixel location);
|
||||
|
||||
void SetScreenLocation(Pixel location);
|
||||
|
||||
void SetAction(Action action);
|
||||
|
||||
Pixel GetClientLocation();
|
||||
|
||||
Pixel GetScreenLocation();
|
||||
|
||||
Action GetAction();
|
||||
};
|
||||
using MouseEventPtr = std::shared_ptr<MouseEvent>;
|
Loading…
Add table
Add a link
Reference in a new issue