1 #ifndef slic3r_ConfigWizard_hpp_
2 #define slic3r_ConfigWizard_hpp_
3 
4 #include <memory>
5 
6 #include <wx/dialog.h>
7 
8 #include "GUI_Utils.hpp"
9 
10 namespace Slic3r {
11 
12 class PresetBundle;
13 class PresetUpdater;
14 
15 namespace GUI {
16 
17 
18 class ConfigWizard: public DPIDialog
19 {
20 public:
21     // Why is the Wizard run
22     enum RunReason {
23         RR_DATA_EMPTY,                  // No or empty datadir
24         RR_DATA_LEGACY,                 // Pre-updating datadir
25         RR_DATA_INCOMPAT,               // Incompatible datadir - Slic3r downgrade situation
26         RR_USER,                        // User requested the Wizard from the menus
27     };
28 
29     // What page should wizard start on
30     enum StartPage {
31         SP_WELCOME,
32         SP_PRINTERS,
33         SP_FILAMENTS,
34         SP_MATERIALS,
35     };
36 
37     ConfigWizard(wxWindow *parent);
38     ConfigWizard(ConfigWizard &&) = delete;
39     ConfigWizard(const ConfigWizard &) = delete;
40     ConfigWizard &operator=(ConfigWizard &&) = delete;
41     ConfigWizard &operator=(const ConfigWizard &) = delete;
42     ~ConfigWizard();
43 
44     // Run the Wizard. Return whether it was completed.
45     bool run(RunReason reason, StartPage start_page = SP_WELCOME);
46 
47     static const wxString& name(const bool from_menu = false);
48 
49 protected:
50     void on_dpi_changed(const wxRect &suggested_rect) override ;
51 
52 private:
53     struct priv;
54     std::unique_ptr<priv> p;
55 
56     friend struct ConfigWizardPage;
57 };
58 
59 
60 
61 }
62 }
63 
64 #endif
65