]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/progressbar.h
Use the override specifier when overriding a virtual function
[libs/gltk.git] / source / progressbar.h
index c1e17b56890a613d967e21550e0780a7082a2049..756219244453279b9e885996b230e12caae3ddd5 100644 (file)
@@ -1,28 +1,27 @@
 #ifndef MSP_GLTK_PROGRESSBAR_H_
 #define MSP_GLTK_PROGRESSBAR_H_
 
+#include "mspgltk_api.h"
 #include "widget.h"
 
 namespace Msp {
 namespace GLtk {
 
-class ProgressBar: public Widget
+class MSPGLTK_API ProgressBar: public Widget
 {
 private:
-       float range;
-       float fraction;
+       float range = 1.0f;
+       float fraction = 0.0f;
 
 public:
-       ProgressBar();
-
-       virtual const char *get_class() const { return "progressbar"; }
+       const char *get_class() const override { return "progressbar"; }
 
        void set_range(float);
        void set_value(float);
 
 private:
-       virtual void autosize_special(const Part &, Geometry &) const;
-       virtual void rebuild_special(const Part &);
+       void autosize_special(const Part &, Geometry &) const override;
+       void rebuild_special(const Part &) override;
 };
 
 } // namespace GLtk