Horizon
Loading...
Searching...
No Matches
tag_entry.hpp
1#pragma once
2#include <gtkmm.h>
3#include <map>
4#include <set>
5#include "util/changeable.hpp"
6#include "common/common.hpp"
7
8namespace horizon {
9class TagEntry : public Gtk::Box, public Changeable {
10public:
11 class TagPopover;
12 class TagLabel;
13 friend TagPopover;
14 friend TagLabel;
15 TagEntry(class IPool &p, ObjectType t, bool edit_mode = false);
16 std::set<std::string> get_tags() const;
17 void set_tags(const std::set<std::string> &tags);
18 void clear();
19
20private:
21 class IPool &pool;
22 const ObjectType type;
23 const bool edit_mode;
24 Gtk::MenuButton *add_button = nullptr;
25 Gtk::Box *box = nullptr;
26
27 void add_tag(const std::string &t);
28 void remove_tag(const std::string &t);
29 std::map<std::string, class TagLabel *> label_widgets;
30 void update_add_button_sensitivity();
31};
32} // namespace horizon
Definition changeable.hpp:5
Definition ipool.hpp:15
Definition tag_entry.cpp:247
Definition tag_entry.cpp:8
Definition tag_entry.hpp:9