diff options
author | sgeerken <devnull@localhost> | 2012-06-27 16:12:17 +0200 |
---|---|---|
committer | sgeerken <devnull@localhost> | 2012-06-27 16:12:17 +0200 |
commit | d3dd7eb3379c495cfd9a138d36e40a410188f202 (patch) | |
tree | 28506b276d4705780475af1a9dd611f04f157822 /lout | |
parent | 8549cdf4519e800fb0f56ebb48490a6e202418cf (diff) |
First version of automatic hyphenation. (Still a large number of bugs.)
Diffstat (limited to 'lout')
-rw-r--r-- | lout/misc.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lout/misc.hh b/lout/misc.hh index 05b87602..1f558814 100644 --- a/lout/misc.hh +++ b/lout/misc.hh @@ -167,6 +167,15 @@ public: this->resize (); } + inline void insert(int index, int numInsert) { + // TODO "transparent delay", for hyphenation + assert (numInsert >= 0); + this->num += numInsert; + this->resize (); + for (int i = this->num - 1; i >= index + numInsert; i--) + array[i] = array[i - numInsert]; + } + /** * \brief Set the size explicitly and initialize new values. * |