1 #ifndef __DW_TEXTBLOCK_HH__
2 #define __DW_TEXTBLOCK_HH__
7 #include "../lout/misc.hh"
11 #define PRINTF(fmt, ...)
232 int totalWidth, idealWidth, totalStretchability, totalShrinkability;
266 int totalStretchability,
int totalShrinkability);
315 void setData (
int xWordWidget,
int lineNo);
318 void getBgArea (
int *x,
int *y,
int *width,
int *height);
319 void getRefArea (
int *xRef,
int *yRef,
int *widthRef,
int *heightRef);
321 void draw (
int x,
int y,
int width,
int height);
330 void getBgArea (
int *x,
int *y,
int *width,
int *height);
403 {
return borderAscent + borderDescent
624 int widgetMargin,
int lineBorderTotal,
625 int lineMarginTotal);
628 Line *
addLine (
int firstWord,
int lastWord,
int newLastOofPos,
629 bool temporary,
int minHeight);
639 int x,
int yBase,
int width);
642 const char *text,
int start,
int len,
bool isStart,
646 void drawWord0 (
int wordIndex1,
int wordIndex2,
647 const char *text,
int totalWidth,
bool drawHyphen,
651 int xWidget,
int yWidgetBase);
672 void fillWord (
int wordNo,
int width,
int ascent,
int descent,
676 int breakPenalty1,
int breakPenalty2,
bool forceBreak);
680 int textWidth (
const char *text,
int start,
int len,
749 if (lines->
size() == 0)
775 virtual int wordWrap (
int wordIndex,
bool wrapAll);
780 int *searchUntil,
bool tempNewLine,
781 int penaltyIndex,
bool borderIsCalculated,
782 bool *thereWillBeMoreSpace,
bool wrapAll,
783 int *diffWords,
int *wordIndexEnd,
784 int *lastFloatPos,
bool regardBorder,
785 int *height,
int *breakPos);
786 int searchBreakPos (
int wordIndex,
int firstIndex,
int *searchUntil,
787 bool tempNewLine,
int penaltyIndex,
788 bool thereWillBeMoreSpace,
bool wrapAll,
789 int *diffWords,
int *wordIndexEnd,
790 int *addIndex1 = NULL);
791 int searchMinBap (
int firstWord,
int lastWordm,
int penaltyIndex,
792 bool thereWillBeMoreSpace,
bool correctAtEnd);
820 Widget **references,
int *x,
int *y);
861 int numBreaks,
int *breakPos,
889 {
addText (text, strlen(text), style); }
900 bool includeFirstSpace,
bool includeLastSpace);
915 #define DBG_SET_WORD_PENALTY(n, i, is) \
917 if (words->getRef(n)->badnessAndPenalty.getPenalty (i) == INT_MIN) \
918 DBG_OBJ_ARRATTRSET_SYM ("words", n, "penalty." is, "-inf"); \
919 else if (words->getRef(n)->badnessAndPenalty.getPenalty (i) == INT_MAX) \
920 DBG_OBJ_ARRATTRSET_SYM ("words", n, "penalty." is, "inf"); \
922 DBG_OBJ_ARRATTRSET_NUM ("words", n, "penalty." is, \
923 words->getRef(n)->badnessAndPenalty \
928 #define DBG_OBJ_ARRATTRSET_WREF(var, ind, attr, wref) \
929 RTFL_OBJ_PRINT ("set", "p:s.d.s:p (p, d)", this, var, ind, attr, wref, \
930 wref->widget, wref->parentRef)
932 #define DBG_OBJ_ARRATTRSET_WREF(var, ind, attr, wref) STMT_NOP
935 #define DBG_SET_WORD(n) \
937 switch (words->getRef(n)->content.type) { \
938 case ::dw::core::Content::TEXT: \
939 DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "TEXT"); \
940 DBG_OBJ_ARRATTRSET_STR ("words", n, \
941 "text/widget/widgetReference/breakSpace", \
942 words->getRef(n)->content.text); \
944 case ::dw::core::Content::WIDGET_IN_FLOW: \
945 DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "WIDGET_IN_FLOW"); \
946 DBG_OBJ_ARRATTRSET_PTR ("words", n, \
947 "text/widget/widgetReference/breakSpace", \
948 words->getRef(n)->content.widget); \
950 case ::dw::core::Content::WIDGET_OOF_REF: \
951 DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "WIDGET_OOF_REF"); \
952 DBG_OBJ_ARRATTRSET_WREF ("words", n, \
953 "text/widget/widgetReference/breakSpace", \
954 words->getRef(n)->content.widgetReference); \
956 case ::dw::core::Content::BREAK: \
957 DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "BREAK"); \
958 DBG_OBJ_ARRATTRSET_NUM ("words", n, \
959 "text/widget/widgetReference/breakSpace", \
960 words->getRef(n)->content.breakSpace); \
963 DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "???"); \
964 DBG_OBJ_ARRATTRSET_SYM ("words", n, \
965 "text/widget/widgetReference/breakSpace", \
968 DBG_SET_WORD_PENALTY (n, 0, "0"); \
969 DBG_SET_WORD_PENALTY (n, 1, "1"); \
972 #define DBG_SET_WORD_SIZE(n) \
974 DBG_OBJ_ARRATTRSET_NUM ("words", n, "size.width", \
975 words->getRef(n)->size.width); \
976 DBG_OBJ_ARRATTRSET_NUM ("words", n, "size.ascent", \
977 words->getRef(n)->size.ascent); \
978 DBG_OBJ_ARRATTRSET_NUM ("words", n, "size.descent", \
979 words->getRef(n)->size.descent); \
982 #define DBG_MSG_WORD(aspect, prio, prefix, n, suffix) \
984 if ((n) < 0 || (n) >= words->size ()) \
985 DBG_OBJ_MSG (aspect, prio, prefix "undefined (wrong index)" suffix); \
987 switch (words->getRef(n)->content.type) { \
988 case ::dw::core::Content::TEXT: \
989 DBG_OBJ_MSGF (aspect, prio, prefix "TEXT / \"%s\"" suffix, \
990 words->getRef(n)->content.text); \
992 case ::dw::core::Content::WIDGET_IN_FLOW: \
993 DBG_OBJ_MSGF (aspect, prio, prefix "WIDGET_IN_FLOW / %p" suffix, \
994 words->getRef(n)->content.widget); \
996 case ::dw::core::Content::WIDGET_OOF_REF: \
997 DBG_OBJ_MSGF (aspect, prio, \
998 prefix "WIDGET_OOF_REF / %p (%p, %d)" suffix,\
999 words->getRef(n)->content.widgetReference, \
1000 words->getRef(n)->content.widgetReference->widget, \
1001 words->getRef(n)->content.widgetReference \
1004 case ::dw::core::Content::BREAK: \
1005 DBG_OBJ_MSGF (aspect, prio, prefix "BREAK / %d" suffix, \
1006 words->getRef(n)->content.breakSpace); \
1009 DBG_OBJ_MSG (aspect, prio, prefix "??? / ???" suffix); \
1016 #endif // __DW_TEXTBLOCK_HH__
T * getRef(int i) const
Return the reference of one element.
Definition: misc.hh:190
WordImgRenderer * wordImgRenderer
Definition: textblock.hh:499
Definition: textblock.hh:368
bool usesMaxGeneratorWidth()
Definition: textblock.cc:3116
Definition: textblock.hh:248
bool buttonReleaseImpl(core::EventButton *event)
Definition: textblock.cc:948
int totalSpaceStretchability
Definition: textblock.hh:488
int top
Definition: textblock.hh:374
Definition: textblock.hh:433
short flags
Definition: textblock.hh:475
int maxParMaxIntrinsic
Definition: textblock.hh:365
int lineYOffsetWidget(int lineIndex, core::Allocation *allocation)
Definition: textblock.hh:737
static int getSpaceStretchability(struct Word *word)
Definition: textblock_linebreaking.cc:2247
Definition: textblock.hh:225
int wrapWordOofRef(int wordIndex, bool wrapAll)
Definition: textblock_linebreaking.cc:859
void addText0(const char *text, size_t len, short flags, core::style::Style *style, core::Requisition *size)
Definition: textblock.cc:2352
A Widget for rendering text blocks, i.e. paragraphs or sequences of paragraphs.
Definition: textblock.hh:205
Definition: textblock.hh:509
int lastWord
Definition: textblock.hh:337
int wrapWordInFlow(int wordIndex, bool wrapAll)
Definition: textblock_linebreaking.cc:585
core::style::Style * getStyle()
Return the style this background image is part of.
Definition: textblock.cc:117
static bool mustAddBreaks(core::style::Style *style)
Definition: textblock.hh:876
bool isPossibleOOFContainer(int oofmIndex)
Definition: textblock.cc:3134
int getLineShrinkability(int lastWordIndex)
Definition: textblock_linebreaking.cc:2257
Widget * sizeReferences[NUM_OOFM]
Definition: textblock.hh:620
int findLineOfWord(int wordIndex)
Find the line of word wordIndex.
Definition: textblock.cc:1635
core::style::Style * style
Definition: textblock.hh:493
lout::misc::SimpleVector< Anchor > * anchors
Definition: textblock.hh:612
bool buttonPressImpl(core::EventButton *event)
Definition: textblock.cc:943
int numSizeRequestReferences()
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Definition: textblock.cc:425
void setSpaceImgRenderer(int wordNo)
Definition: textblock.cc:1860
Set at the top when getting the widget at the point.
Definition: types.hh:312
Definition: textblock.hh:438
struct dw::Textblock::@27 hlEnd[core::HIGHLIGHT_NUM_LAYERS]
int lineYOffsetWidget(Line *line, core::Allocation *allocation)
Definition: textblock.hh:712
int nonTemporaryLines
Definition: textblock.hh:610
A class for fast concatenation of a large number of strings.
Definition: misc.hh:565
int numContentsInFlow()
Definition: textblock_iterator.cc:273
core::style::Style * getStyle()
Return the style this background image is part of.
Definition: textblock.cc:97
Widget * getExtremesReference(int index)
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Definition: textblock.cc:549
Widget * sizeRequestReference(int index)
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Definition: textblock.cc:430
~WordImgRenderer()
Definition: textblock.cc:57
void notifySetAsTopLevel()
This method is called after a widget has been set as the top of a widget tree.
Definition: textblock.cc:554
bool calcSizeOfWidgetInFlow(int wordIndex, Widget *widget, core::Requisition *size)
Definition: textblock.cc:2274
int wordNo
Definition: textblock.hh:308
int wrapRefParagraphs
Definition: textblock.hh:583
void calcExtraSpaceImpl(int numPos, Widget **references, int *x, int *y)
Definition: textblock.cc:750
Shading
Definition: style.hh:767
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
void changeLinkColor(int link, int newColor)
Definition: textblock.cc:2908
void sizeRequestImpl(core::Requisition *requisition, int numPos, Widget **references, int *x, int *y)
Definition: textblock.cc:305
int newLineAscent
Definition: textblock.hh:606
BadnessAndPenalty badnessAndPenalty
Definition: textblock.hh:490
Type
Definition: types.hh:199
void setWordImgRenderer(int wordNo)
Definition: textblock.cc:1836
int newLineRightBorder
Definition: textblock.hh:596
Definition: textblock.hh:425
void drawWord(Line *line, int wordIndex1, int wordIndex2, core::View *view, core::Rectangle *area, int xWidget, int yWidgetBase)
Definition: textblock.cc:1281
int rightOffset
Definition: textblock.hh:424
int contentAscent
Definition: textblock.hh:391
core::Iterator * iterator(core::Content::Type mask, bool atEnd)
Return an iterator for this widget.
Definition: textblock.cc:1176
bool newLineHasFloatRight
Definition: textblock.hh:595
lout::object::Object * clone()
Definition: textblock_iterator.cc:51
int newLineDescent
Definition: textblock.hh:606
int lineYOffsetWidget(int lineIndex)
Definition: textblock.hh:732
bool unbreakableForMinWidth
Definition: textblock.hh:290
Definition: textblock.hh:222
int wordIndex
Definition: textblock.hh:506
int hyphenateWord(int wordIndex, int *addIndex1=NULL)
Definition: textblock_linebreaking.cc:1405
void correctLastWordExtremes()
Definition: textblock_linebreaking.cc:1389
int yOffsetOfLineToBeCreated(int *lastMargin=NULL)
Definition: textblock.cc:3191
Definition: textblock.hh:250
Definition: textblock.hh:251
void changeWordStyle(int from, int to, core::style::Style *style, bool includeFirstSpace, bool includeLastSpace)
Definition: textblock.cc:2959
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
RegardingBorder * getWidgetRegardingBorderForLine(Line *line)
Definition: textblock.cc:3144
bool affectsSizeChangeContainerChild(Widget *child)
Definition: textblock.cc:834
int hoverLink
Definition: textblock.hh:617
int leftInnerPadding
Definition: textblock.hh:534
int numGetExtremesReferences()
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Definition: textblock.cc:544
int lineYOffsetCanvas(Line *line)
Definition: textblock.hh:727
int lastWord
Definition: textblock.hh:371
int penaltyIndexRight
Definition: textblock.hh:291
static TextblockIterator * createWordIndexIterator(Textblock *textblock, core::Content::Type mask, int wordIndex)
Definition: textblock_iterator.cc:41
lout::misc::NotSoSimpleVector< Word > * words
Definition: textblock.hh:611
int calcPenaltyIndexForNewLine()
Definition: textblock.hh:747
int index
Definition: textblock.hh:614
int borderDescent
Definition: textblock.hh:387
Represents a enter or leave notify event.
Definition: events.hh:74
void drawText(core::View *view, core::style::Style *style, core::style::Color::Shading shading, int x, int y, const char *text, int start, int len, bool isStart, bool isEnd)
Definition: textblock.cc:1214
int lineBreakWidth
Definition: textblock.hh:581
int findLineIndexWhenNotAllocated(int y)
Definition: textblock.cc:1576
int maxDescent
Definition: textblock.hh:487
void enterNotifyImpl(core::EventCrossing *event)
Definition: textblock.cc:1000
int size() const
Return the number of elements put into this vector.
Definition: misc.hh:141
void fillSpace(int wordNo, core::style::Style *style)
Definition: textblock.cc:2559
bool dataSet
Definition: textblock.hh:309
Definition: textblock.hh:249
int newLineLeftFloatHeight
Definition: textblock.hh:600
int maxLineWidth
Definition: textblock.hh:413
void drawLine(Line *line, core::View *view, core::Rectangle *area, core::DrawingContext *context)
Definition: textblock.cc:1488
int getGeneratorWidth(int callerX, int callerWidth)
Definition: textblock.cc:3089
void markSizeChange(int ref)
See Sizes of Dillo Widgets.
Definition: textblock.cc:877
static int getSpaceShrinkability(struct Word *word)
Definition: textblock_linebreaking.cc:2239
void drawWord0(int wordIndex1, int wordIndex2, const char *text, int totalWidth, bool drawHyphen, core::style::Style *style, core::View *view, core::Rectangle *area, int xWidget, int yWidgetBase)
Definition: textblock.cc:1334
Hold arguments passed to dw::core::Widget::sizeRequest and dw::core::Widget::getExtremes, as described in Size requisitions depending on positions.
Definition: tools.hh:18
int searchMinBap(int firstWord, int lastWordm, int penaltyIndex, bool thereWillBeMoreSpace, bool correctAtEnd)
Definition: textblock_linebreaking.cc:1115
core::Requisition size
Definition: textblock.hh:464
Definition: textblock.hh:225
void highlight(int start, int end, core::HighlightLayer layer)
Definition: textblock_iterator.cc:59
bool isHyphenationCandidate(Word *word)
Definition: textblock_linebreaking.cc:1222
const char * s
Definition: textblock.hh:289
void removeTemporaryLines()
Definition: textblock_linebreaking.cc:2218
void queueDrawRange(int index1, int index2)
Definition: textblock.cc:2964
int badnessValue(int infLevel)
Definition: textblock_linebreaking.cc:37
int lastOofRefPositionedBeforeThisLine
Definition: textblock.hh:422
Definition: textblock.hh:447
Iterators are used to iterate through the contents of a widget.
Definition: iterator.hh:19
int leftOffset
Definition: textblock.hh:424
bool limitTextWidth
Definition: textblock.hh:573
static int stretchabilityFactor
Definition: textblock.hh:571
void accumulateWordForLine(int lineIndex, int wordIndex)
Definition: textblock_linebreaking.cc:1558
char * name
Definition: textblock.hh:505
TextblockIterator(Textblock *textblock, core::Content::Type mask, bool atEnd)
Definition: textblock_iterator.cc:33
WordImgRenderer(Textblock *textblock, int wordNo)
Definition: textblock.cc:47
Definition: textblock.hh:283
void getRefArea(int *xRef, int *yRef, int *widthRef, int *heightRef)
Return the "reference area".
Definition: textblock.cc:90
bool ignoreLine1OffsetSometimes
Definition: textblock.hh:556
int lineYOffsetWidget(Line *line)
Definition: textblock.hh:717
void getBgArea(int *x, int *y, int *width, int *height)
Return the area covered by the background image.
Definition: textblock.cc:79
void initNewLine()
Definition: textblock_linebreaking.cc:2036
core::style::Style * spaceStyle
Definition: textblock.hh:494
int parAdjustmentWidth
Definition: textblock.hh:353
int wrapRefLinesFCY
Definition: textblock.hh:587
bool addAnchor(const char *name, core::style::Style *style)
Definition: textblock.cc:2479
static void setPenaltyHyphen2(int penaltyHyphen2)
Definition: textblock.cc:179
Textblock * textblock
Definition: textblock.hh:307
Definition: textblock.hh:443
Definition: textblock.hh:455
void oofSizeChanged(bool extremesChanged)
Definition: textblock.cc:3014
void justifyLine(Line *line, int diff)
Definition: textblock_linebreaking.cc:249
int totalHeight(int marginNextLine)
Returns the difference between two vertical lines positions: height of this line plus space below thi...
Definition: textblock.hh:402
void handleWordExtremes(int wordIndex)
Definition: textblock_linebreaking.cc:1248
void clearPositionChanged()
Definition: textblock.cc:3005
bool isBreakAllowed(core::style::Style *style)
Definition: textblock.cc:2637
int firstWord
Definition: textblock.hh:370
bool motionNotifyImpl(core::EventMotion *event)
Definition: textblock.cc:958
void intoStringBuffer(lout::misc::StringBuffer *sb)
Definition: textblock_linebreaking.cc:195
bool usesAvailWidth()
Must be implemengted by a method returning true, when getAvailWidth() is called.
Definition: textblock.cc:852
lout::misc::SimpleVector< Paragraph > * paragraphs
Definition: textblock.hh:609
void getContentInFlow(int index, core::Content *content)
Definition: textblock_iterator.cc:278
Definition: textblock.hh:285
int textOffset
Definition: textblock.hh:394
void resizeDrawImpl()
Called after sizeAllocateImpl() to redraw necessary areas. By default the whole widget is redrawn...
Definition: textblock.cc:857
void getExtremesSimpl(core::Extremes *extremes)
Simple variant, to be implemented by widgets with extremes not depending on positions.
Definition: textblock.cc:470
bool mustBorderBeRegarded(Line *line)
Definition: textblock.hh:696
lout::misc::SimpleVector< Line > * lines
Definition: textblock.hh:608
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
void addBreakOption(core::style::Style *style, bool forceBreak)
Definition: textblock.cc:2543
void addText(const char *text, core::style::Style *style)
Definition: textblock.hh:888
bool findSizeRequestReference(Widget *reference, int *xRef=NULL, int *yRef=NULL)
Definition: textblock.cc:2336
void calcBorders(int lastOofRef, int height)
Definition: textblock_linebreaking.cc:2052
bool sendSelectionEvent(core::SelectionState::EventType eventType, core::MousePositionEvent *event)
Send event to selection.
Definition: textblock.cc:1024
Implementation used for words.
Definition: textblock.hh:303
void setSinglePenalty(int index, int penalty)
Definition: textblock_linebreaking.cc:137
void moveWordIndices(int wordIndex, int num, int *addIndex1=NULL)
Definition: textblock_linebreaking.cc:1512
int getAvailHeightOfChild(core::Widget *child, bool forceValue)
Definition: textblock.cc:809
void draw(int x, int y, int width, int height)
Draw (or queue for drawing) an area, which is given in canvas coordinates.
Definition: textblock.cc:102
int line1Offset
Definition: textblock.hh:536
void addWidget(core::Widget *widget, core::style::Style *style)
Definition: textblock.cc:2397
int maxParAdjustmentWidth
Definition: textblock.hh:362
void accumulateWordData(int wordIndex)
Definition: textblock_linebreaking.cc:1620
void initLine1Offset(int wordIndex)
Definition: textblock_linebreaking.cc:1745
Line * addLine(int firstWord, int lastWord, int newLastOofPos, bool temporary, int minHeight)
Definition: textblock_linebreaking.cc:306
int findLineIndexWhenAllocated(int y)
Definition: textblock.cc:1590
int marginDescent
Definition: textblock.hh:380
void unhighlight(int direction, core::HighlightLayer layer)
Definition: textblock_iterator.cc:122
virtual int wordWrap(int wordIndex, bool wrapAll)
Definition: textblock_linebreaking.cc:557
Textblock(bool limitTextWidth)
Definition: textblock.cc:205
bool lineTooTight()
Definition: textblock_linebreaking.cc:164
Definition: textblock.hh:287
void calcTextSizes(const char *text, size_t textLen, core::style::Style *style, int numBreaks, int *breakPos, core::Requisition *wordSize)
Definition: textblock.cc:2236
SpaceImgRenderer(Textblock *textblock, int wordNo)
Definition: textblock.hh:327
int lineYOffsetCanvas(Line *line, core::Allocation *allocation)
Definition: textblock.hh:722
Base class for all mouse events related to a specific position.
Definition: events.hh:48
void fillParagraphs()
Definition: textblock_linebreaking.cc:1979
Set at the top when drawing.
Definition: types.hh:294
int newLineLeftBorder
Definition: textblock.hh:596
Definition: textblock.hh:425
T max(T a, T b)
Definition: misc.hh:20
Simple (simpler than container::untyped::Vector and container::typed::Vector) template based vector...
Definition: misc.hh:93
bool lineLoose()
Definition: textblock_linebreaking.cc:151
void getWordExtremes(Word *word, core::Extremes *extremes)
Definition: textblock.cc:460
void widgetRefSizeChanged(int externalIndex)
Definition: textblock.cc:2998
Definition: textblock.hh:283
Definition: textblock.hh:324
int totalWidth
Definition: textblock.hh:479
int maxParMax
Definition: textblock.hh:363
void addSpace(core::style::Style *style)
Definition: textblock.cc:2522
int marginAscent
Definition: textblock.hh:377
int lineNo
Definition: textblock.hh:308
Definition: textblock.hh:252
void leaveNotifyImpl(core::EventCrossing *event)
Definition: textblock.cc:1007
int wrapRefLinesFCX
Definition: textblock.hh:587
int parMin
Definition: textblock.hh:349
int firstWord
Definition: textblock.hh:336
Definition: textblock.hh:425
Base class (rather a tag interface) for those widgets regarding borders defined by floats...
Definition: regardingborder.hh:13
Definition: textblock.hh:435
bool mustBorderBeRegarded(int lineNo)
Definition: textblock.hh:701
Definition: textblock.hh:334
Definition: textblock.hh:428
int getGeneratorX(int oofmIndex)
Definition: textblock.cc:3028
void removeWordImgRenderer(int wordNo)
Definition: textblock.cc:1824
static const char * hyphenDrawChar
Definition: textblock.hh:296
int penaltyValue(int index, int infLevel)
Definition: textblock_linebreaking.cc:58
void addParbreak(int space, core::style::Style *style)
Definition: textblock.cc:2660
int ascent
Definition: types.hh:168
int redrawY
Definition: textblock.hh:575
int calcVerticalBorder(int widgetPadding, int widgetBorder, int widgetMargin, int lineBorderTotal, int lineMarginTotal)
Definition: textblock.cc:435
int badness
Definition: textblock.hh:228
void containerSizeChangedForChildren()
Definition: textblock.cc:819
int parMaxIntrinsic
Definition: textblock.hh:357
static void setStretchabilityFactor(int stretchabilityFactor)
Definition: textblock.cc:200
int compareTo(int penaltyIndex, BadnessAndPenalty *other)
Definition: textblock_linebreaking.cc:180
HighlightLayer
Definition: types.hh:42
void showMissingLines()
Definition: textblock_linebreaking.cc:2161
static int CLASS_ID
Definition: textblock.hh:867
EventType
Definition: selection.hh:220
void balanceBreakPosAndHeight(int wordIndex, int firstIndex, int *searchUntil, bool tempNewLine, int penaltyIndex, bool borderIsCalculated, bool *thereWillBeMoreSpace, bool wrapAll, int *diffWords, int *wordIndexEnd, int *lastFloatPos, bool regardBorder, int *height, int *breakPos)
Definition: textblock_linebreaking.cc:906
void decorateText(core::View *view, core::style::Style *style, core::style::Color::Shading shading, int x, int yBase, int width)
Definition: textblock.cc:1184
int getMaxGeneratorWidth()
Definition: textblock.cc:3109
void flush()
Definition: textblock.cc:2891
void rewrap()
Definition: textblock_linebreaking.cc:1905
SpaceImgRenderer * spaceImgRenderer
Definition: textblock.hh:500
core::Content content
Definition: textblock.hh:476
void initWord(int wordNo)
Definition: textblock.cc:1798
bool isPossibleOOFContainerParent(int oofmIndex)
Definition: textblock.cc:3139
void processWord(int wordIndex)
Definition: textblock_linebreaking.cc:497
int ratio
Definition: textblock.hh:227
void sizeAllocateImpl(core::Allocation *allocation)
See Sizes of Dillo Widgets.
Definition: textblock.cc:585
void markExtremesChange(int ref)
See Sizes of Dillo Widgets.
Definition: textblock.cc:911
int borderAscent
Definition: textblock.hh:383
Word * addWord(int width, int ascent, int descent, short flags, core::style::Style *style)
Definition: textblock.cc:1774
Definition: textblock.hh:247
int maxParMinIntrinsic
Definition: textblock.hh:361
T * getRef(int i) const
Return the reference of one element.
Definition: misc.hh:472
~Textblock()
Definition: textblock.cc:274
Definition: textblock.hh:225
bool findSizeRequestReference(int oofmIndex, int *xRef=NULL, int *yRef=NULL)
Definition: textblock.hh:688
int calcLineBreakWidth(int lineIndex)
Definition: textblock_linebreaking.cc:1713
void calcTextOffset(int lineIndex, int totalWidth)
Definition: textblock_linebreaking.cc:1854
int penalty[2]
Definition: textblock.hh:228
enum dw::Textblock::BadnessAndPenalty::@28 badnessState
bool isBlockLevel()
Definition: textblock.cc:938
static void setPenaltyEmDashRight2(int penaltyRightEmDash2)
Definition: textblock.cc:195
void setPenalties(int penalty1, int penalty2)
Definition: textblock_linebreaking.cc:130
static int penalties[PENALTY_NUM][2]
Definition: textblock.hh:566
short effSpace
Definition: textblock.hh:467
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
bool mustQueueResize
Definition: textblock.hh:558
int maxParMin
Definition: textblock.hh:359
int textWidth(const char *text, int start, int len, core::style::Style *style, bool isStart, bool isEnd)
Definition: textblock.cc:1905
core::SizeParams sizeRequestParams
Definition: textblock.hh:578
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
bool lineCanBeBroken(int penaltyIndex)
Definition: textblock_linebreaking.cc:175
static void setPenaltyEmDashLeft(int penaltyLeftEmDash)
Definition: textblock.cc:184
int getLineStretchability(int lastWordIndex)
Definition: textblock_linebreaking.cc:2262
int lineYOffsetCanvas(int lineIndex)
Definition: textblock.hh:742
Definition: textblock.hh:219
int nChar
Definition: textblock.hh:614
T * getLastRef() const
Return the reference of the last element (convenience method).
Definition: misc.hh:225
int getAvailWidthOfChild(core::Widget *child, bool forceValue)
Definition: textblock.cc:771
struct dw::Textblock::@27 hlStart[core::HIGHLIGHT_NUM_LAYERS]
Definition: textblock.hh:218
void getBgArea(int *x, int *y, int *width, int *height)
Return the area covered by the background image.
Definition: textblock.cc:109
Container similar to lout::misc::SimpleVector, but some cases of insertion optimized (used for hyphen...
Definition: misc.hh:310
int wrapRefLines
Definition: textblock.hh:583
void getAllocation(int start, int end, core::Allocation *allocation)
Definition: textblock_iterator.cc:186
int getPenalty(int i)
Definition: textblock.hh:271
void removeSpaceImgRenderer(int wordNo)
Definition: textblock.cc:1848
int maxAscent
Definition: textblock.hh:487
void fillWord(int wordNo, int width, int ascent, int descent, short flags, core::style::Style *style)
Definition: textblock.cc:1872
Definition: textblock.hh:451
Definition: textblock.hh:460
bool isBreakAllowedInWord(Word *word)
Definition: textblock.hh:677
static void setPenaltyEmDashRight(int penaltyRightEmDash)
Definition: textblock.cc:190
Word * findWord(int x, int y, bool *inSpace)
Find the index of the word, or -1.
Definition: textblock.cc:1685
short origSpace
Definition: textblock.hh:466
void calcTextSize(const char *text, size_t len, core::style::Style *style, core::Requisition *size, bool isStart, bool isEnd)
Definition: textblock.cc:1967
Represents a mouse motion event.
Definition: events.hh:67
bool lineTight()
Definition: textblock_linebreaking.cc:158
void addText(const char *text, size_t len, core::style::Style *style)
Definition: textblock.cc:2022
int findLineIndex(int y)
Definition: textblock.cc:1570
void removeChild(Widget *child)
Definition: textblock.cc:1171
void cleanupWord(int wordNo)
Definition: textblock.cc:1807
Widget * getWidgetAtPointLevel(int x, int y, int level, core::GettingWidgetAtPointContext *context)
Definition: textblock.cc:2805
void notifySetParent()
This method is called after a widget has been added to a parent.
Definition: textblock.cc:562
void handOverBreak(core::style::Style *style)
Definition: textblock.cc:2870
short hyphenWidth
Definition: textblock.hh:469
int newLineRightFloatHeight
Definition: textblock.hh:600
int findParagraphOfWord(int wordIndex)
Find the paragraph of word wordIndex.
Definition: textblock.cc:1659
bool readyToDraw()
If this method returns false, nothing is done at all.
Definition: textblock.cc:69
void breakAdded()
Definition: textblock.cc:2781
int breakSpace
Definition: textblock.hh:393
int contentDescent
Definition: textblock.hh:392
int parMinIntrinsic
Definition: textblock.hh:352
int getGeneratorY(int oofmIndex)
Definition: textblock.cc:3045
void setPenalty(int penalty)
Definition: textblock.hh:267
int totalSpaceShrinkability
Definition: textblock.hh:489
int searchBreakPos(int wordIndex, int firstIndex, int *searchUntil, bool tempNewLine, int penaltyIndex, bool thereWillBeMoreSpace, bool wrapAll, int *diffWords, int *wordIndexEnd, int *addIndex1=NULL)
Definition: textblock_linebreaking.cc:1003
enum dw::Textblock::Line::@30 alignment
bool lineMustBeBroken(int penaltyIndex)
Definition: textblock_linebreaking.cc:170
void alignLine(int lineIndex)
Definition: textblock_linebreaking.cc:1778
int considerHyphenation(int firstIndex, int breakPos)
Definition: textblock_linebreaking.cc:1187
void drawLevel(core::View *view, core::Rectangle *area, int level, core::DrawingContext *context)
Definition: textblock.cc:1728
void drawSpace(int wordIndex, core::View *view, core::Rectangle *area, int xWidget, int yWidgetBase)
Definition: textblock.cc:1438
int yOffsetOfLineCreated(Line *line)
Definition: textblock.cc:3239
void setBreakOption(Word *word, core::style::Style *style, int breakPenalty1, int breakPenalty2, bool forceBreak)
Definition: textblock.cc:2618
bool hasListitemValue
Definition: textblock.hh:532
int getGeneratorRest(int oofmIndex)
Definition: textblock.cc:3062
static void setPenaltyHyphen(int penaltyHyphen)
Definition: textblock.cc:174
int numSizeReferences
Definition: textblock.hh:619
static DivChar divChars[NUM_DIV_CHARS]
Definition: textblock.hh:294
int calcLinePartHeight(int firstWord, int lastWord)
Definition: textblock_linebreaking.cc:1232
int parMax
Definition: textblock.hh:354
int line1OffsetEff
Definition: textblock.hh:539
bool newLineHasFloatLeft
Definition: textblock.hh:595
Definition: textblock.hh:284
void setData(int xWordWidget, int lineNo)
Definition: textblock.cc:62
void calcBadness(int totalWidth, int idealWidth, int totalStretchability, int totalShrinkability)
Definition: textblock_linebreaking.cc:68
Definition: textblock.hh:283
int lastWordDrawn
Definition: textblock.hh:576
Definition: textblock.hh:225
int xWordWidget
Definition: textblock.hh:308
void addLinebreak(core::style::Style *style)
Definition: textblock.cc:2748
int y
Definition: types.hh:166
void updateReference(int ref)
Definition: textblock.cc:2993
Definition: textblock.hh:503