Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ProgressStatusBar.xsp « xsp « xs - github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 703a53b6793eef34f965f35b9fa0d467946fca9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
%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(); %};

};