]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Remove unnecessary destructors from exception classes
[libs/gltk.git] / source / widget.h
index a94198416a29776bb6eecf6fe3a0305436d2b116..14d15fc7a5678a33fed2062b81d530719e62cabc 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/gl/renderer.h>
 #include "geometry.h"
 #include "inputmethod.h"
+#include "mspgltk_api.h"
 #include "partcache.h"
 #include "state.h"
 
@@ -20,7 +21,7 @@ class Style;
 /**
 Base class for all widgets.
 */
-class Widget
+class MSPGLTK_API Widget
 {
        friend class Container;
 
@@ -46,17 +47,17 @@ public:
 protected:
        Geometry geom;
        std::string style_name;
-       const Style *style;
-       State state;
-       bool visible;
-       InputType input_type;
-       Container *parent;
+       const Style *style = nullptr;
+       State state = NORMAL;
+       bool visible = true;
+       InputType input_type = INPUT_NONE;
+       Container *parent = nullptr;
        std::string tooltip;
        PartCache part_cache;
-       bool rebuild_needed;
+       bool rebuild_needed = false;
        Time::TimeDelta anim_interval;
 
-       Widget();
+       Widget() = default;
 private:
        Widget(const Widget &);
        Widget &operator=(const Widget &);