2017-10-30 17:41:50 +00:00
|
|
|
|
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <xsinit.h>
|
|
|
|
#include "slic3r/GUI/AppConfig.hpp"
|
|
|
|
%}
|
|
|
|
|
|
|
|
%name{Slic3r::GUI::AppConfig} class AppConfig {
|
|
|
|
AppConfig();
|
|
|
|
~AppConfig();
|
|
|
|
|
|
|
|
void reset();
|
|
|
|
void set_defaults();
|
|
|
|
|
2017-11-02 15:21:34 +00:00
|
|
|
void load()
|
|
|
|
%code%{
|
|
|
|
try {
|
|
|
|
THIS->load();
|
|
|
|
} catch (std::exception& e) {
|
|
|
|
croak("Loading an application config file failed:\n%s\n", e.what());
|
|
|
|
}
|
|
|
|
%};
|
|
|
|
void save()
|
|
|
|
%code%{
|
|
|
|
try {
|
|
|
|
THIS->save();
|
|
|
|
} catch (std::exception& e) {
|
|
|
|
croak("Saving an application config file failed:\n%s\n", e.what());
|
|
|
|
}
|
|
|
|
%};
|
2017-10-30 17:41:50 +00:00
|
|
|
bool exists();
|
2017-11-01 18:30:05 +00:00
|
|
|
bool dirty();
|
2017-10-30 17:41:50 +00:00
|
|
|
|
|
|
|
std::string get(char *name);
|
|
|
|
void set(char *name, char *value);
|
|
|
|
bool has(char *section);
|
|
|
|
|
|
|
|
std::string get_last_dir();
|
|
|
|
void update_config_dir(char *dir);
|
|
|
|
void update_skein_dir(char *dir);
|
|
|
|
std::string get_last_output_dir(const char *alt = "");
|
|
|
|
void update_last_output_dir(char *dir);
|
2018-03-14 12:29:50 +00:00
|
|
|
|
|
|
|
void reset_selections();
|
2017-10-30 17:41:50 +00:00
|
|
|
};
|