summaryrefslogtreecommitdiff
path: root/dw/textblock.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/textblock.hh')
-rw-r--r--dw/textblock.hh21
1 files changed, 10 insertions, 11 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh
index 3254b843..44fa8a57 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -130,7 +130,7 @@ namespace dw {
* widget:
*
* <ul>
- * <li> The available size of the widget has changed, e.g., because the
+ * <li> The line break size of the widget has changed, e.g., because the
* user has changed the size of the browser window. In this case,
* it is necessary to rewrap all the lines.
*
@@ -489,7 +489,7 @@ protected:
* (which is used by DwTable!), and
* (ii) line1_offset is ignored (line1_offset_eff is set to 0),
* when line1_offset plus the width of the first word is
- * greater than the the available witdh.
+ * greater than the the line break witdh.
*
* \todo Eliminate all these ad-hoc features by a new, simpler and
* more elegant design. ;-)
@@ -516,8 +516,8 @@ protected:
int redrawY;
int lastWordDrawn;
- /* These values are set by set_... */
- int availWidth, availAscent, availDescent;
+ /* This value is (currently) set by setAscent(). */
+ int lineBreakWidth;
// Additional vertical offset, used for the "clear" attribute.
int verticalOffset;
@@ -737,7 +737,7 @@ protected:
void moveWordIndices (int wordIndex, int num, int *addIndex1 = NULL);
void accumulateWordForLine (int lineIndex, int wordIndex);
void accumulateWordData (int wordIndex);
- int calcAvailWidth (int lineIndex);
+ int calcLineBreakWidth (int lineIndex);
void initLine1Offset (int wordIndex);
void alignLine (int lineIndex);
@@ -748,11 +748,12 @@ protected:
void markSizeChange (int ref);
void markExtremesChange (int ref);
+
void notifySetAsTopLevel();
void notifySetParent();
- void setWidth (int width);
- void setAscent (int ascent);
- void setDescent (int descent);
+
+ bool isBlockLevel ();
+
void draw (core::View *view, core::Rectangle *area);
bool buttonPressImpl (core::EventButton *event);
@@ -814,9 +815,7 @@ public:
queueResize (-1, extremesChanged);
DBG_OBJ_MSG_END ();
}
- inline int getAvailWidth () { return availWidth; }
- inline int getAvailAscent () { return availAscent; }
- inline int getAvailDescent () { return availDescent; }
+ inline int getLineBreakWidth () { return lineBreakWidth; }
};
#define DBG_SET_WORD_PENALTY(n, i, is) \