diff options
author | bubnikv <bubnikv@gmail.com> | 2018-11-22 17:29:59 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-11-22 17:29:59 +0300 |
commit | bde4153d4474bbde50da1f202ab38cf875ac197a (patch) | |
tree | ce407343ccc69d334ce48d72e24bd81508b2e6ef /xs | |
parent | 86c11df5540a9b0b4384eb791578ac7f203bd814 (diff) |
Removed legacy GUI Perl bindings,
replaced Print & SLAPrint pointers with BackgroundProcessing pointer
at the GLCanvas3D level, so that the Print & SLAPrint access will be
synchronized with the current printer technology.
Diffstat (limited to 'xs')
-rw-r--r-- | xs/src/perlglue.cpp | 14 | ||||
-rw-r--r-- | xs/xsp/GUI.xsp | 211 | ||||
-rw-r--r-- | xs/xsp/GUI_3DScene.xsp | 839 | ||||
-rw-r--r-- | xs/xsp/GUI_AppConfig.xsp | 46 | ||||
-rw-r--r-- | xs/xsp/GUI_BackgroundSlicingProcess.xsp | 25 | ||||
-rw-r--r-- | xs/xsp/GUI_Preset.xsp | 149 | ||||
-rw-r--r-- | xs/xsp/GUI_Preview.xsp | 28 | ||||
-rw-r--r-- | xs/xsp/GUI_Tab.xsp | 24 | ||||
-rw-r--r-- | xs/xsp/ProgressStatusBar.xsp | 48 | ||||
-rw-r--r-- | xs/xsp/Utils_PresetUpdater.xsp | 13 | ||||
-rw-r--r-- | xs/xsp/Utils_PrintHost.xsp | 12 | ||||
-rw-r--r-- | xs/xsp/my.map | 30 | ||||
-rw-r--r-- | xs/xsp/typemap.xspt | 25 |
13 files changed, 0 insertions, 1464 deletions
diff --git a/xs/src/perlglue.cpp b/xs/src/perlglue.cpp index 72184be34..98a124c3f 100644 --- a/xs/src/perlglue.cpp +++ b/xs/src/perlglue.cpp @@ -54,20 +54,6 @@ REGISTER_CLASS(Surface, "Surface"); REGISTER_CLASS(SurfaceCollection, "Surface::Collection"); REGISTER_CLASS(PrintObjectSupportMaterial, "Print::SupportMaterial2"); REGISTER_CLASS(TriangleMesh, "TriangleMesh"); -REGISTER_CLASS(AppConfig, "GUI::AppConfig"); -REGISTER_CLASS(BackgroundSlicingProcess, "GUI::BackgroundSlicingProcess"); -REGISTER_CLASS(GLShader, "GUI::_3DScene::GLShader"); -REGISTER_CLASS(GLVolume, "GUI::_3DScene::GLVolume"); -REGISTER_CLASS(GLVolumeCollection, "GUI::_3DScene::GLVolume::Collection"); -REGISTER_CLASS(Preset, "GUI::Preset"); -REGISTER_CLASS(PresetCollection, "GUI::PresetCollection"); -REGISTER_CLASS(PresetBundle, "GUI::PresetBundle"); -REGISTER_CLASS(TabIface, "GUI::Tab"); -REGISTER_CLASS(PreviewIface, "GUI::Preview"); -REGISTER_CLASS(ProgressStatusBar, "GUI::ProgressStatusBar"); -REGISTER_CLASS(PresetUpdater, "PresetUpdater"); -REGISTER_CLASS(PrintController, "PrintController"); -REGISTER_CLASS(PrintHost, "PrintHost"); SV* ConfigBase__as_hash(ConfigBase* THIS) { diff --git a/xs/xsp/GUI.xsp b/xs/xsp/GUI.xsp deleted file mode 100644 index a1e3e4670..000000000 --- a/xs/xsp/GUI.xsp +++ /dev/null @@ -1,211 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/GUI.hpp" -#include "slic3r/Utils/ASCIIFolding.hpp" -#include "slic3r/Utils/FixModelByWin10.hpp" -#include "slic3r/Utils/Serial.hpp" -%} - - -%package{Slic3r::GUI}; - -void about() - %code{% Slic3r::GUI::about(); %}; - -void disable_screensaver() - %code{% Slic3r::GUI::disable_screensaver(); %}; - -void enable_screensaver() - %code{% Slic3r::GUI::enable_screensaver(); %}; - -std::vector<std::string> scan_serial_ports() - %code{% RETVAL=Slic3r::Utils::scan_serial_ports(); %}; - -bool debugged() - %code{% RETVAL=Slic3r::GUI::debugged(); %}; - -void break_to_debugger() - %code{% Slic3r::GUI::break_to_debugger(); %}; - -bool is_windows10() - %code{% RETVAL=Slic3r::is_windows10(); %}; - -void set_wxapp(SV *ui) - %code%{ Slic3r::GUI::set_wxapp((wxApp*)wxPli_sv_2_object(aTHX_ ui, "Wx::App")); %}; - -void set_gui_appctl() - %code%{ Slic3r::GUI::set_gui_appctl(); %}; - -void set_cli_appctl() - %code%{ Slic3r::GUI::set_cli_appctl(); %}; - -void set_progress_status_bar(ProgressStatusBar *prs) - %code%{ Slic3r::GUI::set_progress_status_bar(prs); %}; - -void set_main_frame(SV *ui) - %code%{ Slic3r::GUI::set_main_frame((wxFrame*)wxPli_sv_2_object(aTHX_ ui, "Wx::Frame")); %}; - -void set_tab_panel(SV *ui) - %code%{ Slic3r::GUI::set_tab_panel((wxNotebook*)wxPli_sv_2_object(aTHX_ ui, "Wx::Notebook")); %}; - -void set_plater(SV *ui) - %code%{ Slic3r::GUI::set_plater((wxPanel*)wxPli_sv_2_object(aTHX_ ui, "Wx::Panel")); %}; - -void add_menus(SV *ui, int event_preferences_changed, int event_language_change) - %code%{ Slic3r::GUI::add_menus((wxMenuBar*)wxPli_sv_2_object(aTHX_ ui, "Wx::MenuBar"), event_preferences_changed, event_language_change); %}; - -void create_preset_tabs(int event_value_change, int event_presets_changed) - %code%{ Slic3r::GUI::create_preset_tabs(event_value_change, event_presets_changed); %}; - -void show_error_id(int id, std::string msg) - %code%{ Slic3r::GUI::show_error_id(id, msg); %}; - -TabIface* get_preset_tab(char *name) - %code%{ RETVAL=Slic3r::GUI::get_preset_tab_iface(name); %}; - -PreviewIface* create_preview_iface(SV *ui, DynamicPrintConfig* config, Print* print, GCodePreviewData* gcode_preview_data) - %code%{ RETVAL=Slic3r::GUI::create_preview_iface((wxNotebook*)wxPli_sv_2_object(aTHX_ ui, "Wx::Notebook"), config, print, gcode_preview_data); %}; - -bool load_language() - %code%{ RETVAL=Slic3r::GUI::load_language(); %}; - -void create_combochecklist(SV *ui, std::string text, std::string items, bool initial_value) - %code%{ Slic3r::GUI::create_combochecklist((wxComboCtrl*)wxPli_sv_2_object(aTHX_ ui, "Wx::ComboCtrl"), text, items, initial_value); %}; - -int combochecklist_get_flags(SV *ui) - %code%{ RETVAL=Slic3r::GUI::combochecklist_get_flags((wxComboCtrl*)wxPli_sv_2_object(aTHX_ ui, "Wx::ComboCtrl")); %}; - -void set_app_config(AppConfig *app_config) - %code%{ Slic3r::GUI::set_app_config(app_config); %}; - -bool check_unsaved_changes() - %code%{ RETVAL=Slic3r::GUI::check_unsaved_changes(); %}; - -bool config_wizard_startup(int app_config_exists) - %code%{ - RETVAL=Slic3r::GUI::config_wizard_startup(app_config_exists != 0); - %}; - -void open_preferences_dialog(int preferences_event) - %code%{ Slic3r::GUI::open_preferences_dialog(preferences_event); %}; - -void set_preset_bundle(PresetBundle *preset_bundle) - %code%{ Slic3r::GUI::set_preset_bundle(preset_bundle); %}; - -void set_preset_updater(PresetUpdater* updater) - %code%{ Slic3r::GUI::set_preset_updater(updater); %}; - -void add_frequently_changed_parameters(SV *ui_parent, SV *ui_sizer, SV *ui_p_sizer) - %code%{ Slic3r::GUI::add_frequently_changed_parameters((wxWindow*)wxPli_sv_2_object(aTHX_ ui_parent, "Wx::Window"), - (wxBoxSizer*)wxPli_sv_2_object(aTHX_ ui_sizer, "Wx::BoxSizer"), - (wxFlexGridSizer*)wxPli_sv_2_object(aTHX_ ui_p_sizer, "Wx::FlexGridSizer")); %}; - -void set_print_callback_event(Print *print, int id) - %code%{ Slic3r::GUI::set_print_callback_event(print, id); %}; - -void set_model_events_from_perl(Model *model, - int event_object_selection_changed, - int event_object_settings_changed, - int event_remove_object, - int event_update_scene) - %code%{ Slic3r::GUI::set_model_events_from_perl(*model, - event_object_selection_changed, - event_object_settings_changed, - event_remove_object, - event_update_scene); %}; - -void set_objects_from_perl( SV *ui_parent, - SV *frequently_changed_parameters_sizer, - SV *info_sizer, - SV *btn_export_gcode, - SV *btn_reslice, - SV *btn_print, - SV *btn_send_gcode, - SV *manifold_warning_icon) - %code%{ Slic3r::GUI::set_objects_from_perl( - (wxWindow *)wxPli_sv_2_object(aTHX_ ui_parent, "Wx::Window"), - (wxBoxSizer *)wxPli_sv_2_object(aTHX_ frequently_changed_parameters_sizer, "Wx::BoxSizer"), - (wxBoxSizer *)wxPli_sv_2_object(aTHX_ info_sizer, "Wx::BoxSizer"), - (wxButton *)wxPli_sv_2_object(aTHX_ btn_export_gcode, "Wx::Button"), - (wxButton *)wxPli_sv_2_object(aTHX_ btn_reslice, "Wx::Button"), - (wxButton *)wxPli_sv_2_object(aTHX_ btn_print, "Wx::Button"), - (wxButton *)wxPli_sv_2_object(aTHX_ btn_send_gcode, "Wx::Button"), - (wxStaticBitmap *)wxPli_sv_2_object(aTHX_ manifold_warning_icon, "Wx::StaticBitmap")); %}; - -void set_show_print_info(bool show) - %code%{ Slic3r::GUI::set_show_print_info(show); %}; - -void set_show_manifold_warning_icon(bool show) - %code%{ Slic3r::GUI::set_show_manifold_warning_icon(show); %}; - -void update_mode() - %code%{ Slic3r::GUI::update_mode(); %}; - -void add_object_to_list(const char *name, SV *object_model) - %code%{ Slic3r::GUI::add_object_to_list( - name, - (ModelObject *)wxPli_sv_2_object(aTHX_ object_model, "Slic3r::Model::Object") ); %}; - -void delete_object_from_list() - %code%{ Slic3r::GUI::delete_object_from_list(); %}; - -void delete_all_objects_from_list() - %code%{ Slic3r::GUI::delete_all_objects_from_list(); %}; - -void set_object_count(int idx, int count) - %code%{ Slic3r::GUI::set_object_count(idx, count); %}; - -void unselect_objects() - %code%{ Slic3r::GUI::unselect_objects(); %}; - -void select_current_object(int idx) - %code%{ Slic3r::GUI::select_current_object(idx); %}; - -void select_current_volume(int idx, int vol_idx) - %code%{ Slic3r::GUI::select_current_volume(idx, vol_idx); %}; - -void remove_obj() - %code%{ Slic3r::GUI::remove(); %}; - -std::string fold_utf8_to_ascii(const char *src) - %code%{ RETVAL = Slic3r::fold_utf8_to_ascii(src); %}; - -void add_export_option(SV *ui, std::string format) - %code%{ Slic3r::GUI::add_export_option((wxFileDialog*)wxPli_sv_2_object(aTHX_ ui, "Wx::FileDialog"), format); %}; - -int get_export_option(SV *ui) - %code%{ RETVAL = Slic3r::GUI::get_export_option((wxFileDialog*)wxPli_sv_2_object(aTHX_ ui, "Wx::FileDialog")); %}; - -void desktop_open_datadir_folder() - %code%{ Slic3r::GUI::desktop_open_datadir_folder(); %}; - -void fix_model_by_win10_sdk_gui(ModelObject *model_object_src, Print *print, Model *model_dst) - %code%{ Slic3r::fix_model_by_win10_sdk_gui(*model_object_src, *print, *model_dst); %}; - -void register_on_request_update_callback(SV* callback) - %code%{ Slic3r::GUI::g_on_request_update_callback.register_callback(callback); %}; - -void deregister_on_request_update_callback() - %code%{ Slic3r::GUI::g_on_request_update_callback.deregister_callback(); %}; - -void create_double_slider(SV *ui_parent, SV *ui_sizer, SV *ui_canvas) - %code%{ Slic3r::GUI::create_double_slider( (wxWindow*)wxPli_sv_2_object(aTHX_ ui_parent, "Wx::Window"), - (wxBoxSizer*)wxPli_sv_2_object(aTHX_ ui_sizer, "Wx::BoxSizer"), - (wxGLCanvas*)wxPli_sv_2_object(aTHX_ ui_canvas, "Wx::GLCanvas")); %}; - -void update_double_slider(bool force_sliders_full_range) - %code%{ Slic3r::GUI::update_double_slider(force_sliders_full_range); %}; - -void reset_double_slider() - %code%{ Slic3r::GUI::reset_double_slider(); %}; - -void enable_action_buttons(bool enable) - %code%{ Slic3r::GUI::enable_action_buttons(enable); %}; - -void save_window_size(SV *window, std::string name) - %code%{ Slic3r::GUI::save_window_size((wxTopLevelWindow*)wxPli_sv_2_object(aTHX_ window, "Wx::TopLevelWindow"), name); %}; - -void restore_window_size(SV *window, std::string name) - %code%{ Slic3r::GUI::restore_window_size((wxTopLevelWindow*)wxPli_sv_2_object(aTHX_ window, "Wx::TopLevelWindow"), name); %}; diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp deleted file mode 100644 index dc252d8bd..000000000 --- a/xs/xsp/GUI_3DScene.xsp +++ /dev/null @@ -1,839 +0,0 @@ -%module{Slic3r::XS}; - -#include <xsinit.h> -#include "slic3r/GUI/GLShader.hpp" -#include "slic3r/GUI/3DScene.hpp" - -%name{Slic3r::GUI::_3DScene::GLShader} class GLShader { - GLShader(); - ~GLShader(); - - bool load_from_text(const char *fragment_shader, const char *vertex_shader); - bool load_from_file(const char *fragment_shader, const char *vertex_shader); - void release(); - - int get_attrib_location(const char *name) const; - int get_uniform_location(const char *name) const; - - bool set_uniform(const char *name, float value) const; - - void enable() const; - void disable() const; - - int shader_program_id() const - %code%{ RETVAL = THIS->shader_program_id; %}; - - std::string last_error() const - %code%{ RETVAL = THIS->last_error; %}; -}; - -%name{Slic3r::GUI::_3DScene::GLVolume} class GLVolume { - GLVolume(); - ~GLVolume(); - - std::vector<double> color() - %code%{ RETVAL.reserve(4); RETVAL.push_back(THIS->color[0]); RETVAL.push_back(THIS->color[1]); RETVAL.push_back(THIS->color[2]); RETVAL.push_back(THIS->color[3]); %}; - - int select_group_id() - %code%{ RETVAL = THIS->select_group_id; %}; - int drag_group_id() - %code%{ RETVAL = THIS->drag_group_id; %}; - int selected() - %code%{ RETVAL = THIS->selected; %}; - void set_selected(int i) - %code%{ THIS->selected = i; %}; - int hover() - %code%{ RETVAL = THIS->hover; %}; - void set_hover(int i) - %code%{ THIS->hover = i; %}; - int zoom_to_volumes() - %code%{ RETVAL = THIS->zoom_to_volumes; %}; - - void set_layer_height_texture_data(unsigned int texture_id, unsigned int shader_id, PrintObject* print_object, float z_cursor_relative, float edit_band_width); - void reset_layer_height_texture_data(); - - int object_idx() const; - int volume_idx() const; - int instance_idx() const; - Clone<Vec3d> origin() const - %code%{ RETVAL = THIS->get_offset(); %}; - void translate(double x, double y, double z) - %code%{ THIS->set_offset(THIS->get_offset() + Vec3d(x, y, z)); %}; - Clone<BoundingBoxf3> bounding_box() const - %code%{ RETVAL = THIS->bounding_box; %}; - - bool empty() const; - bool indexed() const; - - void render() const; - - bool has_layer_height_texture(); - int layer_height_texture_width(); - int layer_height_texture_height(); - int layer_height_texture_cells(); - void* layer_height_texture_data_ptr_level0(); - void* layer_height_texture_data_ptr_level1(); - double layer_height_texture_z_to_row_id() const; - void generate_layer_height_texture(PrintObject *print_object, bool force); -}; - - -%name{Slic3r::GUI::_3DScene::GLVolume::Collection} class GLVolumeCollection { - GLVolumeCollection(); - ~GLVolumeCollection(); - - std::vector<int> load_object(ModelObject *object, int obj_idx, std::vector<int> instance_idxs, std::string color_by, std::string select_by, std::string drag_by, bool use_VBOs); - - int load_wipe_tower_preview(int obj_idx, float pos_x, float pos_y, float width, float depth, float height, float rotation_angle, bool use_VBOs, bool size_unknown, float brim_width); - - void erase() - %code{% THIS->clear(); %}; - - int count() - %code{% RETVAL = THIS->volumes.size(); %}; - - void set_range(double low, double high); - - void render_VBOs() const; - void render_legacy() const; - void finalize_geometry(bool use_VBOs); - void release_geometry(); - - void set_print_box(float min_x, float min_y, float min_z, float max_x, float max_y, float max_z); - - void reset_outside_state(); - void update_colors_by_extruder(DynamicPrintConfig* config); - - bool move_volume_up(int idx) - %code%{ - if (idx > 0 && idx < int(THIS->volumes.size())) { - std::swap(THIS->volumes[idx-1], THIS->volumes[idx]); - std::swap(THIS->volumes[idx-1]->composite_id, THIS->volumes[idx]->composite_id); - std::swap(THIS->volumes[idx-1]->select_group_id, THIS->volumes[idx]->select_group_id); - std::swap(THIS->volumes[idx-1]->drag_group_id, THIS->volumes[idx]->drag_group_id); - RETVAL = true; - } else - RETVAL = false; - %}; - bool move_volume_down(int idx) - %code%{ - if (idx >= 0 && idx + 1 < int(THIS->volumes.size())) { - std::swap(THIS->volumes[idx+1], THIS->volumes[idx]); - std::swap(THIS->volumes[idx+1]->composite_id, THIS->volumes[idx]->composite_id); - std::swap(THIS->volumes[idx+1]->select_group_id, THIS->volumes[idx]->select_group_id); - std::swap(THIS->volumes[idx+1]->drag_group_id, THIS->volumes[idx]->drag_group_id); - RETVAL = true; - } else - RETVAL = false; - %}; - -%{ - -SV* -GLVolumeCollection::arrayref() - CODE: - AV* av = newAV(); - av_fill(av, THIS->volumes.size()-1); - int i = 0; - for (GLVolume *v : THIS->volumes) { - av_store(av, i++, perl_to_SV_ref(*v)); - } - RETVAL = newRV_noinc((SV*)av); - OUTPUT: - RETVAL - -%} -}; - -%package{Slic3r::GUI::_3DScene}; -%{ - -std::string -get_gl_info(format_as_html, extensions) - bool format_as_html; - bool extensions; - CODE: - RETVAL = _3DScene::get_gl_info(format_as_html, extensions); - OUTPUT: - RETVAL - -bool -use_VBOs() - CODE: - RETVAL = _3DScene::use_VBOs(); - OUTPUT: - RETVAL - -bool -add_canvas(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::add_canvas((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -bool -remove_canvas(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::remove_canvas((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -void -remove_all_canvases() - CODE: - _3DScene::remove_all_canvases(); - -void -set_as_dirty(canvas) - SV *canvas; - CODE: - _3DScene::set_as_dirty((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -unsigned int -get_volumes_count(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::get_volumes_count((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -void -reset_volumes(canvas) - SV *canvas; - CODE: - _3DScene::reset_volumes((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -void -deselect_volumes(canvas) - SV *canvas; - CODE: - _3DScene::deselect_volumes((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -void -select_volume(canvas, id) - SV *canvas; - unsigned int id; - CODE: - _3DScene::select_volume((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), id); - -void -update_volumes_selection(canvas, selections) - SV *canvas; - std::vector<int> selections; - CODE: - _3DScene::update_volumes_selection((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), selections); - -int -check_volumes_outside_state(canvas, config) - SV *canvas; - DynamicPrintConfig *config; - CODE: - RETVAL = _3DScene::check_volumes_outside_state((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), config); - OUTPUT: - RETVAL - -bool -move_volume_up(canvas, id) - SV *canvas; - unsigned int id; - CODE: - RETVAL = _3DScene::move_volume_up((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), id); - OUTPUT: - RETVAL - -bool -move_volume_down(canvas, id) - SV *canvas; - unsigned int id; - CODE: - RETVAL = _3DScene::move_volume_down((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), id); - OUTPUT: - RETVAL - -void -set_objects_selections(canvas, selections) - SV *canvas; - std::vector<int> selections; - CODE: - _3DScene::set_objects_selections((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), selections); - -void -set_config(canvas, config) - SV *canvas; - DynamicPrintConfig *config; - CODE: - _3DScene::set_config((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), config); - -void -set_print(canvas, print) - SV *canvas; - Print *print; - CODE: - _3DScene::set_print((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), print); - -void -set_model(canvas, model) - SV *canvas; - Model *model; - CODE: - _3DScene::set_model((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), model); - -void -set_bed_shape(canvas, shape) - SV *canvas; - Pointfs shape; - CODE: - _3DScene::set_bed_shape((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), shape); - -void -set_auto_bed_shape(canvas) - SV *canvas; - CODE: - _3DScene::set_auto_bed_shape((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -Clone<BoundingBoxf3> -get_volumes_bounding_box(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::get_volumes_bounding_box((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -void -set_axes_length(canvas, length) - SV *canvas; - float length; - CODE: - _3DScene::set_axes_length((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), length); - -void -set_cutting_plane(canvas, z, polygons) - SV *canvas; - float z; - ExPolygons polygons; - CODE: - _3DScene::set_cutting_plane((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), z, polygons); - -void -set_color_by(canvas, value) - SV *canvas; - std::string value; - CODE: - _3DScene::set_color_by((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), value); - -void -set_select_by(canvas, value) - SV *canvas; - std::string value; - CODE: - _3DScene::set_select_by((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), value); - -void -set_drag_by(canvas, value) - SV *canvas; - std::string value; - CODE: - _3DScene::set_drag_by((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), value); - -std::string -get_select_by(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::get_select_by((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -bool -is_layers_editing_enabled(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::is_layers_editing_enabled((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -bool -is_layers_editing_allowed(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::is_layers_editing_allowed((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -bool -is_shader_enabled(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::is_shader_enabled((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -bool -is_reload_delayed(canvas) - SV *canvas; - CODE: - RETVAL = _3DScene::is_reload_delayed((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - OUTPUT: - RETVAL - -void -enable_layers_editing(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_layers_editing((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_warning_texture(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_warning_texture((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_legend_texture(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_legend_texture((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_picking(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_picking((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_moving(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_moving((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_gizmos(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_gizmos((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_shader(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_shader((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_toolbar(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_toolbar((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_force_zoom_to_bed(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_force_zoom_to_bed((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -enable_dynamic_background(canvas, enable) - SV *canvas; - bool enable; - CODE: - _3DScene::enable_dynamic_background((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), enable); - -void -allow_multisample(canvas, allow) - SV *canvas; - bool allow; - CODE: - _3DScene::allow_multisample((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), allow); - -void -enable_toolbar_item(canvas, item, enable) - SV *canvas; - std::string item; - bool enable; - CODE: - _3DScene::enable_toolbar_item((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), item, enable); - -bool -is_toolbar_item_pressed(canvas, item) - SV *canvas; - std::string item; - CODE: - RETVAL = _3DScene::is_toolbar_item_pressed((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), item); - OUTPUT: - RETVAL - -void -zoom_to_bed(canvas) - SV *canvas; - CODE: - _3DScene::zoom_to_bed((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -void -zoom_to_volumes(canvas) - SV *canvas; - CODE: - _3DScene::zoom_to_volumes((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -void -select_view(canvas, direction) - SV *canvas; - std::string direction; - CODE: - _3DScene::select_view((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), direction); - -void -set_viewport_from_scene(canvas, other) - SV *canvas; - SV *other; - CODE: - _3DScene::set_viewport_from_scene((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (wxGLCanvas*)wxPli_sv_2_object(aTHX_ other, "Wx::GLCanvas")); - -void -update_volumes_colors_by_extruder(canvas) - SV *canvas; - CODE: - _3DScene::update_volumes_colors_by_extruder((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -void -update_gizmos_data(canvas) - SV *canvas; - CODE: - _3DScene::update_gizmos_data((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -void -render(canvas) - SV *canvas; - CODE: - _3DScene::render((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); - -std::vector<double> -get_current_print_zs(canvas, active_only) - SV *canvas; - bool active_only; - CODE: - RETVAL = _3DScene::get_current_print_zs((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), active_only); - OUTPUT: - RETVAL - -void -set_toolpaths_range(canvas, low, high) - SV *canvas; - double low; - double high; - CODE: - _3DScene::set_toolpaths_range((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), low, high); - -void -register_on_viewport_changed_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_viewport_changed_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_double_click_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_double_click_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_right_click_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_right_click_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_select_object_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_select_object_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_model_update_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_model_update_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_remove_object_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_remove_object_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_arrange_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_arrange_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_rotate_object_left_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_rotate_object_left_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_rotate_object_right_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_rotate_object_right_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_scale_object_uniformly_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_scale_object_uniformly_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_increase_objects_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_increase_objects_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_decrease_objects_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_decrease_objects_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_instance_moved_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_instance_moved_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_wipe_tower_moved_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_wipe_tower_moved_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_enable_action_buttons_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_enable_action_buttons_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_gizmo_scale_uniformly_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_gizmo_scale_uniformly_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_gizmo_scale_3D_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_gizmo_scale_3D_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_gizmo_rotate_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_gizmo_rotate_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_gizmo_rotate_3D_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_gizmo_rotate_3D_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_gizmo_flatten_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_gizmo_flatten_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_gizmo_flatten_3D_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_gizmo_flatten_3D_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_update_geometry_info_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_update_geometry_info_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_on_update_geometry_3D_info_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_on_update_geometry_3D_info_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_add_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_add_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_delete_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_delete_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_deleteall_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_deleteall_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_arrange_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_arrange_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_more_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_more_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_fewer_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_fewer_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_split_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_split_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_cut_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_cut_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_settings_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_settings_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_layersediting_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_layersediting_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -register_action_selectbyparts_callback(canvas, callback) - SV *canvas; - SV *callback; - CODE: - _3DScene::register_action_selectbyparts_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -void -reset_legend_texture() - CODE: - _3DScene::reset_legend_texture(); - -std::vector<int> -load_model_object(canvas, model_object, obj_idx, instance_idxs) - SV *canvas; - ModelObject *model_object; - int obj_idx; - std::vector<int> instance_idxs; - CODE: - RETVAL = _3DScene::load_object((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), model_object, obj_idx, instance_idxs); - OUTPUT: - RETVAL - -int -get_first_volume_id(canvas, obj_idx) - SV *canvas; - int obj_idx; - CODE: - RETVAL = _3DScene::get_first_volume_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), obj_idx); - OUTPUT: - RETVAL - -int -get_in_object_volume_id(canvas, scene_vol_idx) - SV *canvas; - int scene_vol_idx; - CODE: - RETVAL = _3DScene::get_in_object_volume_id((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), scene_vol_idx); - OUTPUT: - RETVAL - -std::vector<int> -load_model(canvas, model, obj_idx) - SV *canvas; - Model *model; - int obj_idx; - CODE: - RETVAL = _3DScene::load_object((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), model, obj_idx); - OUTPUT: - RETVAL - -void -reload_scene(canvas, force) - SV *canvas; - bool force; - CODE: - _3DScene::reload_scene((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), force); - -void -load_gcode_preview(canvas, preview_data, str_tool_colors) - SV *canvas; - GCodePreviewData *preview_data; - std::vector<std::string> str_tool_colors; - CODE: - _3DScene::load_gcode_preview((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), preview_data, str_tool_colors); - -void -load_preview(canvas, str_tool_colors) - SV *canvas; - std::vector<std::string> str_tool_colors; - CODE: - _3DScene::load_preview((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), str_tool_colors); - -%} diff --git a/xs/xsp/GUI_AppConfig.xsp b/xs/xsp/GUI_AppConfig.xsp deleted file mode 100644 index 08a88883d..000000000 --- a/xs/xsp/GUI_AppConfig.xsp +++ /dev/null @@ -1,46 +0,0 @@ - -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/AppConfig.hpp" -%} - -%name{Slic3r::GUI::AppConfig} class AppConfig { - AppConfig(); - ~AppConfig(); - - void reset(); - void set_defaults(); - - 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()); - } - %}; - bool exists(); - bool dirty(); - - 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); - - void reset_selections(); -}; diff --git a/xs/xsp/GUI_BackgroundSlicingProcess.xsp b/xs/xsp/GUI_BackgroundSlicingProcess.xsp deleted file mode 100644 index 8452b8c31..000000000 --- a/xs/xsp/GUI_BackgroundSlicingProcess.xsp +++ /dev/null @@ -1,25 +0,0 @@ - -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/BackgroundSlicingProcess.hpp" -%} - -%name{Slic3r::GUI::BackgroundSlicingProcess} class BackgroundSlicingProcess { - BackgroundSlicingProcess(); - ~BackgroundSlicingProcess(); - - void set_print(Print *print); - void set_gcode_preview_data(GCodePreviewData *gpd); - void set_sliced_event(int event_id); - void set_finished_event(int event_id); - - void set_output_path(const char *path); - bool start(); - bool stop(); - bool apply_config(DynamicPrintConfig *config) - %code%{ RETVAL = THIS->apply_config(*config); %}; - - bool running(); -}; diff --git a/xs/xsp/GUI_Preset.xsp b/xs/xsp/GUI_Preset.xsp deleted file mode 100644 index 99d23a142..000000000 --- a/xs/xsp/GUI_Preset.xsp +++ /dev/null @@ -1,149 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/Preset.hpp" -#include "slic3r/GUI/PresetBundle.hpp" -#include "slic3r/GUI/PresetHints.hpp" -%} - -%name{Slic3r::GUI::Preset} class Preset { - // owned by PresetCollection, no constructor/destructor - - bool default() %code%{ RETVAL = THIS->is_default; %}; - bool external() %code%{ RETVAL = THIS->is_external; %}; - bool system() %code%{ RETVAL = THIS->is_system; %}; - bool visible() %code%{ RETVAL = THIS->is_visible; %}; - bool dirty() %code%{ RETVAL = THIS->is_dirty; %}; - bool compatible() %code%{ RETVAL = THIS->is_compatible; %}; - bool is_compatible_with_printer(Preset *active_printer) - %code%{ RETVAL = THIS->is_compatible_with_printer(*active_printer); %}; - - std::string name() %code%{ RETVAL = THIS->name; %}; - std::string file() %code%{ RETVAL = THIS->file; %}; - - bool loaded() %code%{ RETVAL = THIS->loaded; %}; - - Ref<DynamicPrintConfig> config() %code%{ RETVAL = &THIS->config; %}; - - void set_num_extruders(int num_extruders); -}; - -%name{Slic3r::GUI::PresetCollection} class PresetCollection { - - Ref<Preset> preset(size_t idx) %code%{ RETVAL = &THIS->preset(idx); %}; - size_t size() const; - size_t num_visible() const; - std::string name() const; - - Ref<Preset> get_selected_preset() %code%{ RETVAL = &THIS->get_selected_preset(); %}; - Ref<Preset> get_current_preset() %code%{ RETVAL = &THIS->get_edited_preset(); %}; - std::string get_current_preset_name() %code%{ RETVAL = THIS->get_selected_preset().name; %}; - Ref<Preset> get_edited_preset() %code%{ RETVAL = &THIS->get_edited_preset(); %}; - - Ref<Preset> find_preset(char *name, bool first_visible_if_not_found = false) %code%{ RETVAL = THIS->find_preset(name, first_visible_if_not_found); %}; - - void update_tab_ui(SV *ui, bool show_incompatible) - %code%{ auto cb = (wxBitmapComboBox*)wxPli_sv_2_object( aTHX_ ui, "Wx::BitmapComboBox" ); - THIS->update_tab_ui(cb, show_incompatible); %}; - - void update_platter_ui(SV *ui) - %code%{ auto cb = (wxBitmapComboBox*)wxPli_sv_2_object( aTHX_ ui, "Wx::BitmapComboBox" ); - THIS->update_platter_ui(cb); %}; - -%{ - -SV* -PresetCollection::arrayref() - CODE: - AV* av = newAV(); - av_fill(av, THIS->size()-1); - for (int i = 0; i < int(THIS->size()); ++ i) { - Preset &preset = THIS->preset(i); - av_store(av, i, perl_to_SV_ref(preset)); - } - RETVAL = newRV_noinc((SV*)av); - OUTPUT: - RETVAL - -%} -}; - -%name{Slic3r::GUI::PresetBundle} class PresetBundle { - PresetBundle(); - ~PresetBundle(); - - void reset(bool delete_files); - - void setup_directories() - %code%{ - try { - THIS->setup_directories(); - } catch (std::exception& e) { - croak("Cannot create configuration directories:\n%s\n", e.what()); - } - %}; - void load_presets(AppConfig *config) - %code%{ - try { - THIS->load_presets(*config); - } catch (std::exception& e) { - croak("Loading of Slic3r presets from %s failed.\n\n%s\n", - Slic3r::data_dir().c_str(), e.what()); - } - %}; - void load_config(const char *name, DynamicPrintConfig *config) - %code%{ - try { - THIS->load_config(name, *config); - } catch (std::exception& e) { - croak("Loading a configuration %s failed:\n%s\n", name, e.what()); - } - %}; - void load_config_file(const char *path) - %code%{ - try { - THIS->load_config_file(path); - } catch (std::exception& e) { - croak("Loading a configuration file %s failed:\n%s\n", path, e.what()); - } - %}; - size_t load_configbundle(const char *path) - %code%{ - try { - RETVAL = THIS->load_configbundle(path, PresetBundle::LOAD_CFGBNDLE_SAVE); - } catch (std::exception& e) { - croak("Loading of a config bundle %s failed:\n%s\n", path, e.what()); - } - %}; - void export_configbundle(char *path) - %code%{ - try { - THIS->export_configbundle(path); - } catch (std::exception& e) { - croak("Export of a config bundle %s failed:\n%s\n", path, e.what()); - } - %}; - - void set_default_suppressed(bool default_suppressed); - - void export_selections(AppConfig *config) %code%{ THIS->export_selections(*config); %}; - void export_selections_pp(PlaceholderParser *pp) %code%{ THIS->export_selections(*pp); %}; - - Ref<PresetCollection> print() %code%{ RETVAL = &THIS->prints; %}; - Ref<PresetCollection> filament() %code%{ RETVAL = &THIS->filaments; %}; - Ref<PresetCollection> sla_material() %code%{ RETVAL = &THIS->sla_materials; %}; - Ref<PresetCollection> printer() %code%{ RETVAL = &THIS->printers; %}; - Ref<DynamicPrintConfig> project_config() %code%{ RETVAL = &THIS->project_config; %}; - - bool has_defauls_only(); - - std::vector<std::string> filament_presets() %code%{ RETVAL = THIS->filament_presets; %}; - void set_filament_preset(int idx, const char *name); - - Clone<DynamicPrintConfig> full_config() %code%{ RETVAL = THIS->full_config(); %}; - - void update_platter_filament_ui(int extruder_idx, SV *ui) - %code%{ auto cb = (wxBitmapComboBox*)wxPli_sv_2_object(aTHX_ ui, "Wx::BitmapComboBox"); - THIS->update_platter_filament_ui(extruder_idx, cb); %}; -}; diff --git a/xs/xsp/GUI_Preview.xsp b/xs/xsp/GUI_Preview.xsp deleted file mode 100644 index da50c0d21..000000000 --- a/xs/xsp/GUI_Preview.xsp +++ /dev/null @@ -1,28 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/GUI_PreviewIface.hpp" -%} - -%name{Slic3r::GUI::Preview} class PreviewIface { - - void register_on_viewport_changed_callback(SV* callback) - %code%{ THIS->register_on_viewport_changed_callback((void*)callback); %}; - - void set_number_extruders(unsigned int number_extruders); - void reset_gcode_preview_data(); - void reload_print(bool force = false); - void set_canvas_as_dirty(); - void set_enabled(bool enabled); - void set_bed_shape(Pointfs shape); - void select_view(std::string direction); - void set_viewport_from_scene(SV *ui) - %code%{ THIS->set_viewport_from_scene((wxGLCanvas*)wxPli_sv_2_object(aTHX_ ui, "Wx::GLCanvas")); %}; - - void set_viewport_into_scene(SV *ui) - %code%{ THIS->set_viewport_into_scene((wxGLCanvas*)wxPli_sv_2_object(aTHX_ ui, "Wx::GLCanvas")); %}; - - void SetDropTarget(SV *ui) - %code%{ THIS->set_drop_target((wxDropTarget*)wxPli_sv_2_object(aTHX_ ui, "Wx::DropTarget")); %}; -};
\ No newline at end of file diff --git a/xs/xsp/GUI_Tab.xsp b/xs/xsp/GUI_Tab.xsp deleted file mode 100644 index bcbdc0d9f..000000000 --- a/xs/xsp/GUI_Tab.xsp +++ /dev/null @@ -1,24 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/TabIface.hpp" -%} - -%name{Slic3r::GUI::Tab} class TabIface { - TabIface(); - ~TabIface(); - void load_current_preset(); - void update_tab_ui(); - void update_ui_from_settings(); - void select_preset(char* name); - void load_config(DynamicPrintConfig* config); - bool current_preset_is_dirty(); - void load_key_value(char* opt_key, char* value); - void OnActivate(); - size_t get_selected_preset_item(); - std::string title(); - Ref<DynamicPrintConfig> get_config(); - Ref<PresetCollection> get_presets(); - std::vector<std::string> get_dependent_tabs(); -}; diff --git a/xs/xsp/ProgressStatusBar.xsp b/xs/xsp/ProgressStatusBar.xsp deleted file mode 100644 index 703a53b67..000000000 --- a/xs/xsp/ProgressStatusBar.xsp +++ /dev/null @@ -1,48 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/GUI/ProgressStatusBar.hpp" -#include "slic3r/GUI/GUI.hpp" -%} - -%name{Slic3r::GUI::ProgressStatusBar} class ProgressStatusBar { - ProgressStatusBar(); - ~ProgressStatusBar(); - - int GetProgress() const - %code%{ RETVAL=THIS->get_progress(); %}; - - void SetProgress(int val) - %code%{ THIS->set_progress(val); %}; - - void SetRange(int val = 100) - %code%{ THIS->set_range(val); %}; - - void ShowProgress(bool show) - %code%{ THIS->show_progress(show); %}; - - void StartBusy(int val = 100) - %code%{ THIS->start_busy(val); %}; - - void StopBusy() - %code%{ THIS->stop_busy(); %}; - - bool IsBusy() const - %code%{ RETVAL=THIS->is_busy(); %}; - - void Run(int rate) - %code%{ THIS->run(rate); %}; - - void Embed() - %code%{ THIS->embed(); %}; - - void SetStatusText(const char *txt) - %code%{ THIS->set_status_text(_(txt)); %}; - - void SetCancelCallback(SV* callback) - %code%{ THIS->m_perl_cancel_callback.register_callback(callback); THIS->show_cancel_button();%}; - void ResetCancelCallback() - %code%{ THIS->m_perl_cancel_callback.deregister_callback(); THIS->hide_cancel_button(); %}; - -};
\ No newline at end of file diff --git a/xs/xsp/Utils_PresetUpdater.xsp b/xs/xsp/Utils_PresetUpdater.xsp deleted file mode 100644 index dc874acab..000000000 --- a/xs/xsp/Utils_PresetUpdater.xsp +++ /dev/null @@ -1,13 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/Utils/PresetUpdater.hpp" -%} - -%name{Slic3r::PresetUpdater} class PresetUpdater { - PresetUpdater(int version_online_event); - void sync(PresetBundle* preset_bundle); - void slic3r_update_notify(); - bool config_update(); -}; diff --git a/xs/xsp/Utils_PrintHost.xsp b/xs/xsp/Utils_PrintHost.xsp deleted file mode 100644 index 59c09c431..000000000 --- a/xs/xsp/Utils_PrintHost.xsp +++ /dev/null @@ -1,12 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include <xsinit.h> -#include "slic3r/Utils/PrintHost.hpp" -%} - -%name{Slic3r::PrintHost} class PrintHost { - bool send_gcode(std::string filename) const; - - static PrintHost* get_print_host(DynamicPrintConfig *config); -}; diff --git a/xs/xsp/my.map b/xs/xsp/my.map index 90a5feaf7..07e4a3799 100644 --- a/xs/xsp/my.map +++ b/xs/xsp/my.map @@ -215,36 +215,6 @@ PrintObjectSupportMaterial* O_OBJECT_SLIC3R Ref<PrintObjectSupportMaterial> O_OBJECT_SLIC3R_T Clone<PrintObjectSupportMaterial> O_OBJECT_SLIC3R_T -AppConfig* O_OBJECT_SLIC3R -Ref<AppConfig> O_OBJECT_SLIC3R_T -BackgroundSlicingProcess* O_OBJECT_SLIC3R -Ref<BackgroundSlicingProcess> O_OBJECT_SLIC3R_T - -GLShader* O_OBJECT_SLIC3R -Ref<GLShader> O_OBJECT_SLIC3R_T -GLVolume* O_OBJECT_SLIC3R -Ref<GLVolume> O_OBJECT_SLIC3R_T -GLVolumeCollection* O_OBJECT_SLIC3R -Ref<GLVolumeCollection> O_OBJECT_SLIC3R_T - -Preset* O_OBJECT_SLIC3R -Ref<Preset> O_OBJECT_SLIC3R_T -PresetCollection* O_OBJECT_SLIC3R -Ref<PresetCollection> O_OBJECT_SLIC3R_T -PresetBundle* O_OBJECT_SLIC3R -Ref<PresetBundle> O_OBJECT_SLIC3R_T -TabIface* O_OBJECT_SLIC3R -Ref<TabIface> O_OBJECT_SLIC3R_T -PreviewIface* O_OBJECT_SLIC3R -Ref<PreviewIface> O_OBJECT_SLIC3R_T -ProgressStatusBar* O_OBJECT_SLIC3R -Ref<ProgressStatusBar> O_OBJECT_SLIC3R_T - -PresetUpdater* O_OBJECT_SLIC3R -Ref<PresetUpdater> O_OBJECT_SLIC3R_T - -PrintHost* O_OBJECT_SLIC3R - Axis T_UV ExtrusionLoopRole T_UV ExtrusionRole T_UV diff --git a/xs/xsp/typemap.xspt b/xs/xsp/typemap.xspt index 0209ce92d..121033db4 100644 --- a/xs/xsp/typemap.xspt +++ b/xs/xsp/typemap.xspt @@ -194,36 +194,14 @@ %typemap{ModelInstancePtrs*}; %typemap{Ref<ModelInstancePtrs>}{simple}; %typemap{Clone<ModelInstancePtrs>}{simple}; -%typemap{AppConfig*}; -%typemap{Ref<AppConfig>}{simple}; -%typemap{BackgroundSlicingProcess*}; -%typemap{Ref<BackgroundSlicingProcess>}{simple}; -%typemap{GLShader*}; -%typemap{Ref<GLShader>}{simple}; -%typemap{GLVolume*}; -%typemap{Ref<GLVolume>}{simple}; -%typemap{GLVolumeCollection*}; -%typemap{Ref<GLVolumeCollection>}{simple}; -%typemap{Preset*}; -%typemap{Ref<Preset>}{simple}; -%typemap{PresetCollection*}; -%typemap{Ref<PresetCollection>}{simple}; -%typemap{PresetBundle*}; -%typemap{Ref<PresetBundle>}{simple}; -%typemap{PresetUpdater*}; -%typemap{Ref<PresetUpdater>}{simple}; %typemap{PresetHints*}; %typemap{Ref<PresetHints>}{simple}; -%typemap{TabIface*}; -%typemap{PreviewIface*}; -%typemap{ProgressStatusBar*}; %typemap{PrintRegionPtrs*}; %typemap{PrintObjectPtrs*}; %typemap{LayerPtrs*}; %typemap{SupportLayerPtrs*}; - %typemap{Axis}{parsed}{ %cpp_type{Axis}; %precall_code{% @@ -272,6 +250,3 @@ $CVar = (PrintObjectStep)SvUV($PerlVar); %}; }; -%typemap{AppController*}; -%typemap{PrintController*}; -%typemap{PrintHost*}; |