#include <KWFrame.h>
Inherits KoRect.
|
| enum | RunAround { RA_NO = 0
, RA_BOUNDINGRECT = 1
, RA_SKIP = 2
} |
| |
| enum | RunAroundSide { RA_BIGGEST = 0
, RA_LEFT = 1
, RA_RIGHT = 2
} |
| |
| enum | FrameBehavior { AutoExtendFrame =0
, AutoCreateNewFrame =1
, Ignore =2
} |
| |
| enum | SheetSide { AnySide =0
, OddSide =1
, EvenSide =2
} |
| |
| enum | NewFrameBehavior { Reconnect =0
, NoFollowup =1
, Copy =2
} |
| |
|
| | KWFrame (KWFrameSet *fs, double left, double top, double width, double height, RunAround ra=RA_BOUNDINGRECT) |
| |
| | KWFrame (KWFrame *frame) |
| |
| virtual | ~KWFrame () |
| |
| double | runAroundLeft () const |
| |
| double | runAroundRight () const |
| |
| double | runAroundTop () const |
| |
| double | runAroundBottom () const |
| |
| void | setRunAroundGap (double left, double right, double top, double bottom) |
| |
| RunAround | runAround () const |
| |
| void | setRunAround (RunAround _ra) |
| |
| RunAroundSide | runAroundSide () const |
| |
| void | setRunAroundSide (RunAroundSide rs) |
| |
| FrameBehavior | frameBehavior () const |
| |
| void | setFrameBehavior (FrameBehavior fb) |
| |
| SheetSide | sheetSide () const |
| |
| void | setSheetSide (SheetSide ss) |
| |
| NewFrameBehavior | newFrameBehavior () const |
| |
| void | setNewFrameBehavior (NewFrameBehavior nfb) |
| |
| bool | isCopy () const |
| |
| void | setCopy (bool copy) |
| |
| KWFrameSet * | frameSet () const |
| |
| void | setFrameSet (KWFrameSet *fs) |
| |
| int | pageNumber () const |
| |
| int | pageNumber (KWDocument *doc) const |
| |
| void | setZOrder (int z) |
| |
| int | zOrder () const |
| |
| KWFrameList * | frameStack () |
| |
| void | setFrameStack (KWFrameList *fl) |
| |
| const KoBorder & | leftBorder () const |
| |
| const KoBorder & | rightBorder () const |
| |
| const KoBorder & | topBorder () const |
| |
| const KoBorder & | bottomBorder () const |
| |
| void | setLeftBorder (KoBorder _brd) |
| |
| void | setRightBorder (KoBorder _brd) |
| |
| void | setTopBorder (KoBorder _brd) |
| |
| void | setBottomBorder (KoBorder _brd) |
| |
| TQRect | outerRect (KWViewMode *viewMode) const |
| |
| KoRect | outerKoRect () const |
| |
| KoRect | runAroundRect () const |
| |
| const KoRect & | rect () const |
| |
| void | frameBordersChanged () |
| |
| void | updateRulerHandles () |
| |
| TQBrush | backgroundColor () const |
| |
| void | setBackgroundColor (const TQBrush &_color) |
| |
| bool | isTransparent () const |
| |
| KoRect | innerRect () const |
| |
| double | innerWidth () const |
| |
| double | innerHeight () const |
| |
| void | setInternalY (double y) |
| |
| double | internalY () const |
| |
| void | setPaddingLeft (double b) |
| |
| void | setPaddingRight (double b) |
| |
| void | setPaddingTop (double b) |
| |
| void | setPaddingBottom (double b) |
| |
| double | paddingLeft () const |
| |
| double | paddingRight () const |
| |
| double | paddingTop () const |
| |
| double | paddingBottom () const |
| |
| void | setFramePadding (double _left, double _top, double right, double bottom) |
| |
| KWFrame * | getCopy () |
| |
| void | copySettings (KWFrame *frm) |
| |
| void | save (TQDomElement &frameElem) |
| |
| void | load (TQDomElement &frameElem, KWFrameSet *frameSet, int syntaxVersion) |
| |
| void | loadCommonOasisProperties (KoOasisContext &context, KWFrameSet *frameSet, const char *typeProperties) |
| |
| void | loadBorderProperties (KoStyleStack &styleStack) |
| |
| TQString | saveOasisFrameStyle (KoGenStyles &mainStyles) const |
| |
| void | startOasisFrame (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, const TQString &name, const TQString &lastFrameName=TQString()) const |
| |
| void | saveBorderProperties (KoGenStyle &frameStyle) const |
| |
| void | saveMarginProperties (KoGenStyle &frameStyle) const |
| |
| void | saveMarginAttributes (KoXmlWriter &writer) const |
| |
| void | setMinimumFrameHeight (double h) |
| |
| double | minimumFrameHeight (void) const |
| |
| bool | frameAtPos (const TQPoint &nPoint, bool borderOfFrameOnly=false) const |
| |
| void | setDrawFootNoteLine (bool b) |
| |
| bool | drawFootNoteLine () const |
| |
This class represents a single frame.
A frame belongs to a frameset which states its contents. A frame does NOT have contents, the frameset stores that. A frame is really just a square that is used to place the content of a frameset.
Definition at line 67 of file KWFrame.h.
◆ FrameBehavior
what should happen when the frame is full
Definition at line 116 of file KWFrame.h.
◆ NewFrameBehavior
What happens on new page (create a new frame and reconnect, no followup, make copy)
Definition at line 132 of file KWFrame.h.
◆ RunAround
Runaround types RA_NO = No run around, all text is just printed.
RA_BOUNDINGRECT = run around the square of this frame. RA_SKIP = stop running text on the whole horizontal space this frame occupies.
Definition at line 75 of file KWFrame.h.
◆ RunAroundSide
Runaround side - only meaningful when RA_BOUNDINGRECT is used.
Definition at line 79 of file KWFrame.h.
◆ SheetSide
This frame will only be copied to: AnySide, OddSide or EvenSide.
Definition at line 126 of file KWFrame.h.
◆ KWFrame() [1/2]
| KWFrame::KWFrame |
( |
KWFrameSet * |
fs, |
|
|
double |
left, |
|
|
double |
top, |
|
|
double |
width, |
|
|
double |
height, |
|
|
RunAround |
ra = RA_BOUNDINGRECT |
|
) |
| |
Constructor.
- Parameters
-
| fs | parent frameset |
| left,top,width,height | coordinates of the frame The page number will be automatically determined from the position of the frame. |
| ra | the "runaround" setting, i.e. whether text should flow below the frame, around the frame, or avoiding the frame on the whole horizontal band. |
Definition at line 70 of file KWFrame.cpp.
◆ KWFrame() [2/2]
| KWFrame::KWFrame |
( |
KWFrame * |
frame | ) |
|
◆ ~KWFrame()
◆ backgroundColor()
| TQBrush KWFrame::backgroundColor |
( |
| ) |
const |
|
inline |
◆ bottomBorder()
| const KoBorder & KWFrame::bottomBorder |
( |
| ) |
const |
|
inline |
◆ compareFrameZOrder()
This is a method used to sort a list using the STL sorting methods.
- Parameters
-
| f1 | the first object |
| f2 | the second object |
Definition at line 750 of file KWFrame.cpp.
◆ copySettings()
| void KWFrame::copySettings |
( |
KWFrame * |
frm | ) |
|
◆ drawFootNoteLine()
| bool KWFrame::drawFootNoteLine |
( |
| ) |
const |
|
inline |
◆ frameAtPos()
| bool KWFrame::frameAtPos |
( |
const TQPoint & |
nPoint, |
|
|
bool |
borderOfFrameOnly = false |
|
) |
| const |
Return if the point is on the frame.
- Parameters
-
| nPoint | the point in normal coordinates. |
| borderOfFrameOnly | when true an additional check is done if the point is on the border.
|
Definition at line 718 of file KWFrame.cpp.
◆ frameBehavior()
◆ frameBordersChanged()
| void KWFrame::frameBordersChanged |
( |
| ) |
|
Marks a frame to have changed position/borders.
Make sure you call this when the frame borders changed so when its inline it will be moved.
Definition at line 167 of file KWFrame.cpp.
◆ frameSet()
Data stucture methods.
Definition at line 143 of file KWFrame.h.
◆ frameStack()
◆ getCopy()
◆ innerHeight()
| double KWFrame::innerHeight |
( |
| ) |
const |
◆ innerRect()
| KoRect KWFrame::innerRect |
( |
| ) |
const |
◆ innerWidth()
| double KWFrame::innerWidth |
( |
| ) |
const |
◆ internalY()
| double KWFrame::internalY |
( |
| ) |
const |
|
inline |
◆ isCopy()
| bool KWFrame::isCopy |
( |
| ) |
const |
|
inline |
Drawing property: if isCopy, this frame is a copy of the previous frame in the frameset.
Definition at line 138 of file KWFrame.h.
◆ isTransparent()
| bool KWFrame::isTransparent |
( |
| ) |
const |
|
inline |
◆ leftBorder()
| const KoBorder & KWFrame::leftBorder |
( |
| ) |
const |
|
inline |
All borders can be custom drawn with their own colors etc.
Definition at line 170 of file KWFrame.h.
◆ load()
| void KWFrame::load |
( |
TQDomElement & |
frameElem, |
|
|
KWFrameSet * |
frameSet, |
|
|
int |
syntaxVersion |
|
) |
| |
read attributes from XML.
headerOrFooter if true some defaults are different
Definition at line 340 of file KWFrame.cpp.
◆ loadBorderProperties()
| void KWFrame::loadBorderProperties |
( |
KoStyleStack & |
styleStack | ) |
|
◆ loadCommonOasisProperties()
| void KWFrame::loadCommonOasisProperties |
( |
KoOasisContext & |
context, |
|
|
KWFrameSet * |
frameSet, |
|
|
const char * |
typeProperties |
|
) |
| |
◆ minimumFrameHeight()
| double KWFrame::minimumFrameHeight |
( |
void |
| ) |
const |
|
inline |
◆ newFrameBehavior()
◆ outerKoRect()
| KoRect KWFrame::outerKoRect |
( |
| ) |
const |
Return the unzoomed rectangle, including the border, for the frames-on-top list.
The default border of size 1-pixel that is drawn on screen is not included here [since it depends on the zoom]
Definition at line 200 of file KWFrame.cpp.
◆ outerRect()
| TQRect KWFrame::outerRect |
( |
KWViewMode * |
viewMode | ) |
const |
Return the zoomed rectangle for this frame, including the border - for drawing.
- Parameters
-
| viewMode | needed to know if borders are visible or not |
Definition at line 185 of file KWFrame.cpp.
◆ paddingBottom()
| double KWFrame::paddingBottom |
( |
| ) |
const |
|
inline |
get bottom padding
Definition at line 242 of file KWFrame.h.
◆ paddingLeft()
| double KWFrame::paddingLeft |
( |
| ) |
const |
|
inline |
◆ paddingRight()
| double KWFrame::paddingRight |
( |
| ) |
const |
|
inline |
◆ paddingTop()
| double KWFrame::paddingTop |
( |
| ) |
const |
|
inline |
◆ pageNumber() [1/2]
| int KWFrame::pageNumber |
( |
| ) |
const |
The page on which this frame is.
Definition at line 116 of file KWFrame.cpp.
◆ pageNumber() [2/2]
| int KWFrame::pageNumber |
( |
KWDocument * |
doc | ) |
const |
◆ rect()
| const KoRect & KWFrame::rect |
( |
| ) |
const |
|
inline |
Return the rectangle for this frame.
This method is just so that new code doesn't rely on "KWFrame inherits KoRect", which would be good to get rid of, at some point.
Definition at line 201 of file KWFrame.h.
◆ rightBorder()
| const KoBorder & KWFrame::rightBorder |
( |
| ) |
const |
|
inline |
◆ runAround()
◆ runAroundBottom()
| double KWFrame::runAroundBottom |
( |
| ) |
const |
|
inline |
◆ runAroundLeft()
| double KWFrame::runAroundLeft |
( |
| ) |
const |
|
inline |
◆ runAroundRect()
| KoRect KWFrame::runAroundRect |
( |
| ) |
const |
Return the rectangle for this frame including the border and the runaround gap.
This is the rectangle that the surrounding text must run around.
Definition at line 212 of file KWFrame.cpp.
◆ runAroundRight()
| double KWFrame::runAroundRight |
( |
| ) |
const |
|
inline |
◆ runAroundSide()
◆ runAroundTop()
| double KWFrame::runAroundTop |
( |
| ) |
const |
|
inline |
◆ save()
| void KWFrame::save |
( |
TQDomElement & |
frameElem | ) |
|
create XML to describe yourself
Definition at line 222 of file KWFrame.cpp.
◆ saveBorderProperties()
| void KWFrame::saveBorderProperties |
( |
KoGenStyle & |
frameStyle | ) |
const |
◆ saveMarginAttributes()
| void KWFrame::saveMarginAttributes |
( |
KoXmlWriter & |
writer | ) |
const |
◆ saveMarginProperties()
| void KWFrame::saveMarginProperties |
( |
KoGenStyle & |
frameStyle | ) |
const |
◆ saveOasisFrameStyle()
| TQString KWFrame::saveOasisFrameStyle |
( |
KoGenStyles & |
mainStyles | ) |
const |
◆ setBackgroundColor()
| void KWFrame::setBackgroundColor |
( |
const TQBrush & |
_color | ) |
|
◆ setBottomBorder()
| void KWFrame::setBottomBorder |
( |
KoBorder |
_brd | ) |
|
|
inline |
◆ setCopy()
| void KWFrame::setCopy |
( |
bool |
copy | ) |
|
|
inline |
◆ setDrawFootNoteLine()
| void KWFrame::setDrawFootNoteLine |
( |
bool |
b | ) |
|
|
inline |
Only applicable to frames of the main text frameset.
Set to true by KWFrameLayout if the "footnote line" should be drawn under this frame.
Definition at line 297 of file KWFrame.h.
◆ setFrameBehavior()
◆ setFramePadding()
| void KWFrame::setFramePadding |
( |
double |
_left, |
|
|
double |
_top, |
|
|
double |
right, |
|
|
double |
bottom |
|
) |
| |
◆ setFrameSet()
◆ setFrameStack()
◆ setInternalY()
| void KWFrame::setInternalY |
( |
double |
y | ) |
|
|
inline |
The "internal Y" is the offset (in pt) of the real frame showed in this one ("real" means "the last that isn't a copy") This offset in pt is the sum of the height of the frames before that one.
For text frames, this is equivalent to the layout units (after multiplication).
Definition at line 223 of file KWFrame.h.
◆ setLeftBorder()
| void KWFrame::setLeftBorder |
( |
KoBorder |
_brd | ) |
|
|
inline |
◆ setMinimumFrameHeight()
| void KWFrame::setMinimumFrameHeight |
( |
double |
h | ) |
|
|
inline |
The property minimum frame height is used to make the automatic frame shrinking code stop.
Each frame has a height based on its frame dimentions, but changes in content may change the sizes automatically. If all text is removed from a text frame it will grow smaller until the minimum frame height is reached, and it will not shrink below that. - Parameters
-
Definition at line 279 of file KWFrame.h.
◆ setNewFrameBehavior()
◆ setPaddingBottom()
| void KWFrame::setPaddingBottom |
( |
double |
b | ) |
|
|
inline |
set bottom padding
Definition at line 233 of file KWFrame.h.
◆ setPaddingLeft()
| void KWFrame::setPaddingLeft |
( |
double |
b | ) |
|
|
inline |
set left padding (distance between frame contents and frame border)
Definition at line 227 of file KWFrame.h.
◆ setPaddingRight()
| void KWFrame::setPaddingRight |
( |
double |
b | ) |
|
|
inline |
◆ setPaddingTop()
| void KWFrame::setPaddingTop |
( |
double |
b | ) |
|
|
inline |
◆ setRightBorder()
| void KWFrame::setRightBorder |
( |
KoBorder |
_brd | ) |
|
|
inline |
◆ setRunAround()
◆ setRunAroundGap()
| void KWFrame::setRunAroundGap |
( |
double |
left, |
|
|
double |
right, |
|
|
double |
top, |
|
|
double |
bottom |
|
) |
| |
|
inline |
◆ setRunAroundSide()
◆ setSheetSide()
◆ setTopBorder()
| void KWFrame::setTopBorder |
( |
KoBorder |
_brd | ) |
|
|
inline |
◆ setZOrder()
| void KWFrame::setZOrder |
( |
int |
z | ) |
|
|
inline |
The z-order of the frame, relative to the other frames on the same page.
Definition at line 155 of file KWFrame.h.
◆ sheetSide()
◆ startOasisFrame()
| void KWFrame::startOasisFrame |
( |
KoXmlWriter & |
xmlWriter, |
|
|
KoGenStyles & |
mainStyles, |
|
|
const TQString & |
name, |
|
|
const TQString & |
lastFrameName = TQString() |
|
) |
| const |
Write out a draw:frame element and its style.
The caller is responsible for creating the child element and closing the draw:frame element. lastFrameName is the name of the previous frame in the same frameset; this is only used for copy-frames
Definition at line 544 of file KWFrame.cpp.
◆ topBorder()
| const KoBorder & KWFrame::topBorder |
( |
| ) |
const |
|
inline |
◆ updateRulerHandles()
| void KWFrame::updateRulerHandles |
( |
| ) |
|
◆ zOrder()
| int KWFrame::zOrder |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
|