<class name="QAbstractTextDocumentLayout" doc="/** <p>The <a href="QAbstractTextDocumentLayout.html#QAbstractTextDocumentLayout(com.trolltech.qt.gui.QTextDocument)"><tt>QAbstractTextDocumentLayout</tt></a> class is an abstract base class used to implement custom layouts for QTextDocuments.</p> <p>The standard layout provided by Qt can handle simple word processing including inline layouts, lists and tables.</p> <p>Some applications (e.g&#x2e; a word processor or a DTP application) might need more features than the ones provided by Qt's layout engine, in which case you can subclass <a href="QAbstractTextDocumentLayout.html#QAbstractTextDocumentLayout(com.trolltech.qt.gui.QTextDocument)"><tt>QAbstractTextDocumentLayout</tt></a> to provide your own custom layout behavior for your text documents.</p> */"> <signal name="protected final void documentSizeChanged(com.trolltech.qt.core.QSizeF newSize)" doc="/** <p>This signal is emitted when the size of the document changes. The new size is specified by <tt>newSize</tt>.</p> <p>This information is useful to widgets that display text documents since it enables them to update their scroll bars correctly.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QSizeF newSize)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QAbstractTextDocumentLayout.html#documentSize()"><tt>documentSize</tt></a></dd> </dl> */"/> <signal name="protected final void pageCountChanged(int newPages)" doc="/** <p>This signal is emitted when the number of pages in the layout changes; <tt>newPages</tt> is the updated page count.</p> <p>Changes to the page count are due to the changes to the layout or the document content itself.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int newPages)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QAbstractTextDocumentLayout.html#pageCount()"><tt>pageCount</tt></a></dd> </dl> */"/> <signal name="protected final void update(com.trolltech.qt.core.QRectF arg__1)" doc="/** <p>This signal is emitted when the rectangle <tt>arg__1</tt> has been updated.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QRectF arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <method name="public QAbstractTextDocumentLayout(com.trolltech.qt.gui.QTextDocument doc)" doc="/** <p>Creates a new text document layout for the given <tt>doc</tt>.</p> */"/> <method name="public final java.lang.String anchorAt(com.trolltech.qt.core.QPointF pos)" doc="/** <p>Returns the reference of the anchor at the given <tt>pos</tt>, or an empty string if no anchor exists at that point.</p> */"/> <method name="public final com.trolltech.qt.gui.QTextDocument document()" doc="/** <p>Returns the text document that this layout is operating on.</p> */"/> <method name="protected final com.trolltech.qt.gui.QTextCharFormat format(int pos)" doc="/** <p>Returns the character format that is applicable at the given <tt>pos</tt>.</p> */"/> <method name="protected final int formatIndex(int pos)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public final com.trolltech.qt.gui.QTextObjectInterface handlerForObject(int objectType)" doc="/** <p>Returns a handler for objects of the given <tt>objectType</tt>.</p> */"/> <method name="public final com.trolltech.qt.gui.QPaintDeviceInterface paintDevice()" doc="/** <p>Returns the paint device used to render the document's layout.</p> @see <a href="QAbstractTextDocumentLayout.html#setPaintDevice(com.trolltech.qt.gui.QPaintDeviceInterface)"><tt>setPaintDevice</tt></a> */"/> <method name="public final void registerHandler(int objectType, com.trolltech.qt.core.QObject component)" doc="/** <p>Registers the given <tt>component</tt> as a handler for items of the given <tt>objectType</tt>.</p> */"/> <method name="public final void setPaintDevice(com.trolltech.qt.gui.QPaintDeviceInterface device)" doc="/** <p>Sets the paint device used for rendering the document's layout to the given <tt>device</tt>.</p> @see <a href="QAbstractTextDocumentLayout.html#paintDevice()"><tt>paintDevice</tt></a> */"/> <method name="public abstract com.trolltech.qt.core.QRectF blockBoundingRect(com.trolltech.qt.gui.QTextBlock block)" doc="/** <p>Returns the bounding rectangle of <tt>block</tt>.</p> */"/> <method name="protected abstract void documentChanged(int from, int charsRemoved, int charsAdded)" doc="/** <p>This function is called whenever the contents of the document change. A change occurs when text is inserted, removed, or a combination of the two types of operation. The change is specified by <tt>from</tt>, <tt>charsRemoved</tt>, and <tt>charsAdded</tt> corresponding to the starting character position of the change, the number of character removed from the document, and the number of characters added.</p> <p>For example, when inserting the text &quot;Hello&quot; into an empty document, <tt>charsRemoved</tt> would be 0 and <tt>charsAdded</tt> would be 5 (the length of the string).</p> <p>Replacing text is the combination of removal and insertion. For example, if the text &quot;Hello&quot; gets replaced by &quot;Hi&quot;, <tt>charsRemoved</tt> would be 5 and <tt>charsAdded</tt> would be 2.</p> */"/> <method name="public abstract com.trolltech.qt.core.QSizeF documentSize()" doc="/** <p>Returns the total size of the document. This is useful to display widgets since they can use to information to update their scroll bars correctly</p> @see <a href="QAbstractTextDocumentLayout.html#documentSizeChanged(com.trolltech.qt.core.QSizeF)"><tt>documentSizeChanged</tt></a> @see <tt>QTextDocument::pageSize</tt> */"/> <method name="public abstract void draw(com.trolltech.qt.gui.QPainter painter, com.trolltech.qt.gui.QAbstractTextDocumentLayout_PaintContext context)" doc="/** <p>Draws the layout on the given <tt>painter</tt> with the given <tt>context</tt>.</p> */"/> <method name="protected void drawInlineObject(com.trolltech.qt.gui.QPainter painter, com.trolltech.qt.core.QRectF rect, com.trolltech.qt.gui.QTextInlineObject object, int posInDocument, com.trolltech.qt.gui.QTextFormat format)" doc="/** <p>Called to draw the inline object <tt>object</tt> on the given <tt>painter</tt> within the rectangle specified by <tt>rect</tt> using the text format specified by <tt>format</tt>. <tt>posInDocument</tt> specifies the position of the object within the document.</p> @see <a href="QAbstractTextDocumentLayout.html#draw(com.trolltech.qt.gui.QPainter, com.trolltech.qt.gui.QAbstractTextDocumentLayout_PaintContext)"><tt>draw</tt></a> */"/> <method name="public abstract com.trolltech.qt.core.QRectF frameBoundingRect(com.trolltech.qt.gui.QTextFrame frame)" doc="/** <p>Returns the bounding rectacle of <tt>frame</tt>. Returns the bounding rectangle of <tt>frame</tt>.</p> */"/> <method name="public abstract int hitTest(com.trolltech.qt.core.QPointF point, com.trolltech.qt.core.Qt.HitTestAccuracy accuracy)" doc="/** <p>Returns the cursor postion for the given <tt>point</tt> with the <tt>accuracy</tt> specified. Returns -1 to indicate failure if no valid cursor position was found.</p> */"/> <method name="public abstract int pageCount()" doc="/** <p>Returns the number of pages required by the layout.</p> @see <a href="QAbstractTextDocumentLayout.html#pageCountChanged(int)"><tt>pageCountChanged</tt></a> */"/> <method name="protected void positionInlineObject(com.trolltech.qt.gui.QTextInlineObject item, int posInDocument, com.trolltech.qt.gui.QTextFormat format)" doc="/** <p>Lays out the inline object <tt>item</tt> using the given text <tt>format</tt>. The base class implementation does nothing. <tt>posInDocument</tt> specifies the position of the object within the document.</p> @see <a href="QAbstractTextDocumentLayout.html#drawInlineObject(com.trolltech.qt.gui.QPainter, com.trolltech.qt.core.QRectF, com.trolltech.qt.gui.QTextInlineObject, int, com.trolltech.qt.gui.QTextFormat)"><tt>drawInlineObject</tt></a> */"/> <method name="protected void resizeInlineObject(com.trolltech.qt.gui.QTextInlineObject item, int posInDocument, com.trolltech.qt.gui.QTextFormat format)" doc="/** <p>Sets the size of the inline object <tt>item</tt> in accordance with the text <tt>format</tt>. <tt>posInDocument</tt> specifies the position of the object within the document.</p> */"/> </class>