X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.h;h=fc517989364c899a4d315585ad2de04552653eaa;hb=762a689d799075c0a10e1633bf95d53de80b4572;hp=19db87985780223df3a85b51e6f1b5eae77aac72;hpb=56c41b294aa47a38ac3e1be70d4868f260cb4274;p=libs%2Fgltk.git diff --git a/source/widget.h b/source/widget.h index 19db879..fc51798 100644 --- a/source/widget.h +++ b/source/widget.h @@ -2,6 +2,7 @@ #define MSP_GLTK_WIDGET_H_ #include +#include #include #include #include "geometry.h" @@ -21,7 +22,7 @@ class Style; /** Base class for all widgets. */ -class MSPGLTK_API Widget +class MSPGLTK_API Widget: public NonCopyable { friend class Container; @@ -47,20 +48,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(); -private: - Widget(const Widget &); - Widget &operator=(const Widget &); + Widget() = default; public: virtual ~Widget();