Horizon
symbol_preview.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include <set>
4 #include "common/common.hpp"
5 #include "util/uuid.hpp"
6 #include "util/pool_goto_provider.hpp"
7 
8 namespace horizon {
9 class SymbolPreview : public Gtk::Box, public PoolGotoProvider {
10 public:
11  SymbolPreview(class Pool &pool);
12 
13  void load(const UUID &uu);
14 
15 private:
16  UUID symbol;
17  class Pool &pool;
18  class PreviewCanvas *canvas_symbol = nullptr;
19 
20  Gtk::RadioButton *rb_normal = nullptr;
21  Gtk::RadioButton *rb_mirrored = nullptr;
22 
23  std::array<Gtk::RadioButton *, 4> rb_angles;
24 
25  Gtk::Label *unit_label = nullptr;
26 
27  void update(bool fit = false);
28 };
29 } // namespace horizon
horizon::PoolGotoProvider
Definition: pool_goto_provider.hpp:7
horizon::PreviewCanvas
Definition: preview_canvas.hpp:5
horizon::SymbolPreview
Definition: symbol_preview.hpp:9
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::Pool
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:21