aboutsummaryrefslogtreecommitdiff
path: root/lout
diff options
context:
space:
mode:
authorsgeerken <devnull@localhost>2012-06-27 16:12:17 +0200
committersgeerken <devnull@localhost>2012-06-27 16:12:17 +0200
commitd3dd7eb3379c495cfd9a138d36e40a410188f202 (patch)
tree28506b276d4705780475af1a9dd611f04f157822 /lout
parent8549cdf4519e800fb0f56ebb48490a6e202418cf (diff)
First version of automatic hyphenation. (Still a large number of bugs.)
Diffstat (limited to 'lout')
-rw-r--r--lout/misc.hh9
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.
*