2018-08-29 16:02:10 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <xsinit.h>
|
|
|
|
#include "slic3r/GUI/ProgressStatusBar.hpp"
|
2018-09-17 13:12:13 +00:00
|
|
|
#include "slic3r/GUI/GUI.hpp"
|
2018-08-29 16:02:10 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%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); %};
|
|
|
|
|
2018-08-30 09:40:06 +00:00
|
|
|
void Embed()
|
|
|
|
%code%{ THIS->embed(); %};
|
|
|
|
|
2018-09-12 11:17:47 +00:00
|
|
|
void SetStatusText(const char *txt)
|
2018-09-17 13:12:13 +00:00
|
|
|
%code%{ THIS->set_status_text(_(txt)); %};
|
2018-08-30 09:40:06 +00:00
|
|
|
|
2018-09-14 08:59:50 +00:00
|
|
|
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(); %};
|
2018-08-29 16:02:10 +00:00
|
|
|
|
|
|
|
};
|