]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/text.h
Cache widget parts in meshes
[libs/gltk.git] / source / text.h
index 077558bb84a34b27e7ceba181fad311a57abb031..dc5710bdc2dddd6789de34d0c7ba2ee4816b0878 100644 (file)
@@ -7,6 +7,7 @@
 namespace Msp {
 namespace GLtk {
 
+class CachedPart;
 class Geometry;
 class Part;
 class Style;
@@ -51,7 +52,8 @@ public:
        unsigned coords_to_offset(unsigned, unsigned) const;
        Geometry coords_to_geometry(const Part &, const Geometry &, unsigned, unsigned, unsigned) const;
 
-       void render(const Part &, const Geometry &, unsigned = 0) const;
+       void build(const Part &, const Geometry &, CachedPart &) const;
+       void build(const Part &, const Geometry &, unsigned, CachedPart &) const;
 
        Text &operator=(const std::string &);
 private:
@@ -60,7 +62,7 @@ private:
        template<typename T, void (Text::*)(unsigned, const Geometry &, T &) const>
        void process_lines(const Part &, const Geometry &, unsigned, T &) const;
 
-       void render_line(unsigned, const Geometry &, RenderData &) const;
+       void build_line(unsigned, const Geometry &, RenderData &) const;
        void coords_to_geom_line(unsigned, const Geometry &, CoordsToGeomData &) const;
 };