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