X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftext.h;h=6ddbb231b37871089f90e6cc90ecfa3ba1a735e9;hb=2aa99730d8c3106deeac1186e057055604835752;hp=c49b167a844945d3a55cab385e9bbb5fa7c2f502;hpb=8d09cdc5e642af9a2e1210ce708790c5b41cb585;p=libs%2Fgltk.git diff --git a/source/text.h b/source/text.h index c49b167..6ddbb23 100644 --- a/source/text.h +++ b/source/text.h @@ -22,6 +22,7 @@ private: struct Line { unsigned start; + unsigned bytes; unsigned length; unsigned width; }; @@ -49,7 +50,9 @@ 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; + unsigned move_offset(unsigned, int) const; void offset_to_coords(unsigned, unsigned &, unsigned &) const; unsigned coords_to_offset(unsigned, unsigned) const; Geometry coords_to_geometry(const Part &, const Geometry &, unsigned, unsigned, unsigned) const; @@ -60,6 +63,8 @@ public: Text &operator=(const std::string &); private: void find_lines(); + unsigned count_characters(unsigned, unsigned) const; + void check_alignment(unsigned) const; template void process_lines(const Part &, const Geometry &, unsigned, void (Text::*)(unsigned, const Geometry &, T &) const, T &) const;