Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CEventCanvasButton.hpp
Go to the documentation of this file.
1#ifndef LIBS_GUI_CEVENTCANVASBUTTON_HPP_
2#define LIBS_GUI_CEVENTCANVASBUTTON_HPP_
3
5
7{
8public:
10 CEventCanvasButton(double xLocal, double yLocal, double xGlobal, double yGlobal, bool flagPressRelease,
11 bool isLeftClick, bool isRightClick, bool isDoubleClick, bool isShift, bool isControl);
13 CEventCanvasButton(const CEventCanvasButton &other) = delete;
17
18 [[nodiscard]] const AbstractCanvasItem::TPosition2d &getLocalPosition2d() const;
19 [[nodiscard]] const AbstractCanvasItem::TPosition2d &getGlobalPosition2d() const;
20
21 [[nodiscard]] bool isButtonPress() const;
22 [[nodiscard]] bool isButtonRelease() const;
23 [[nodiscard]] bool isLeftClick() const;
24 [[nodiscard]] bool isRightClick() const;
25 [[nodiscard]] bool isDoubleClick() const;
26 [[nodiscard]] bool isShiftKey() const;
27 [[nodiscard]] bool isControlKey() const;
28
29private:
30 AbstractCanvasItem::TPosition2d m_localPosition2d; // position relative to own component
31 AbstractCanvasItem::TPosition2d m_globalPosition2d; // position relative to parent component
32 bool m_flagPressRelease; // true for 'press'; false for 'release'
35 bool m_isDoubleClick; // true if double click with left button
38};
39
40#endif /* LIBS_GUI_CEVENTCANVASBUTTON_HPP_ */
std::pair< double, double > TPosition2d
Definition AbstractCanvasItem.hpp:48
Definition CEventCanvasButton.hpp:7
bool m_isControl
Definition CEventCanvasButton.hpp:37
const AbstractCanvasItem::TPosition2d & getGlobalPosition2d() const
Definition CEventCanvasButton.cpp:34
CEventCanvasButton & operator=(const CEventCanvasButton &other)=delete
~CEventCanvasButton()=default
bool m_isDoubleClick
Definition CEventCanvasButton.hpp:35
bool m_flagPressRelease
Definition CEventCanvasButton.hpp:32
bool isButtonRelease() const
Definition CEventCanvasButton.cpp:44
AbstractCanvasItem::TPosition2d m_localPosition2d
Definition CEventCanvasButton.hpp:30
bool isControlKey() const
Definition CEventCanvasButton.cpp:69
bool m_isRightClick
Definition CEventCanvasButton.hpp:34
CEventCanvasButton(const CEventCanvasButton &other)=delete
bool m_isShift
Definition CEventCanvasButton.hpp:36
bool isShiftKey() const
Definition CEventCanvasButton.cpp:64
bool m_isLeftClick
Definition CEventCanvasButton.hpp:33
CEventCanvasButton()
Definition CEventCanvasButton.cpp:3
bool isButtonPress() const
Definition CEventCanvasButton.cpp:39
AbstractCanvasItem::TPosition2d m_globalPosition2d
Definition CEventCanvasButton.hpp:31
CEventCanvasButton & operator=(CEventCanvasButton &&other)=delete
bool isLeftClick() const
Definition CEventCanvasButton.cpp:49
bool isDoubleClick() const
Definition CEventCanvasButton.cpp:59
CEventCanvasButton(CEventCanvasButton &&other)=delete
bool isRightClick() const
Definition CEventCanvasButton.cpp:54
const AbstractCanvasItem::TPosition2d & getLocalPosition2d() const
Definition CEventCanvasButton.cpp:29