]> 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 46bd18f9075844cf7401bd7193119e817e0fd8ff..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;
@@ -44,7 +46,8 @@ public:
        void render(const Part &, const Geometry &) const;
 
        Text &operator=(const std::string &);
-       //operator const std::string &() const { return text; }
+private:
+       void find_lines();
 };
 
 } // namespace GLtk