mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
1st installment of preview ported in c++
This commit is contained in:
parent
5fa99fd903
commit
e3e5948982
13 changed files with 718 additions and 10 deletions
|
@ -59,6 +59,9 @@ void show_error_id(int id, std::string 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(); %};
|
||||
|
||||
|
|
28
xs/xsp/GUI_Preview.xsp
Normal file
28
xs/xsp/GUI_Preview.xsp
Normal file
|
@ -0,0 +1,28 @@
|
|||
%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")); %};
|
||||
};
|
|
@ -235,10 +235,12 @@ 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
|
||||
ProgressStatusBar* O_OBJECT_SLIC3R
|
||||
Ref<ProgressStatusBar> 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
|
||||
|
|
|
@ -215,6 +215,7 @@
|
|||
%typemap{PresetHints*};
|
||||
%typemap{Ref<PresetHints>}{simple};
|
||||
%typemap{TabIface*};
|
||||
%typemap{PreviewIface*};
|
||||
%typemap{ProgressStatusBar*};
|
||||
|
||||
%typemap{PrintRegionPtrs*};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue