#include <KWViewMode.h>
Public Member Functions | |
| KWViewModeText (KWDocument *doc, KWCanvas *canvas, KWTextFrameSet *fs) | |
| KWTextFrameSet * | textFrameSet () const |
| virtual TQPoint | normalToView (const TQPoint &nPoint) |
| virtual TQPoint | viewToNormal (const TQPoint &vPoint) |
| virtual TQSize | contentsSize () |
| virtual TQRect | viewPageRect (int) |
| virtual TQSize | availableSizeForText (KWTextFrameSet *textfs) |
| virtual TQPoint | pageCorner () |
| virtual TQRect | rulerFrameRect () |
| virtual void | setPageLayout (KoRuler *hRuler, KoRuler *vRuler, const KoPageLayout &layout) |
| virtual void | drawPageBorders (TQPainter *painter, const TQRect &crect, const TQRegion &emptySpaceRegion) |
| virtual const TQString | type () const |
| virtual bool | shouldFormatVertically () |
| virtual bool | shouldAdjustMargins () |
| virtual bool | hasFrames () |
| virtual bool | hasPages () |
| virtual bool | isFrameSetVisible (const KWFrameSet *fs) |
| virtual bool | isTextModeFrameset (KWFrameSet *fs) const |
| Public Member Functions inherited from KWViewMode | |
| TQRect | normalToView (const TQRect &nRect) |
| TQRect | viewToNormal (const TQRect &nRect) |
| virtual void | setPagesPerRow (int) |
| virtual int | pagesPerRow () |
| virtual bool | drawSelections () |
| virtual bool | drawFrameBackground () |
| bool | drawFrameBorders () const |
| void | setDrawFrameBorders (bool b) |
| KWCanvas * | canvas () const |
Static Public Member Functions | |
| static KWTextFrameSet * | determineTextFrameSet (KWDocument *doc) |
| Static Public Member Functions inherited from KWViewMode | |
| static KWViewMode * | create (const TQString &viewModeType, KWDocument *doc, KWCanvas *canvas) |
Static Public Attributes | |
| static const int | OFFSET = 10 |
Additional Inherited Members | |
| Protected Member Functions inherited from KWViewMode | |
| KWViewMode (KWDocument *doc, KWCanvas *canvas, bool drawFrameBorders) | |
| void | drawOnePageBorder (TQPainter *painter, const TQRect &crect, const TQRect &pageRect, const TQRegion &emptySpaceRegion) |
| TQRect | drawRightShadow (TQPainter *painter, const TQRect &crect, const TQRect &pageRect, int topOffset) |
| TQRect | drawBottomShadow (TQPainter *painter, const TQRect &crect, const TQRect &pageRect, int leftOffset) |
| Protected Attributes inherited from KWViewMode | |
| KWDocument * | m_doc |
| KWCanvas * | m_canvas |
| bool | m_drawFrameBorders |
| Static Protected Attributes inherited from KWViewMode | |
| static const unsigned short | s_shadowOffset = 3 |
Detailed Description
The 'edit only one text frameset' view mode.
Definition at line 252 of file KWViewMode.h.
Constructor & Destructor Documentation
◆ KWViewModeText()
| KWViewModeText::KWViewModeText | ( | KWDocument * | doc, |
| KWCanvas * | canvas, | ||
| KWTextFrameSet * | fs ) |
Definition at line 449 of file KWViewMode.cpp.
◆ ~KWViewModeText()
|
inlinevirtual |
Definition at line 257 of file KWViewMode.h.
Member Function Documentation
◆ availableSizeForText()
|
virtual |
Size (in pixels) of the total area available for text in a given textframeset This is used by KWTextFrameSet::drawFrame to erase between the bottom of the last paragraph and the bottom of the available area.
Reimplemented from KWViewMode.
Definition at line 519 of file KWViewMode.cpp.
◆ contentsSize()
|
virtual |
Size of the contents area, in pixels.
Implements KWViewMode.
Definition at line 502 of file KWViewMode.cpp.
◆ determineTextFrameSet()
|
static |
Return a text frameset that the user has either selected or is currently editing, returning the main text frameset otherwise.
If the selected frame is not a text FS, and the user is not editing one in the first view plus the document has no main text frameset then this method will return 0
Definition at line 462 of file KWViewMode.cpp.
◆ drawPageBorders()
|
virtual |
Implements KWViewMode.
Definition at line 538 of file KWViewMode.cpp.
◆ hasFrames()
|
inlinevirtual |
Does this viewmode know anything about frames?
Reimplemented from KWViewMode.
Definition at line 282 of file KWViewMode.h.
◆ hasPages()
|
inlinevirtual |
Does this viewmode know anything about pages?
Reimplemented from KWViewMode.
Definition at line 283 of file KWViewMode.h.
◆ isFrameSetVisible()
|
virtual |
Should this frameset be visible in this viewmode?
True by default, all are shown.
Reimplemented from KWViewMode.
Definition at line 524 of file KWViewMode.cpp.
◆ isTextModeFrameset()
|
virtual |
Answers the question if argument frameset has to be drawn as a text-mode text area if true, or if false as a frame with its own contents.
Reimplemented from KWViewMode.
Definition at line 594 of file KWViewMode.cpp.
◆ normalToView()
|
virtual |
◆ pageCorner()
|
inlinevirtual |
"Topleft of current page" - concept used by the rulers.
The default implementation is good enough for any page-based viewmode, since it calls normalToView. But the textmode has no page concept.
Reimplemented from KWViewMode.
Definition at line 274 of file KWViewMode.h.
◆ rulerFrameRect()
|
virtual |
The result of this is passed to setFrameStartEnd for both rulers (after adjustement with pageCorner()).
Reimplemented from KWViewMode.
Definition at line 569 of file KWViewMode.cpp.
◆ setPageLayout()
|
virtual |
Called when the page layout is set, or changes.
Usually this is directly passed to KoRuler (for page-based viewmodes)
Reimplemented from KWViewMode.
Definition at line 574 of file KWViewMode.cpp.
◆ shouldAdjustMargins()
|
inlinevirtual |
Should adjust[LR]Margin() happen (to run the text around frames on top etc.).
Reimplemented from KWViewMode.
Definition at line 281 of file KWViewMode.h.
◆ shouldFormatVertically()
|
inlinevirtual |
Should formatVertically() happen (to skip frame bottom, frames on top, etc.).
Reimplemented from KWViewMode.
Definition at line 280 of file KWViewMode.h.
◆ textFrameSet()
| KWTextFrameSet * KWViewModeText::textFrameSet | ( | ) | const |
Definition at line 455 of file KWViewMode.cpp.
◆ type()
|
inlinevirtual |
Return the name of the viewmode, used for loading/saving.
Implements KWViewMode.
Definition at line 279 of file KWViewMode.h.
◆ viewPageRect()
|
inlinevirtual |
Return view coord for page rect.
Avoids rounding problems when doing normalToView(zoomedRect)
Implements KWViewMode.
Definition at line 271 of file KWViewMode.h.
◆ viewToNormal()
|
virtual |
Member Data Documentation
◆ OFFSET
|
static |
hardcoded distance from the left side this viewmode starts its rendering
Definition at line 290 of file KWViewMode.h.
The documentation for this class was generated from the following files:
