35 lines
853 B
C++
35 lines
853 B
C++
/*
|
|
nanogui/progressbar.h -- Standard widget for visualizing progress
|
|
|
|
NanoGUI was developed by Wenzel Jakob <wenzel@inf.ethz.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.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <nanogui/widget.h>
|
|
|
|
NAMESPACE_BEGIN(nanogui)
|
|
|
|
class NANOGUI_EXPORT ProgressBar : public Widget {
|
|
public:
|
|
ProgressBar(Widget *parent);
|
|
|
|
float value() { return mValue; }
|
|
void setValue(float value) { mValue = value; }
|
|
|
|
virtual Vector2i preferredSize(NVGcontext *ctx) const;
|
|
virtual void draw(NVGcontext* ctx);
|
|
|
|
virtual void save(Serializer &s) const;
|
|
virtual bool load(Serializer &s);
|
|
protected:
|
|
float mValue;
|
|
};
|
|
|
|
NAMESPACE_END(nanogui)
|