Horizon
dialogs.hpp
1 #pragma once
2 #include <memory>
3 #include "util/uuid.hpp"
4 #include "common/common.hpp"
5 #include "util/uuid_path.hpp"
6 #include "block/component.hpp"
7 #include "parameter/set.hpp"
8 #include <map>
9 
10 namespace Gtk {
11 class Window;
12 }
13 
14 namespace horizon {
15 class Dialogs {
16 public:
17  Dialogs(){};
18  void set_parent(Gtk::Window *w);
19 
20  std::pair<bool, UUID> map_pin(const std::vector<std::pair<const Pin *, bool>> &pins);
21  std::pair<bool, UUIDPath<2>> map_symbol(const std::map<UUIDPath<2>, std::string> &gates);
22  std::pair<bool, UUID> map_package(const std::vector<std::pair<Component *, bool>> &components);
23  std::pair<bool, UUID> select_symbol(class Pool *p, const UUID &unit_uuid);
24  std::pair<bool, UUID> select_part(class Pool *p, const UUID &entity_uuid, const UUID &part_uuid,
25  bool show_none = false);
26  std::pair<bool, UUID> select_entity(class Pool *pool);
27  std::pair<bool, UUID> select_unit(class Pool *pool);
28  std::pair<bool, UUID> select_padstack(class Pool *pool, const UUID &package_uuid);
29  std::pair<bool, UUID> select_hole_padstack(class Pool *pool);
30  std::pair<bool, UUID> select_via_padstack(class ViaPadstackProvider *vpp);
31  std::pair<bool, UUID> select_net(class Block *block, bool power_only, const UUID &net_default = UUID());
32  std::pair<bool, UUID> select_bus(class Block *block);
33  std::pair<bool, UUID> select_bus_member(class Block *block, const UUID &bus_uuid);
34  bool edit_symbol_pin_names(class SchematicSymbol *symbol);
35  unsigned int ask_net_merge(class Net *net, class Net *into);
36  bool ask_delete_component(Component *comp);
37  bool manage_buses(class Block *b);
38  bool manage_net_classes(class Block *b);
39  bool manage_power_nets(class Block *b);
40  bool manage_via_templates(class Board *b, class ViaPadstackProvider *vpp);
41  bool edit_parameter_program(class ParameterProgram *program);
42  bool edit_parameter_set(ParameterSet *pset);
43  bool edit_pad_parameter_set(std::set<class Pad *> &pads, class Pool *pool, class Package *pkg);
44  bool edit_board_hole(std::set<class BoardHole *> &holes, class Pool *pool, class Block *block);
45  bool annotate(class Schematic *s);
46  bool edit_plane(class Plane *plane, class Board *brd, class Block *block);
47  bool edit_keepout(class Keepout *keepout, class Core *c);
48  bool edit_stackup(class Board *brd);
49  bool edit_schematic_properties(class Schematic *s, class Pool *pool);
50  bool edit_frame_properties(class Frame *fr);
51  std::pair<bool, int64_t> ask_datum(const std::string &label, int64_t def = 0);
52  std::pair<bool, Coordi> ask_datum_coord(const std::string &label, Coordi def = Coordi());
53  std::tuple<bool, Coordi, std::pair<bool, bool>> ask_datum_coord2(const std::string &label, Coordi def = Coordi());
54  std::pair<bool, std::string> ask_datum_string(const std::string &label, const std::string &def);
55  bool edit_shapes(std::set<class Shape *> shapes);
56  bool edit_via(class Via *via, class ViaPadstackProvider &vpp);
57  std::tuple<bool, std::string, int, int64_t, double> ask_dxf_filename(class Core *core);
58 
59 
60 private:
61  Gtk::Window *parent = nullptr;
62 };
63 } // namespace horizon
A Schematic is the visual representation of a Block.
Definition: schematic.hpp:26
Definition: via.hpp:16
Definition: frame.hpp:21
Definition: dialogs.hpp:10
Definition: program.hpp:12
A Component is an instanced Entity in a Block.
Definition: component.hpp:39
Definition: dialogs.hpp:15
Definition: board.hpp:29
Definition: via_padstack_provider.hpp:13
Definition: keepout.hpp:9
Definition: package.hpp:27
A block is one level of hierarchy in the netlist.
Definition: block.hpp:26
Where Tools and and documents meet.
Definition: core.hpp:232
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: plane.hpp:39
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:19
Definition: block.cpp:9
Definition: schematic_symbol.hpp:19
Definition: net.hpp:16