Horizon
fab_output_window.hpp
1 #pragma once
2 #include <array>
3 #include <gtkmm.h>
4 #include <set>
5 #include "util/window_state_store.hpp"
6 #include "util/export_file_chooser.hpp"
7 #include "util/changeable.hpp"
8 
9 namespace horizon {
10 
11 class FabOutputWindow : public Gtk::Window, public Changeable {
12  friend class GerberLayerEditor;
13 
14 public:
15  FabOutputWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class IDocumentBoard &c,
16  const std::string &project_dir);
17  static FabOutputWindow *create(Gtk::Window *p, class IDocumentBoard &c, const std::string &project_dir);
18 
19  void set_can_generate(bool v);
20  void reload_layers();
21  void generate();
22 
23 private:
24  class IDocumentBoard &core;
25  class Board &brd;
26  class FabOutputSettings &settings;
27  Gtk::ListBox *gerber_layers_box = nullptr;
28  Gtk::Entry *npth_filename_entry = nullptr;
29  Gtk::Entry *pth_filename_entry = nullptr;
30  Gtk::Label *npth_filename_label = nullptr;
31  Gtk::Label *pth_filename_label = nullptr;
32  Gtk::Entry *prefix_entry = nullptr;
33  Gtk::Entry *directory_entry = nullptr;
34  class SpinButtonDim *outline_width_sp = nullptr;
35  Gtk::Button *generate_button = nullptr;
36  Gtk::Button *directory_button = nullptr;
37  Gtk::ComboBoxText *drill_mode_combo = nullptr;
38  Gtk::TextView *log_textview = nullptr;
39  Gtk::Switch *zip_output_switch = nullptr;
40  bool can_export = true;
41  void update_export_button();
42 
43  ExportFileChooser export_filechooser;
44 
45  Glib::RefPtr<Gtk::SizeGroup> sg_layer_name;
46 
47  WindowStateStore state_store;
48 
49  void update_drill_visibility();
50  unsigned int n_layers = 0;
51 };
52 } // namespace horizon
Definition: board.hpp:42
Definition: changeable.hpp:5
Definition: export_file_chooser.hpp:7
Definition: fab_output_settings.hpp:10
Definition: fab_output_window.hpp:11
Definition: fab_output_window.cpp:12
Definition: idocument_board.hpp:5
Definition: spin_button_dim.hpp:5
Definition: window_state_store.hpp:20