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, ARC_CENTER_IS_MIDPOINT = 16 };
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 Coordf get_arc_center()
const;
32 std::array<Coordf, 4> get_corners()
const;
33} __attribute__((packed));
42 : uuid(uu), type(ty), vertex(v), layer(la)
47 if (type < other.type) {
50 if (type > other.type) {
53 if (uuid < other.uuid) {
56 else if (uuid > other.uuid) {
59 return vertex < other.vertex;
63 return (uuid == other.uuid) && (vertex == other.vertex) && (type == other.type);
77 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
78 void append(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
unsigned int vertex = 0,
LayerRange layer = 10000,
80 void append_angled(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
const Coordf &box_center,
81 const Coordf &box_dim,
float angle,
unsigned int vertex = 0,
LayerRange layer = 10000,
83 void append_line(
const UUID &uu, ObjectType ot,
const Coordf &p0,
const Coordf &p1,
float width,
84 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
85 void append_arc(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
float r0,
float r1,
float a0,
float a1,
86 unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
87 void append_arc_midpoint(
const UUID &uu, ObjectType ot,
const Coordf &midpoint,
float r0,
float r1,
float a0,
88 float a1,
unsigned int vertex = 0,
LayerRange layer = 10000,
bool always =
false);
89 void update_preview(
const std::set<SelectableRef> &sel);
94 const auto &get_items()
const
99 const auto &get_items_ref()
const
106 std::vector<Selectable> items;
107 std::vector<SelectableRef> items_ref;
108 std::map<SelectableRef, unsigned int> items_map;
109 std::vector<int> items_group;
112 int group_current = -1;
Definition canvas_gl.hpp:20
Definition drag_selection.hpp:8
Definition layer_range.hpp:11
Definition selectables.hpp:35
Definition selectables.hpp:9
Definition selectables_renderer.hpp:5
Definition selectables.hpp:67
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16