5 #include "util/status_dispatcher.hpp"
6 #include "util/changeable.hpp"
7 #include "common/pdf_export_settings.hpp"
8 #include "util/export_file_chooser.hpp"
12 class PDFExportWindow :
public Gtk::Window,
public Changeable {
13 friend class PDFLayerEditor;
16 PDFExportWindow(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
class IDocument &c,
17 class PDFExportSettings &s,
const std::string &project_dir);
18 static PDFExportWindow *create(Gtk::Window *p,
class IDocument &c,
class PDFExportSettings &s,
19 const std::string &project_dir);
25 class IDocument &core;
26 class PDFExportSettings &settings;
28 class MyExportFileChooser :
public ExportFileChooser {
30 void prepare_chooser(Glib::RefPtr<Gtk::FileChooser> chooser)
override;
31 void prepare_filename(std::string &filename)
override;
33 MyExportFileChooser export_filechooser;
35 Gtk::HeaderBar *header =
nullptr;
36 Gtk::Entry *filename_entry =
nullptr;
37 Gtk::Button *filename_button =
nullptr;
38 class SpinButtonDim *min_line_width_sp =
nullptr;
39 Gtk::Grid *grid =
nullptr;
40 Gtk::ListBox *layers_box;
41 Glib::RefPtr<Gtk::SizeGroup> sg_layer_name;
43 Gtk::Button *export_button =
nullptr;
44 Gtk::Label *progress_label =
nullptr;
45 Gtk::ProgressBar *progress_bar =
nullptr;
46 Gtk::Revealer *progress_revealer =
nullptr;
47 void update_export_button();
49 Gtk::Spinner *spinner =
nullptr;
51 StatusDispatcher status_dispatcher;
55 void export_thread(PDFExportSettings settings);
56 unsigned int n_layers = 0;