<class name="QTextFrame" doc="/**
&lt;p&gt;The &lt;a href=&quot;QTextFrame.html#QTextFrame(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextFrame&lt;/tt&gt;&lt;/a&gt; class represents a frame in a &lt;a href=&quot;QTextDocument.html&quot;&gt;&lt;tt&gt;QTextDocument&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Text frames provide structure for the text in a document. They are used as generic containers for other document elements. Frames are usually created by using QTextCursor::insertFrame().&lt;/p&gt;
&lt;p&gt;Frames can be used to create hierarchical structures in rich text documents. Each document has a root frame (QTextDocument::rootFrame()), and each frame beneath the root frame has a parent frame and a (possibly empty) list of child frames. The parent frame can be found with &lt;a href=&quot;QTextFrame.html#parentFrame()&quot;&gt;&lt;tt&gt;parentFrame&lt;/tt&gt;&lt;/a&gt;, and the &lt;a href=&quot;QTextFrame.html#childFrames()&quot;&gt;&lt;tt&gt;childFrames&lt;/tt&gt;&lt;/a&gt; function provides a list of child frames.&lt;/p&gt;
&lt;p&gt;Each frame contains at least one text block to enable text cursors to insert new document elements within. As a result, the QTextFrame::iterator class is used to traverse both the blocks and child frames within a given frame. The first and last child elements in the frame can be found with &lt;a href=&quot;QTextFrame.html#begin()&quot;&gt;&lt;tt&gt;begin&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QTextFrame.html#end()&quot;&gt;&lt;tt&gt;end&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A frame also has a format (specified using &lt;a href=&quot;QTextFrameFormat.html&quot;&gt;&lt;tt&gt;QTextFrameFormat&lt;/tt&gt;&lt;/a&gt;) which can be set with &lt;a href=&quot;QTextObject.html#setFormat(com.trolltech.qt.gui.QTextFormat)&quot;&gt;&lt;tt&gt;setFormat&lt;/tt&gt;&lt;/a&gt; and read with &lt;a href=&quot;QTextObject.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Text cursors can be obtained that point to the first and last valid cursor positions within a frame; use the &lt;a href=&quot;QTextFrame.html#firstCursorPosition()&quot;&gt;&lt;tt&gt;firstCursorPosition&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QTextFrame.html#lastCursorPosition()&quot;&gt;&lt;tt&gt;lastCursorPosition&lt;/tt&gt;&lt;/a&gt; functions for this. The frame's extent in the document can be found with &lt;a href=&quot;QTextFrame.html#firstPosition()&quot;&gt;&lt;tt&gt;firstPosition&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QTextFrame.html#lastPosition()&quot;&gt;&lt;tt&gt;lastPosition&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can iterate over a frame's contents using the QTextFrame::iterator class: this provides read-only access to its internal list of text blocks and child frames.&lt;/p&gt;

@see &lt;a href=&quot;QTextCursor.html&quot;&gt;&lt;tt&gt;QTextCursor&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextDocument.html&quot;&gt;&lt;tt&gt;QTextDocument&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QTextFrame(com.trolltech.qt.gui.QTextDocument doc)" doc="/**
&lt;p&gt;Creates a new empty frame for the text &lt;tt&gt;doc&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QTextFrame_iterator begin()" doc="/**
&lt;p&gt;Returns an iterator pointing to the first document element inside the frame.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#end()&quot;&gt;&lt;tt&gt;end&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.gui.QTextFrame&gt; childFrames()" doc="/**
&lt;p&gt;Returns a (possibly empty) list of the frame's child frames.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#parentFrame()&quot;&gt;&lt;tt&gt;parentFrame&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QTextFrame_iterator end()" doc="/**
&lt;p&gt;Returns an iterator pointing to the last document element inside the frame.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#begin()&quot;&gt;&lt;tt&gt;begin&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QTextCursor firstCursorPosition()" doc="/**
&lt;p&gt;Returns the first cursor position inside the frame.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#lastCursorPosition()&quot;&gt;&lt;tt&gt;lastCursorPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#firstPosition()&quot;&gt;&lt;tt&gt;firstPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#lastPosition()&quot;&gt;&lt;tt&gt;lastPosition&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int firstPosition()" doc="/**
&lt;p&gt;Returns the first document position inside the frame.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#lastPosition()&quot;&gt;&lt;tt&gt;lastPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#firstCursorPosition()&quot;&gt;&lt;tt&gt;firstCursorPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#lastCursorPosition()&quot;&gt;&lt;tt&gt;lastCursorPosition&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QTextFrameFormat frameFormat()" doc="/**
&lt;p&gt;Returns the frame's format.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#setFrameFormat(com.trolltech.qt.gui.QTextFrameFormat)&quot;&gt;&lt;tt&gt;setFrameFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QTextCursor lastCursorPosition()" doc="/**
&lt;p&gt;Returns the last cursor position inside the frame.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#firstCursorPosition()&quot;&gt;&lt;tt&gt;firstCursorPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#firstPosition()&quot;&gt;&lt;tt&gt;firstPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#lastPosition()&quot;&gt;&lt;tt&gt;lastPosition&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int lastPosition()" doc="/**
&lt;p&gt;Returns the last document position inside the frame.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#firstPosition()&quot;&gt;&lt;tt&gt;firstPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#firstCursorPosition()&quot;&gt;&lt;tt&gt;firstCursorPosition&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTextFrame.html#lastCursorPosition()&quot;&gt;&lt;tt&gt;lastCursorPosition&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QTextFrame parentFrame()" doc="/**
&lt;p&gt;Returns the frame's parent frame. If the frame is the root frame of a document, this will return 0.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#childFrames()&quot;&gt;&lt;tt&gt;childFrames&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QTextDocument::rootFrame&lt;/tt&gt; */"/>
    <method name="public final void setFrameFormat(com.trolltech.qt.gui.QTextFrameFormat format)" doc="/**
&lt;p&gt;Sets the frame's &lt;tt&gt;format&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QTextFrame.html#frameFormat()&quot;&gt;&lt;tt&gt;frameFormat&lt;/tt&gt;&lt;/a&gt; */"/>
</class>
