Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QAbstractTextDocumentLayout class is an abstract base class used to implement custom layouts for QTextDocuments. More...
Classes | |
class | PaintContext |
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout. More... | |
class | Selection |
The QAbstractTextDocumentLayout::Selection class is a convenience class defining the parameters of a selection. More... | |
Public Member Functions | |
QAbstractTextDocumentLayout (QTextDocument doc) | |
| |
override void | CreateProxy () |
new string | AnchorAt (QPointF pos) |
| |
abstract QRectF | BlockBoundingRect (QTextBlock block) |
| |
new QTextDocument | Document () |
| |
abstract QSizeF | DocumentSize () |
| |
abstract void | Draw (QPainter painter, QAbstractTextDocumentLayout.PaintContext context) |
| |
abstract QRectF | FrameBoundingRect (QTextFrame frame) |
| |
new QTextObjectInterface | HandlerForObject (int objectType) |
| |
abstract int | HitTest (QPointF point, Qt.HitTestAccuracy accuracy) |
| |
abstract int | PageCount () |
| |
new void | RegisterHandler (int objectType, QObject component) |
| |
new void | Dispose () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | OnEvent (QEvent arg1) |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Static Public Member Functions | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
Static Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QAbstractTextDocumentLayout (System.Type dummy) | |
abstract void | DocumentChanged (int from, int charsRemoved, int charsAdded) |
| |
new void | OnDocumentSizeChanged (QSizeF newSize) |
| |
virtual void | DrawInlineObject (QPainter painter, QRectF rect, QTextInlineObject @object, int posInDocument, QTextFormat format) |
| |
new QTextCharFormat | Format (int pos) |
| |
new int | FormatIndex (int pos) |
new void | OnPageCountChanged (int newPages) |
| |
virtual void | PositionInlineObject (QTextInlineObject item, int posInDocument, QTextFormat format) |
| |
virtual void | ResizeInlineObject (QTextInlineObject item, int posInDocument, QTextFormat format) |
| |
new void | OnUpdate () |
| |
new void | OnUpdate (QRectF arg1) |
| |
new void | OnUpdateBlock (QTextBlock block) |
| |
Protected Member Functions inherited from QtCore.QObject | |
QObject (System.Type dummy) | |
virtual void | OnChildEvent (QChildEvent arg1) |
| |
virtual void | ConnectNotify (string signal) |
| |
virtual void | OnCustomEvent (QEvent arg1) |
| |
new void | OnDestroyed (QObject arg1=null) |
| |
virtual void | DisconnectNotify (string signal) |
| |
new int | Receivers (string signal) |
| |
new QObject | Sender () |
| |
new int | SenderSignalIndex () |
| |
virtual void | OnTimerEvent (QTimerEvent arg1) |
| |
Properties | |
Slot< QRectF > | UpdateQRectF |
Slot | Update |
| |
Slot< QTextBlock > | UpdateBlock |
| |
Slot< QSizeF > | DocumentSizeChanged |
| |
Slot< System.Int32 > | PageCountChanged |
| |
new IQPaintDevice | PaintDevice [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQAbstractTextDocumentLayoutSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
new QObject | Parent [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
The QAbstractTextDocumentLayout class is an abstract base class used to implement custom layouts for QTextDocuments.
The standard layout provided by Qt can handle simple word processing including inline images, lists and tables.
Some applications, e.g., 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 QAbstractTextDocumentLayout to provide custom layout behavior for your text documents.
An instance of the QAbstractTextDocumentLayout subclass can be installed on a QTextDocument object with the setDocumentLayout() function.
You can insert custom objects into a QTextDocument; see the QTextObjectInterface class description for details.
See also QTextObjectInterface.
|
protected |
QtGui.QAbstractTextDocumentLayout.QAbstractTextDocumentLayout | ( | QTextDocument | doc | ) |
Creates a new text document layout for the given document.
new string QtGui.QAbstractTextDocumentLayout.AnchorAt | ( | QPointF | pos | ) |
Returns the reference of the anchor the given position, or an empty string if no anchor exists at that point.
|
pure virtual |
Returns the bounding rectangle of block.
Implemented in QtGui.QPlainTextDocumentLayout.
|
virtual |
Reimplemented from QtCore.QObject.
Reimplemented in QtGui.QPlainTextDocumentLayout.
new void QtGui.QAbstractTextDocumentLayout.Dispose | ( | ) |
new QTextDocument QtGui.QAbstractTextDocumentLayout.Document | ( | ) |
Returns the text document that this layout is operating on.
|
protectedpure virtual |
This function is called whenever the contents of the document change. A change occurs when text is inserted, removed, or a combination of these two. The change is specified by position, charsRemoved, and charsAdded corresponding to the starting character position of the change, the number of characters removed from the document, and the number of characters added.
For example, when inserting the text "Hello" into an empty document, charsRemoved would be 0 and charsAdded would be 5 (the length of the string).
Replacing text is a combination of removing and inserting. For example, if the text "Hello" gets replaced by "Hi", charsRemoved would be 5 and charsAdded would be 2.
For subclasses of QAbstractTextDocumentLayout, this is the central function where a large portion of the work to lay out and position document contents is done.
For example, in a subclass that only arranges blocks of text, an implementation of this function would have to do the following:
Determine the list of changed QTextBlock(s) using the parameters provided.
Each QTextBlock object's corresponding QTextLayout object needs to be processed. You can access the QTextBlock's layout using the QTextBlock::layout() function. This processing should take the document's page size into consideration.
If the total number of pages changed, the pageCountChanged() signal should be emitted.
If the total size changed, the documentSizeChanged() signal should be emitted.
The update() signal should be emitted to schedule a repaint of areas in the layout that require repainting.
See also QTextLayout.
Implemented in QtGui.QPlainTextDocumentLayout.
|
pure virtual |
Returns the total size of the document's layout.
This information can be used by display widgets to update their scroll bars correctly.
See also documentSizeChanged() and QTextDocument::pageSize.
Implemented in QtGui.QPlainTextDocumentLayout.
|
pure virtual |
Draws the layout with the given painter using the given context.
Implemented in QtGui.QPlainTextDocumentLayout.
|
protectedvirtual |
This function is called to draw the inline object, object, with the given painter within the rectangle specified by rect using the specified text format.
posInDocument specifies the position of the object within the document.
The default implementation calls drawObject() on the object handlers. This function is called only within Qt. Subclasses can reimplement this function to customize the drawing of inline objects.
See also draw().
|
protected |
Returns the character format that is applicable at the given position.
|
protected |
|
pure virtual |
Returns the bounding rectangle of frame.
Implemented in QtGui.QPlainTextDocumentLayout.
new QTextObjectInterface QtGui.QAbstractTextDocumentLayout.HandlerForObject | ( | int | objectType | ) |
Returns a handler for objects of the given objectType.
|
pure virtual |
Returns the cursor postion for the given point with the specified accuracy. Returns -1 if no valid cursor position was found.
Implemented in QtGui.QPlainTextDocumentLayout.
|
protected |
This signal is emitted when the size of the document layout changes to newSize.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the document's entire layout size changes. This signal is useful for widgets that display text documents since it enables them to update their scroll bars correctly.
See also documentSize().
|
protected |
This signal is emitted when the number of pages in the layout changes; newPages is the updated page count.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the number of pages in the layout has changed. Changes to the page count are caused by changes to the layout or the document content itself.
See also pageCount().
|
protected |
This signal is emitted when the rectangle rect has been updated.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the layout of the contents change in order to repaint.
|
protected |
This signal is emitted when the rectangle rect has been updated.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the layout of the contents change in order to repaint.
|
protected |
This signal is emitted when the specified block has been updated.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the layout of block has changed in order to repaint.
This function was introduced in Qt 4.4.
|
pure virtual |
Returns the number of pages contained in the layout.
See also pageCountChanged().
Implemented in QtGui.QPlainTextDocumentLayout.
|
protectedvirtual |
Lays out the inline object item using the given text format.
posInDocument specifies the position of the object within the document.
The default implementation does nothing. This function is called only within Qt. Subclasses can reimplement this function to customize the position of inline objects.
See also drawInlineObject().
new void QtGui.QAbstractTextDocumentLayout.RegisterHandler | ( | int | objectType, |
QObject | component | ||
) |
Registers the given component as a handler for items of the given objectType.
Note: registerHandler() has to be called once for each object type. This means that there is only one handler for multiple replacement characters of the same object type.
|
protectedvirtual |
Sets the size of the inline object item corresponding to the text format.
posInDocument specifies the position of the object within the document.
The default implementation resizes the item to the size returned by the object handler's intrinsicSize() function. This function is called only within Qt. Subclasses can reimplement this function to customize the resizing of inline objects.
|
static |
|
static |
|
static |
|
static |
|
addremove |
This signal is emitted when the size of the document layout changes to newSize.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the document's entire layout size changes. This signal is useful for widgets that display text documents since it enables them to update their scroll bars correctly.
See also documentSize().
|
getprotected |
|
addremove |
This signal is emitted when the number of pages in the layout changes; newPages is the updated page count.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the number of pages in the layout has changed. Changes to the page count are caused by changes to the layout or the document content itself.
See also pageCount().
|
getset |
Returns the paint device used to render the document's layout.
Sets the paint device used for rendering the document's layout to the given device.
|
staticget |
|
addremove |
This signal is emitted when the rectangle rect has been updated.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the layout of the contents change in order to repaint.
|
addremove |
This signal is emitted when the specified block has been updated.
Subclasses of QAbstractTextDocumentLayout should emit this signal when the layout of block has changed in order to repaint.
This function was introduced in Qt 4.4.
|
addremove |