2 #include "common/common.hpp" 3 #include "util/uuid.hpp" 18 enum class Flag { SELECTED = 1, PRELIGHT = 2 };
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;
26 std::array<Coordf, 4> get_corners()
const;
27 } __attribute__((packed));
36 : uuid(uu), type(ty), vertex(v), layer(la)
41 if (type < other.type) {
44 if (type > other.type) {
47 if (uuid < other.uuid) {
50 else if (uuid > other.uuid) {
53 return vertex < other.vertex;
57 return (uuid == other.uuid) && (vertex == other.vertex) && (type == other.type);
71 unsigned int vertex = 0,
int layer = 10000,
bool always =
false);
72 void append(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
unsigned int vertex = 0,
int layer = 10000,
74 void append_angled(
const UUID &uu, ObjectType ot,
const Coordf ¢er,
const Coordf &box_center,
75 const Coordf &box_dim,
float angle,
unsigned int vertex = 0,
int layer = 10000,
77 void append_line(
const UUID &uu, ObjectType ot,
const Coordf &p0,
const Coordf &p1,
float width,
78 unsigned int vertex = 0,
int layer = 10000,
bool always =
false);
82 std::vector<Selectable> items;
83 std::vector<SelectableRef> items_ref;
84 std::map<SelectableRef, unsigned int> items_map;
102 GLuint screenmat_loc;
106 GLuint color_always_loc;
107 GLuint color_inner_loc;
108 GLuint color_outer_loc;
109 GLuint color_prelight_loc;
Definition: selectables.hpp:87
Definition: selectables.hpp:29
Definition: canvas_gl.hpp:13
Definition: canvas.hpp:20
Definition: drag_selection.hpp:8
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: selectables.hpp:61
Definition: selectables.hpp:8