2 #include "common/common.hpp"
3 #include "util/uuid.hpp"
18 enum class Flag { SELECTED = 1, PRELIGHT = 2, ALWAYS = 4, PREVIEW = 8 };
19 bool get_flag(Flag f)
const;
20 void set_flag(Flag f,
bool v);
24 bool inside(
const Coordf &c,
float expand = 0)
const;
27 bool is_point()
const;
29 std::array<Coordf, 4> get_corners()
const;
30 } __attribute__((packed));
39 : uuid(uu), type(ty), vertex(v), layer(la)
44 if (type < other.type) {
47 if (type > other.type) {
50 if (uuid < other.uuid) {
53 else if (uuid > other.uuid) {
56 return vertex < other.vertex;
60 return (uuid == other.uuid) && (vertex == other.vertex) && (type == other.type);
74 unsigned int vertex = 0,
int layer = 10000,
bool always =
false);
75 void append(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
unsigned int vertex = 0,
int layer = 10000,
77 void append_angled(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
const Coordf &box_center,
78 const Coordf &box_dim,
float angle,
unsigned int vertex = 0,
int layer = 10000,
80 void append_line(
const UUID &uu, ObjectType ot,
const Coordf &p0,
const Coordf &p1,
float width,
81 unsigned int vertex = 0,
int layer = 10000,
bool always =
false);
82 void update_preview(
const std::set<SelectableRef> &sel);
89 std::vector<Selectable> items;
90 std::vector<SelectableRef> items_ref;
91 std::map<SelectableRef, unsigned int> items_map;
92 std::vector<int> items_group;
95 int group_current = -1;