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 
19  void update_monitor() override;
20 
21  Searcher *get_searcher_ptr() override
22  {
23  return &searcher;
24  };
25 
26 private:
27  void canvas_update() override;
28  void apply_preferences() override;
29  CoreSymbol core_symbol;
30  Symbol &symbol;
31  SearcherSymbol searcher;
32 
33  class HeaderButton *header_button = nullptr;
34  Gtk::Entry *name_entry = nullptr;
35  Gtk::Label *unit_label = nullptr;
36  Gtk::Switch *can_expand_switch = nullptr;
37  class SymbolPreviewWindow *symbol_preview_window = nullptr;
38  class UnplacedBox *unplaced_box = nullptr;
39  void update_unplaced();
40  void update_header();
41  void handle_selection_cross_probe();
42 
43  class CanvasAnnotation *bbox_annotation = nullptr;
44  void update_bbox_annotation();
45 };
46 } // namespace horizon