2 #include "common/common.hpp"
3 #include "util/uuid.hpp"
4 #include "util/layer_range.hpp"
19 enum class Flag { SELECTED = 1, PRELIGHT = 2, ALWAYS = 4, PREVIEW = 8 };
20 bool get_flag(Flag f)
const;
21 void set_flag(Flag f,
bool v);
25 bool inside(
const Coordf &c,
float expand = 0)
const;
28 bool is_point()
const;
31 std::array<Coordf, 4> get_corners()
const;
32 } __attribute__((packed));
41 : uuid(uu), type(ty), vertex(v), layer(la)
46 if (type < other.type) {
49 if (type > other.type) {
52 if (uuid < other.uuid) {
55 else if (uuid > other.uuid) {
58 return vertex < other.vertex;
62 return (uuid == other.uuid) && (vertex == other.vertex) && (type == other.type);
76 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
77 void append(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
unsigned int vertex = 0,
LayerRange layer = 10000,
79 void append_angled(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
const Coordf &box_center,
80 const Coordf &box_dim,
float angle,
unsigned int vertex = 0,
LayerRange layer = 10000,
82 void append_line(
const UUID &uu, ObjectType ot,
const Coordf &p0,
const Coordf &p1,
float width,
83 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
84 void append_arc(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
float r0,
float r1,
float a0,
float a1,
85 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
86 void update_preview(
const std::set<SelectableRef> &sel);
91 const auto &get_items()
const
96 const auto &get_items_ref()
const
103 std::vector<Selectable> items;
104 std::vector<SelectableRef> items_ref;
105 std::map<SelectableRef, unsigned int> items_map;
106 std::vector<int> items_group;
109 int group_current = -1;
Definition: canvas_gl.hpp:18
Definition: canvas.hpp:24
Definition: drag_selection.hpp:8
Definition: layer_range.hpp:7
Definition: selectables.hpp:34
Definition: selectables.hpp:9
Definition: selectables_renderer.hpp:5
Definition: selectables.hpp:66
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
zip_uint8_t uint8_t
zip_uint8_t typedef.
Definition: zip.hpp:78