<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <linklocation="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<summary>High-level driver for formatting entire paragraphs of text at once.</summary>
<remarks>
<para>While complete access to the layout capabilities of Pango is provided using the detailed interfaces for itemization and shaping, using that functionality directly involves writing a fairly large amount of code. The objects and functions in <seecref="T:Pango.Layout"/> provide a high-level driver for formatting entire paragraphs of text at once.</para>
<para>The <seecref="T:Pango.Layout"/> represents and entire paragraph of text. It is initialized with a <seecref="T:Pango.Context"/>, UTF-8 string and set of attributes for that string. Once that is done, the set of formatted lines can be extracted from the object, the layout can be rendered, and conversion between logical character positions within the layout's text, and the physical position of the resulting glyphs can be made.</para>
<para>There are also a number of parameters to adjust the formatting of a <seecref="T:Pango.Layout"/>. It is possible, as well, to ignore the 2-D setup, and simply treat the results of a <seecref="T:Pango.Layout"/> as a list of lines.</para>
<summary>Determines the logical width and height of a <seecref="T:Pango.Layout"/> in Pango units (device units divided by <seecref="F:Pango.Scale.PangoScale"/>).</summary>
<paramname="width"> location to store the logical width, or <seelangword="null"/></param>
<paramname="height"> location to store the logical height, or <seelangword="null"/></param>
<remarks>This is simply a convenience function around <seecref="M:Pango.Layout.GetExtents()"/>.</remarks>
<remarks>The value be negative, in which case the subsequent lines will be shorter than the first line. (However, in either case, the entire width of the layout will be given by the value.</remarks>
<summary>The tabs to use for the layout.</summary>
<paramname="value">the tabs to use for the layout.</param>
<returns>the current <seecref="T:Pango.TabArray"/> used by this layout. If no <seecref="T:Pango.TabArray"/> has been set, then the default tabs are in use and null is returned.</returns>
<remarks>
<para>By default, tabs are every 8 spaces.</para>
<para>Setting new tabs overrides the default tabs. If Tabs is set to null, the default tabs are reinstated.</para>
<para>If set to true, do not treat newlines and similar characters as paragraph separators; instead, keep all text in a single paragraph, and display a glyph for paragraph separator characters.</para>
<para>Used when you want to allow editing of newlines on a single text line.</para>
<remarks>This stretching is typically done by adding whitespace, but for some scripts (such as Arabic), the justification is done by extending the characters.</remarks>
<remarks>The wrap mode only has an effect if a width is set on the layout using <seecref="P:Pango.Layout.Width"/>. To turn off wrapping, set the width to -1.</remarks>
<MemberSignatureLanguage="C#"Value="public void MoveCursorVisually (bool strong, int old_index, int old_trailing, int direction, out int new_index, out int new_trailing);"/>
<summary>Computes a new cursor position from an old position and a count of positions to move visually.</summary>
<paramname="strong"> whether the moving cursor is the strong cursor or the weak cursor. The strong cursor is the cursor corresponding to text insertion in the base direction for the layout.</param>
<paramname="old_index"> the byte index of the grapheme for the old index </param>
<paramname="old_trailing"> if 0, the cursor was at the trailing edge of the grapheme indicated by old_index, if > 0, the cursor was at the leading edge.</param>
<paramname="direction"> direction to move cursor. A negative value indicates motion to the left.</param>
<paramname="new_index"> location to store the new cursor byte index. A value of -1 indicates that the cursor has been moved off the beginning of the layout. A value of G_MAXINT indicates that the cursor has been moved off the end of the layout.</param>
<paramname="new_trailing"> number of characters to move forward from the location returned for <paramrefname="new_index"/> to get the position where the cursor should be displayed. This allows distinguishing the position at the beginning of one line from the position at the end of the preceding line. <paramrefname="new_index"/> is always on the line where the cursor should be displayed.</param>
<remarks>
<para>If <paramrefname="count"/> is positive, then the new strong cursor position will be one position to the right of the old cursor position. If <paramrefname="count"/> is negative then the new strong cursor position will be one position to the left of the old cursor position.
</para>
<para>In the presence of bi-directional text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run.
</para>
<para>Motion here is in cursor positions, not in characters, so a single call may move the cursor over multiple characters when multiple characters combine to form a single grapheme.
<summary>Computes a new cursor position from an old position and a count of positions to move visually.</summary>
<paramname="strong">whether the moving cursor is the strong cursor or the weak cursor. The strong cursor is the cursor corresponding to text insertion in the base direction for the layout.</param>
<paramname="old_index">the byte index of the grapheme for the old index.</param>
<paramname="old_trailing">if 0, the cursor was at the trailing edge of the grapheme indicated by old_index, if > 0, the cursor was at the leading edge.</param>
<paramname="direction">direction to move cursor. A negative value indicates motion to the left.</param>
<para>If count is positive, then the new strong cursor position will be one position to the right of the old cursor position. If count is position then the new strong cursor position will be one position to the left of the old cursor position.</para>
<para>In the presence of bidirection text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run.</para>
<para>Motion here is in cursor positions, not in characters, so a single call to MoveCursorVisually() may move the cursor over multiple characters when multiple characters combine to form a single grapheme.</para>
<summary>Convert from X and Y position within a layout to the byte index to the character at that logical position.</summary>
<paramname="x">the X offset from the left edge of the layout.</param>
<returns>true if the coordinates were inside text.</returns>
<remarks>If the position is not inside the layout, the closest position is chosen (the x/y position will be clamped inside the layout). If a closest position is chosen, then the function returns false; on an exact hit, it returns true.</remarks>
<summary>Computes the logical and ink extents</summary>
<paramname="ink_rect"> rectangle used to store the extents of the layout as drawn or <seelangword="null"/> to indicate that the result is not needed.</param>
<paramname="logical_rect"> rectangle used to store the logical extents of the layout or <seelangword="null"/> to indicate that the result is not needed.</param>
<remarks>Logical extents are usually what you want for positioning things. The extents are given in layout coordinates; layout coordinates begin at the top left corner of the layout.</remarks>
<summary>Obtains the graphical position of an offset in the <seecref="T:Pango.Layout"/>.</summary>
<paramname="index_">a byte offset within the text buffer.</param>
<returns>a <seecref="T:Pango.Rectangle"/> representing the position of the grapheme associated with <paramrefname="index_"/>.</returns>
<remarks>
<para>
The X coordinate of the resulting <seecref="T:Pango.Rectangle"/> represents the leading edge of the grapheme. If the direction of the grapheme is right to left, the Width value will be negative.
<summary>Compute the logical and ink extents of layout.</summary>
<paramname="ink_rect">Rectangle used to store the extents of the layout as drawn.</param>
<paramname="logical_rect">Rectangle used to store the logical extents of the layout.</param>
<remarks>
<para>
Logical extents are usually what you want for positioning things. The extents are given in layout coordinates; layout coordinates begin at the top left corner of the layout.
<summary>Given an index within a layout, determines the positions that of the strong and weak cursors if the insertion point is at that index.</summary>
<paramname="index_"> the byte index of the cursor</param>
<paramname="strong_pos"> location to store the strong cursor position (may be <seelangword="null"/>)</param>
<paramname="weak_pos"> location to store the weak cursor position (may be <seelangword="null"/>)</param>
<remarks>The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the layout are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the layout are inserted.</remarks>