Horizon
Loading...
Searching...
No Matches
schematic_properties.hpp
1#pragma once
2#include <gtkmm.h>
3#include <array>
4#include <set>
5#include "util/uuid.hpp"
6namespace horizon {
7
8
9class SchematicPropertiesDialog : public Gtk::Dialog {
10public:
11 SchematicPropertiesDialog(Gtk::Window *parent, class IDocumentSchematicBlockSymbol &c);
12 void select_sheet(const UUID &block, const UUID &sheet);
13
14private:
16
17 class TreeColumns : public Gtk::TreeModelColumnRecord {
18 public:
19 TreeColumns()
20 {
21 Gtk::TreeModelColumnRecord::add(name);
22 Gtk::TreeModelColumnRecord::add(sheet);
23 Gtk::TreeModelColumnRecord::add(block);
24 }
25 Gtk::TreeModelColumn<Glib::ustring> name;
26 Gtk::TreeModelColumn<UUID> sheet;
27 Gtk::TreeModelColumn<UUID> block;
28 };
29 TreeColumns tree_columns;
30
31 Gtk::TreeView *view = nullptr;
32 Glib::RefPtr<Gtk::TreeStore> store;
33 bool updating = false;
34
35 void sheets_to_row(Gtk::TreeModel::Row &row, const class Schematic &sch, const UUID &block_uuid);
36 void selection_changed();
37
38 Gtk::Box *box = nullptr;
39
40 Gtk::Widget *current = nullptr;
41 class SheetEditor *sheet_editor = nullptr;
42 class BlockEditor *block_editor = nullptr;
43
44 Gtk::Button *remove_button = nullptr;
45
46 void ok_clicked();
47 void add_block();
48 void add_sheet();
49 void handle_remove();
50 void update_view();
51 void update_for_sheet();
52 void update_for_block();
53 Gtk::Menu add_menu;
54 Gtk::MenuItem *add_sheet_menu_item = nullptr;
55};
56} // namespace horizon
Definition schematic_properties.cpp:93
Definition idocument_schematic_block_symbol.hpp:5
Definition schematic_properties.hpp:9
A Schematic is the visual representation of a Block.
Definition schematic.hpp:29
Definition schematic_properties.cpp:19
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16