Horizon
src
widgets
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
8
namespace
horizon {
9
class
TagEntry
:
public
Gtk::Box,
public
Changeable
{
10
public
:
11
class
TagPopover
;
12
class
TagLabel
;
13
friend
TagPopover
;
14
friend
TagLabel
;
15
TagEntry
(
class
Pool
&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
20
private
:
21
class
Pool
&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
horizon::TagEntry::TagLabel
Definition:
tag_entry.cpp:241
horizon::TagEntry::TagPopover
Definition:
tag_entry.cpp:6
horizon::Changeable
Definition:
changeable.hpp:5
horizon::TagEntry
Definition:
tag_entry.hpp:9
horizon::Pool
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition:
pool.hpp:21
Generated by
1.8.16