X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.h;h=eb8fa2324350b42335eb92a0bd8aec7fc70e2f7b;hb=HEAD;hp=a94198416a29776bb6eecf6fe3a0305436d2b116;hpb=771764f735ffe01cb170a10b24eb7dfc2a81b34d;p=libs%2Fgltk.git diff --git a/source/widget.h b/source/widget.h index a941984..001da84 100644 --- a/source/widget.h +++ b/source/widget.h @@ -2,10 +2,12 @@ #define MSP_GLTK_WIDGET_H_ #include +#include #include #include #include "geometry.h" #include "inputmethod.h" +#include "mspgltk_api.h" #include "partcache.h" #include "state.h" @@ -20,7 +22,7 @@ class Style; /** Base class for all widgets. */ -class Widget +class MSPGLTK_API Widget: public NonCopyable { friend class Container; @@ -29,6 +31,7 @@ public: { public: Loader(Widget &); + private: void position(int, int); void size(unsigned, unsigned); @@ -46,20 +49,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();