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
75 // will add more selection types later on if i feel like it (eg
76 // CircleSelection, LassoSelection)
77} // 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
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