mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
Merge remote-tracking branch 'origin/dev' into new_main_page_ui
This commit is contained in:
commit
73ee3f77c3
86 changed files with 4884 additions and 2922 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "slic3r/AppController.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/Print.hpp"
|
||||
#include "slic3r/GUI/ProgressStatusBar.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::PrintController} class PrintController {
|
||||
|
|
@ -22,7 +23,7 @@
|
|||
PrintController *print_ctl();
|
||||
void set_model(Model *model);
|
||||
void set_print(Print *print);
|
||||
void set_global_progress_indicator(unsigned gauge_id, unsigned statusbar_id);
|
||||
void set_global_progress_indicator(ProgressStatusBar *prs);
|
||||
|
||||
void arrange_model();
|
||||
};
|
||||
|
|
@ -147,10 +147,7 @@ void select_current_object(int idx)
|
|||
|
||||
void remove_obj()
|
||||
%code%{ Slic3r::GUI::remove(); %};
|
||||
|
||||
void update_rotation_value(double angle, const char *axis)
|
||||
%code%{ Slic3r::GUI::update_rotation_value(angle, axis); %};
|
||||
|
||||
|
||||
std::string fold_utf8_to_ascii(const char *src)
|
||||
%code%{ RETVAL = Slic3r::fold_utf8_to_ascii(src); %};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@
|
|||
int volume_idx() const;
|
||||
int instance_idx() const;
|
||||
Clone<Vec3d> origin() const
|
||||
%code%{ RETVAL = THIS->get_origin(); %};
|
||||
%code%{ RETVAL = THIS->get_offset(); %};
|
||||
void translate(double x, double y, double z)
|
||||
%code%{ THIS->set_origin(THIS->get_origin() + Vec3d(x, y, z)); %};
|
||||
%code%{ THIS->set_offset(THIS->get_offset() + Vec3d(x, y, z)); %};
|
||||
Clone<BoundingBoxf3> bounding_box() const
|
||||
%code%{ RETVAL = THIS->bounding_box; %};
|
||||
|
||||
|
|
@ -337,6 +337,14 @@ set_drag_by(canvas, 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;
|
||||
|
|
@ -643,6 +651,13 @@ register_on_gizmo_rotate_callback(canvas, callback)
|
|||
CODE:
|
||||
_3DScene::register_on_gizmo_rotate_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_update_geometry_info_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
|
|
@ -720,6 +735,13 @@ register_action_layersediting_callback(canvas, 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:
|
||||
|
|
@ -736,6 +758,15 @@ load_model_object(canvas, 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
|
||||
|
||||
std::vector<int>
|
||||
load_model(canvas, model, obj_idx)
|
||||
SV *canvas;
|
||||
|
|
|
|||
48
xs/xsp/ProgressStatusBar.xsp
Normal file
48
xs/xsp/ProgressStatusBar.xsp
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "slic3r/GUI/ProgressStatusBar.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(std::string txt)
|
||||
%code%{ THIS->set_status_text(txt); %};
|
||||
|
||||
void ShowCancelButton()
|
||||
%code%{ THIS->show_cancel_button(); %};
|
||||
|
||||
void HideCancelButton()
|
||||
%code%{ THIS->hide_cancel_button(); %};
|
||||
|
||||
};
|
||||
|
|
@ -233,8 +233,10 @@ 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
|
||||
TabIface* O_OBJECT_SLIC3R
|
||||
Ref<TabIface> O_OBJECT_SLIC3R_T
|
||||
ProgressStatusBar* O_OBJECT_SLIC3R
|
||||
Ref<ProgressStatusBar> O_OBJECT_SLIC3R_T
|
||||
|
||||
PresetUpdater* O_OBJECT_SLIC3R
|
||||
Ref<PresetUpdater> O_OBJECT_SLIC3R_T
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@
|
|||
%typemap{PresetHints*};
|
||||
%typemap{Ref<PresetHints>}{simple};
|
||||
%typemap{TabIface*};
|
||||
%typemap{ProgressStatusBar*};
|
||||
|
||||
%typemap{PrintRegionPtrs*};
|
||||
%typemap{PrintObjectPtrs*};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue