kword
KWFrame Class Reference
#include <KWFrame.h>
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
|
what should happen when the frame is full
|
|
What happens on new page (create a new frame and reconnect, no followup, make copy).
|
|
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. |
|
Runaround side - only meaningful when RA_BOUNDINGRECT is used.
|
|
This frame will only be copied to: AnySide, OddSide or EvenSide.
|
Constructor & Destructor Documentation
|
Constructor.
Definition at line 70 of file KWFrame.cpp. |
|
Destructor.
Definition at line 103 of file KWFrame.cpp. |
Member Function Documentation
|
This is a method used to sort a list using the STL sorting methods.
Definition at line 730 of file KWFrame.cpp. |
|
Return if the point is on the frame.
Definition at line 698 of file KWFrame.cpp. |
|
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. |
|
Data stucture methods.
|
|
returns a copy of self
Definition at line 135 of file KWFrame.cpp. |
|
Drawing property: if isCopy, this frame is a copy of the previous frame in the frameset.
|
|
All borders can be custom drawn with their own colors etc.
|
|
read attributes from XML.
Definition at line 340 of file KWFrame.cpp. |
|
|
|
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. |
|
Return the _zoomed_ rectangle for this frame, including the border - for drawing.
Definition at line 185 of file KWFrame.cpp. |
|
get bottom padding
|
|
get left padding
|
|
get right padding
|
|
get top padding
|
|
Same as pageNumber(), but works if the frame hasn't been added to a frameset yet.
Definition at line 130 of file KWFrame.cpp. |
|
The page on which this frame is.
Definition at line 116 of file KWFrame.cpp. |
|
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. |
|
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. |
|
create XML to describe yourself
Definition at line 222 of file KWFrame.cpp. |
|
Only applicable to frames of the main text frameset. Set to true by KWFrameLayout if the "footnote line" should be drawn under this frame. |
|
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). |
|
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.
|
|
set bottom padding
|
|
set left padding (distance between frame contents and frame border)
|
|
set right padding
|
|
set top padding
|
|
The z-order of the frame, relative to the other frames on the same page.
|
|
Write out a draw:frame element and its style.
The caller is responsible for creating the child element and closing the draw:frame element. Definition at line 531 of file KWFrame.cpp. |
The documentation for this class was generated from the following files: