]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/text.h
Use separate widget class for Dialog
[libs/gltk.git] / source / text.h
index f688d4936d90d6354a56d07bac9163da74b52ccb..243c3a617f6cf2806a2272caf71cf4a44f45121e 100644 (file)
@@ -49,6 +49,7 @@ public:
        const std::string &get() const { return text; }
        unsigned size() const { return text.size(); }
        unsigned get_n_lines() const { return lines.size(); }
+       unsigned get_visible_lines(const Part &, const Geometry &, unsigned *) const;
        unsigned get_line_length(unsigned) const;
        void offset_to_coords(unsigned, unsigned &, unsigned &) const;
        unsigned coords_to_offset(unsigned, unsigned) const;
@@ -61,8 +62,8 @@ public:
 private:
        void find_lines();
 
-       template<typename T, void (Text::*)(unsigned, const Geometry &, T &) const>
-       void process_lines(const Part &, const Geometry &, unsigned, T &) const;
+       template<typename T>
+       void process_lines(const Part &, const Geometry &, unsigned, void (Text::*)(unsigned, const Geometry &, T &) const, T &) const;
 
        void build_line(unsigned, const Geometry &, RenderData &) const;
        void coords_to_geom_line(unsigned, const Geometry &, CoordsToGeomData &) const;