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

ProgressIndicator.hpp « GUI « slic3r « src - github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 674a81ba2674a3e4e0a7039aa5f5c357d75971ca (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
#ifndef IPROGRESSINDICATOR_HPP
#define IPROGRESSINDICATOR_HPP

#include <string>
#include <functional>

namespace Slic3r {

/**
 * @brief Generic progress indication interface.
 */
class ProgressIndicator {
public:
    
    /// Cancel callback function type
    using CancelFn = std::function<void()>;
    
    virtual ~ProgressIndicator() = default;
    
    virtual void set_range(int range) = 0;
    virtual void set_cancel_callback(CancelFn = CancelFn()) = 0;
    virtual void set_progress(int pr) = 0;
    virtual void set_status_text(const char *) = 0; // utf8 char array
    virtual int  get_range() const = 0;
};

}

#endif // IPROGRESSINDICATOR_HPP