X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftext.h;h=0e1afaebd198b3230736d38bf1c198b7cc4dc25c;hb=ef4660c4bdf38e126e13b426649fc2f997027b65;hp=d964aa19bbf4575ce7d10c9ceea743d38a15017c;hpb=6081ed9020ad22214a8e5b3829092f97b12d7c71;p=libs%2Fgltk.git diff --git a/source/text.h b/source/text.h index d964aa1..0e1afae 100644 --- a/source/text.h +++ b/source/text.h @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of libmspgltk +Copyright © 2009-2010 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #ifndef MSP_GLTK_TEXT_H_ #define MSP_GLTK_TEXT_H_ @@ -42,6 +49,11 @@ public: void insert(unsigned, const std::string &); const std::string &get() const { return text; } unsigned size() const { return text.size(); } + unsigned get_n_lines() const { return lines.size(); } + unsigned get_line_length(unsigned) const; + void offset_to_coords(unsigned, unsigned &, unsigned &) const; + unsigned coords_to_offset(unsigned, unsigned) const; + Geometry coords_to_geometry(unsigned, unsigned) const; void render(const Part &, const Geometry &) const;