Horizon
imp_symbol.hpp
1 #pragma once
2 #include "imp.hpp"
3 #include "core/core_symbol.hpp"
4 
5 namespace horizon {
6 class ImpSymbol : public ImpBase {
7 public:
8  ImpSymbol(const std::string &symbol_filename, const std::string &pool_path);
9 
10 protected:
11  void construct() override;
12 
13  ActionCatalogItem::Availability get_editor_type_for_action() const override
14  {
15  return ActionCatalogItem::AVAILABLE_IN_SYMBOL;
16  };
17  ObjectType get_editor_type() const override
18  {
19  return ObjectType::SYMBOL;
20  }
21 
22  void update_monitor() override;
23 
24 private:
25  void canvas_update() override;
26  void apply_preferences() override;
27  CoreSymbol core_symbol;
28 
29  Gtk::Entry *name_entry = nullptr;
30  Gtk::Label *unit_label = nullptr;
31  Gtk::Switch *can_expand_switch = nullptr;
32  class SymbolPreviewWindow *symbol_preview_window = nullptr;
33  class UnplacedBox *unplaced_box = nullptr;
34  void update_unplaced();
35 };
36 } // namespace horizon
horizon::UnplacedBox
Definition: unplaced_box.hpp:8
horizon::ImpSymbol
Definition: imp_symbol.hpp:6
horizon::SymbolPreviewWindow
Definition: symbol_preview_window.hpp:8
horizon::CoreSymbol
Definition: core_symbol.hpp:10
horizon::ImpBase
Definition: imp.hpp:36