Merge remote-tracking branch 'origin/cpp_progress_status_bar' into dev

# Conflicts:
#	lib/Slic3r/GUI/MainFrame.pm
#	xs/src/slic3r/AppController.cpp
#	xs/src/slic3r/AppControllerWx.cpp
#	xs/src/slic3r/GUI/GUI.hpp
This commit is contained in:
tamasmeszaros 2018-08-30 15:21:41 +02:00
commit 4f53fc2a5f
21 changed files with 375 additions and 729 deletions

View file

@ -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();
};

View 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(); %};
};

View file

@ -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

View file

@ -213,6 +213,7 @@
%typemap{PresetHints*};
%typemap{Ref<PresetHints>}{simple};
%typemap{TabIface*};
%typemap{ProgressStatusBar*};
%typemap{PrintRegionPtrs*};
%typemap{PrintObjectPtrs*};