forked from mitsuba-renderer/nanogui
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprogressbar.h
More file actions
37 lines (28 loc) · 934 Bytes
/
progressbar.h
File metadata and controls
37 lines (28 loc) · 934 Bytes
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
/*
nanogui/progressbar.h -- Standard widget for visualizing progress
NanoGUI was developed by Wenzel Jakob <wenzel.jakob@epfl.ch>.
The widget drawing code is based on the NanoVG demo application
by Mikko Mononen.
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE.txt file.
*/
/** \file */
#pragma once
#include <nanogui/widget.h>
NAMESPACE_BEGIN(nanogui)
/**
* \class ProgressBar progressbar.h nanogui/progressbar.h
*
* \brief Standard widget for visualizing progress.
*/
class NANOGUI_EXPORT ProgressBar : public Widget {
public:
ProgressBar(Widget *parent);
float value() { return m_value; }
void set_value(float value) { m_value = value; }
virtual void draw(NVGcontext* ctx) override;
protected:
virtual Vector2i preferred_size_impl(NVGcontext *ctx) const override;
float m_value;
};
NAMESPACE_END(nanogui)