aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/textblock.hh')
-rw-r--r--dw/textblock.hh19
1 files changed, 9 insertions, 10 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh
index 42286134..7c4f8820 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -212,15 +212,6 @@ private:
};
protected:
- enum {
- /**
- * The penalty for hyphens, multiplied by 100. So, 100 means
- * 1.0. See dw::Textblock::BadnessAndPenalty::setPenalty for
- * more details.
- */
- HYPHEN_BREAK = 100
- };
-
struct Line
{
int firstWord; /* first word's index in word vector */
@@ -363,6 +354,14 @@ protected:
bool mustQueueResize;
+ /**
+ * The penalty for hyphens, multiplied by 100. So, 100 means
+ * 1.0. INT_MAX and INT_MIN are also allowed. See
+ * dw::Textblock::BadnessAndPenalty::setPenalty for more
+ * details. Set from preferences.
+ */
+ int penaltyHyphen;
+
bool limitTextWidth; /* from preferences */
int redrawY;
@@ -527,7 +526,7 @@ protected:
public:
static int CLASS_ID;
- Textblock(bool limitTextWidth);
+ Textblock(bool limitTextWidth, int penaltyHyphen);
~Textblock();
core::Iterator *iterator (core::Content::Type mask, bool atEnd);