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;
30 std::array<Coordf, 4> get_corners()
const;
31 } __attribute__((packed));
40 : uuid(uu), type(ty), vertex(v), layer(la)
45 if (type < other.type) {
48 if (type > other.type) {
51 if (uuid < other.uuid) {
54 else if (uuid > other.uuid) {
57 return vertex < other.vertex;
61 return (uuid == other.uuid) && (vertex == other.vertex) && (type == other.type);
75 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
76 void append(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
unsigned int vertex = 0,
LayerRange layer = 10000,
78 void append_angled(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
const Coordf &box_center,
79 const Coordf &box_dim,
float angle,
unsigned int vertex = 0,
LayerRange layer = 10000,
81 void append_line(
const UUID &uu, ObjectType ot,
const Coordf &p0,
const Coordf &p1,
float width,
82 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
83 void update_preview(
const std::set<SelectableRef> &sel);
90 std::vector<Selectable> items;
91 std::vector<SelectableRef> items_ref;
92 std::map<SelectableRef, unsigned int> items_map;
93 std::vector<int> items_group;
96 int group_current = -1;
Definition: canvas_gl.hpp:18
Definition: canvas.hpp:22
Definition: drag_selection.hpp:8
Definition: layer_range.hpp:7
Definition: selectables.hpp:33
Definition: selectables.hpp:9
Definition: selectables_renderer.hpp:5
Definition: selectables.hpp:65
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