Horizon
Loading...
Searching...
No Matches
unplaced_box.hpp
1#pragma once
2#include <gtkmm.h>
3#include <map>
4#include <set>
5#include "util/uuid.hpp"
6#include "util/uuid_path.hpp"
7
8namespace horizon {
9class UnplacedBox : public Gtk::Box {
10public:
11 UnplacedBox(const std::string &title);
12
13 void update(const std::map<UUIDPath<2>, std::string> &items);
14 void set_title(const std::string &title);
15 typedef sigc::signal<void, std::vector<UUIDPath<2>>> type_signal_place;
16 type_signal_place signal_place()
17 {
18 return s_signal_place;
19 }
20
21private:
22 class ListColumns : public Gtk::TreeModelColumnRecord {
23 public:
24 ListColumns()
25 {
26 Gtk::TreeModelColumnRecord::add(text);
27 Gtk::TreeModelColumnRecord::add(uuid);
28 }
29 Gtk::TreeModelColumn<Glib::ustring> text;
30 Gtk::TreeModelColumn<UUIDPath<2>> uuid;
31 };
32 ListColumns list_columns;
33
34 Gtk::TreeView *view = nullptr;
35 Glib::RefPtr<Gtk::ListStore> store;
36 Gtk::ToolButton *button_place = nullptr;
37
38 type_signal_place s_signal_place;
39 void row_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
40};
41} // namespace horizon
Stores a sequence of up to 3 UUIDs.
Definition uuid_path.hpp:12
Definition unplaced_box.hpp:9