FuncDoodle
Loading...
Searching...
No Matches
Selection.h
Go to the documentation of this file.
1
18
19#pragma once
20
21#include "UI/Gui.h"
22#include <vector>
23
24namespace FuncDoodle {
34 class Selection {
35 public:
36 virtual ~Selection();
41 virtual std::vector<ImVec2i> All();
42 };
43
51 struct SquareSelection : public Selection {
56 bool Active;
61 ImVec2i Min;
66 ImVec2i Max;
67
72 std::vector<ImVec2i> All() override;
73 };
74
82 struct ArbitrarySelection : public Selection {
87 bool Active;
88
93 std::vector<ImVec2i> All_;
94
99 std::vector<ImVec2i> All() override;
100 };
101
102 // will add more selection types later on if i feel like it (eg
103 // CircleSelection, LassoSelection)
104} // namespace FuncDoodle
ImGui/OpenGL/GLFW integration utilities and file dialog wrapper.
Base class for selection shapes.
Definition Selection.h:34
virtual std::vector< ImVec2i > All()
Returns every pixel coordinate contained in the selection.
Definition Selection.cc:6
The FuncDoodle C++ namespace.
Definition Common.h:12
Arbitrary selection defined by a list of selected pixels.
Definition Selection.h:82
std::vector< ImVec2i > All_
Definition Selection.h:93
std::vector< ImVec2i > All() override
Returns every selected coordinate.
Definition Selection.cc:28
bool Active
Whether the arbitrary selection is currently active.
Definition Selection.h:87
Rectangular selection defined by two corner points.
Definition Selection.h:51
bool Active
Whether the rectangular selection is currently active.
Definition Selection.h:56
std::vector< ImVec2i > All() override
Returns every coordinate inside the rectangular bounds.
Definition Selection.cc:10
ImVec2i Max
Inclusive maximum corner of the selection.
Definition Selection.h:66
ImVec2i Min
Inclusive minimum corner of the selection.
Definition Selection.h:61