Blender V5.0
ProgressBar.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11
12#include <string>
13
14#include "MEM_guardedalloc.h"
15
16using namespace std;
17
18namespace Freestyle {
19
21 public:
22 inline ProgressBar()
23 {
25 _progress = 0;
26 }
27
28 virtual ~ProgressBar() {}
29
30 virtual void reset()
31 {
33 _progress = 0;
34 }
35
36 virtual void setTotalSteps(uint n)
37 {
39 }
40
41 virtual void setProgress(uint i)
42 {
43 _progress = i;
44 }
45
46 virtual void setLabelText(const string &s)
47 {
48 _label = s;
49 }
50
52 inline uint getTotalSteps() const
53 {
54 return _numtotalsteps;
55 }
56
57 inline uint getProgress() const
58 {
59 return _progress;
60 }
61
62 inline string getLabelText() const
63 {
64 return _label;
65 }
66
67 protected:
70 string _label;
71
72 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ProgressBar")
73};
74
75} /* namespace Freestyle */
unsigned int uint
Read Guarded memory(de)allocation.
virtual void setLabelText(const string &s)
Definition ProgressBar.h:46
string getLabelText() const
Definition ProgressBar.h:62
uint getTotalSteps() const
Definition ProgressBar.h:52
virtual void reset()
Definition ProgressBar.h:30
virtual void setTotalSteps(uint n)
Definition ProgressBar.h:36
virtual void setProgress(uint i)
Definition ProgressBar.h:41
uint getProgress() const
Definition ProgressBar.h:57
inherits from class Rep
Definition AppCanvas.cpp:20
i
Definition text_draw.cc:230