]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/text.h
Make the Text class interface more obvious by not using a reference to pointer
[libs/gltk.git] / source / text.h
index 7be119216aae4086210e8cfec8133be9b65a2c8d..d964aa19bbf4575ce7d10c9ceea743d38a15017c 100644 (file)
@@ -24,13 +24,15 @@ private:
                unsigned width;
        };
 
-       const Style *const &style;
+       const Style *style;
        std::string text;
        std::vector<Line> lines;
 
 public:
-       Text(const Style *const &);
-       Text(const Style *const &, const std::string &);
+       Text();
+       Text(const Style &, const std::string &);
+
+       void set_style(const Style *);
 
        unsigned get_width() const;
        unsigned get_height() const;
@@ -41,8 +43,6 @@ public:
        const std::string &get() const { return text; }
        unsigned size() const { return text.size(); }
 
-       void update_style();
-
        void render(const Part &, const Geometry &) const;
 
        Text &operator=(const std::string &);