Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CGooCanvas.hpp
Go to the documentation of this file.
1#ifndef LIBS_GUI_CGOOCANVAS_HPP_
2#define LIBS_GUI_CGOOCANVAS_HPP_
3
7
8#include <memory>
9#include <vector>
10
12class CEventCanvasKey;
13class CMenuContext;
16class IGraphics;
17
19{
20public:
21 CGooCanvas(uint64_t sizeXMin, uint64_t sizeYMin);
22 CGooCanvas() = delete;
23 ~CGooCanvas() override;
24 CGooCanvas(const CGooCanvas &other) = delete;
25 CGooCanvas(CGooCanvas &&other) = delete;
26 CGooCanvas &operator=(const CGooCanvas &other) = delete;
27 CGooCanvas &operator=(CGooCanvas &&other) = delete;
28
29 void destroyWidget() override;
30
31 void addDraw(std::unique_ptr<AbstractRcpDrawGooCanvas> rcpDraw);
33 void redraw();
34 void runDraw(IGraphics *graphics);
35
36 void showContextMenu(CMenuContext *menuContext);
37
38 void addListenerButtonPress(std::unique_ptr<IListenerButtonPress> listenerButtonPress);
39 void addListenerKeyPress(std::unique_ptr<IListenerKeyPress> listenerKeyPress);
40 void runButtonPress(CEventCanvasButton *evtCanvasButton);
41 void runKeyPress(CEventCanvasKey *evtCanvasKey);
42
44
45private:
46 IWidget *createWidget(CDialog *dialogFatherRef) override;
47
48 std::vector<std::unique_ptr<IListenerButtonPress>> m_listenersButtonPress;
49 std::vector<std::unique_ptr<IListenerKeyPress>> m_listenersKeyPress;
50
53
54 uint64_t m_sizeXMin;
55 uint64_t m_sizeYMin;
56
58};
59
60#endif /* LIBS_GUI_CGOOCANVAS_HPP_ */
uint32_t TId
Definition AbstractCanvasItem.hpp:47
Definition AbstractComponentGUI.hpp:30
Definition AbstractRcpDrawGooCanvas.hpp:15
Definition CDialog.hpp:21
Definition CEventCanvasButton.hpp:7
Definition CEventCanvasKey.hpp:7
Definition CGeoGooCanvas.hpp:19
Definition CGooCanvas.hpp:19
void showContextMenu(CMenuContext *menuContext)
Definition CGooCanvas.cpp:58
void eraseOnNextRedraw(AbstractCanvasItem::TId id)
Definition CGooCanvas.cpp:35
void runKeyPress(CEventCanvasKey *evtCanvasKey)
Definition CGooCanvas.cpp:88
void runButtonPress(CEventCanvasButton *evtCanvasButton)
Definition CGooCanvas.cpp:80
void addListenerKeyPress(std::unique_ptr< IListenerKeyPress > listenerKeyPress)
Definition CGooCanvas.cpp:75
CGooCanvas & operator=(const CGooCanvas &other)=delete
std::vector< std::unique_ptr< IListenerKeyPress > > m_listenersKeyPress
Definition CGooCanvas.hpp:49
CGeoGooCanvas m_geoCanvas
Definition CGooCanvas.hpp:51
CGooCanvas()=delete
void addDraw(std::unique_ptr< AbstractRcpDrawGooCanvas > rcpDraw)
Definition CGooCanvas.cpp:30
void runDraw(IGraphics *graphics)
Definition CGooCanvas.cpp:50
uint64_t m_sizeXMin
Definition CGooCanvas.hpp:54
void destroyWidget() override
Definition CGooCanvas.cpp:23
CGooCanvas & operator=(CGooCanvas &&other)=delete
iv::types::Size getCanvasSize() const
Definition CGooCanvas.cpp:96
~CGooCanvas() override
IWidget * createWidget(CDialog *dialogFatherRef) override
Definition CGooCanvas.cpp:106
uint32_t m_colorBackground
Definition CGooCanvas.hpp:52
CGooCanvas(const CGooCanvas &other)=delete
IWidget * m_widgetRef
Definition CGooCanvas.hpp:57
std::vector< std::unique_ptr< IListenerButtonPress > > m_listenersButtonPress
Definition CGooCanvas.hpp:48
void addListenerButtonPress(std::unique_ptr< IListenerButtonPress > listenerButtonPress)
Definition CGooCanvas.cpp:70
CGooCanvas(CGooCanvas &&other)=delete
void redraw()
Definition CGooCanvas.cpp:40
uint64_t m_sizeYMin
Definition CGooCanvas.hpp:55
Definition CMenuContext.hpp:10
Definition IGraphics.hpp:20
Definition IListenerButtonPress.hpp:5
Definition IListenerKeyPress.hpp:5
Definition IWidget.hpp:5
Definition types.hpp:151