kword
KWFrame Class Reference
#include <KWFrame.h>
Inherits KoRect.
Detailed Description
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 69 of file KWFrame.h.
Public Types | |
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 } |
Public Member Functions | |
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) |
QRect | outerRect (KWViewMode *viewMode) const |
KoRect | outerKoRect () const |
KoRect | runAroundRect () const |
const KoRect & | rect () const |
void | frameBordersChanged () |
void | updateRulerHandles () |
QBrush | backgroundColor () const |
void | setBackgroundColor (const QBrush &_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 (QDomElement &frameElem) |
void | load (QDomElement &frameElem, KWFrameSet *frameSet, int syntaxVersion) |
void | loadCommonOasisProperties (KoOasisContext &context, KWFrameSet *frameSet, const char *typeProperties) |
void | loadBorderProperties (KoStyleStack &styleStack) |
QString | saveOasisFrameStyle (KoGenStyles &mainStyles) const |
void | startOasisFrame (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, const QString &name, const QString &lastFrameName=QString::null) 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 QPoint &nPoint, bool borderOfFrameOnly=false) const |
void | setDrawFootNoteLine (bool b) |
bool | drawFootNoteLine () const |
Static Public Member Functions | |
static bool | compareFrameZOrder (KWFrame *f1, KWFrame *f2) |
Member Enumeration Documentation
enum KWFrame::RunAround |
enum KWFrame::SheetSide |
Constructor & Destructor Documentation
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::~KWFrame | ( | ) | [virtual] |
Member Function Documentation
bool KWFrame::isCopy | ( | ) | const [inline] |
KWFrameSet* KWFrame::frameSet | ( | ) | const [inline] |
int KWFrame::pageNumber | ( | ) | const |
int KWFrame::pageNumber | ( | KWDocument * | doc | ) | const |
Same as pageNumber(), but works if the frame hasn't been added to a frameset yet.
Definition at line 130 of file KWFrame.cpp.
void KWFrame::setZOrder | ( | int | z | ) | [inline] |
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.
const KoBorder& KWFrame::leftBorder | ( | ) | const [inline] |
QRect 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.
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.
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.
const KoRect& KWFrame::rect | ( | ) | const [inline] |
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.
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).
void KWFrame::setPaddingLeft | ( | double | b | ) | [inline] |
void KWFrame::setPaddingRight | ( | double | b | ) | [inline] |
void KWFrame::setPaddingTop | ( | double | b | ) | [inline] |
void KWFrame::setPaddingBottom | ( | double | b | ) | [inline] |
double KWFrame::paddingLeft | ( | ) | const [inline] |
double KWFrame::paddingRight | ( | ) | const [inline] |
double KWFrame::paddingTop | ( | ) | const [inline] |
double KWFrame::paddingBottom | ( | ) | const [inline] |
KWFrame * KWFrame::getCopy | ( | ) |
void KWFrame::save | ( | QDomElement & | frameElem | ) |
void KWFrame::load | ( | QDomElement & | frameElem, | |
KWFrameSet * | frameSet, | |||
int | syntaxVersion | |||
) |
read attributes from XML.
headerOrFooter
if true some defaults are different
Definition at line 340 of file KWFrame.cpp.
void KWFrame::startOasisFrame | ( | KoXmlWriter & | xmlWriter, | |
KoGenStyles & | mainStyles, | |||
const QString & | name, | |||
const QString & | lastFrameName = QString::null | |||
) | 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.
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:
-
h the new minimum height
double KWFrame::minimumFrameHeight | ( | void | ) | const [inline] |
bool KWFrame::frameAtPos | ( | const QPoint & | 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.
void KWFrame::setDrawFootNoteLine | ( | bool | b | ) | [inline] |
The documentation for this class was generated from the following files: