pango-sharp [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4] 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. GLib.Object High-level driver for formatting entire paragraphs of text at once.

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 provide a high-level driver for formatting entire paragraphs of text at once.

The represents and entire paragraph of text. It is initialized with a , 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.

There are also a number of parameters to adjust the formatting of a . It is possible, as well, to ignore the 2-D setup, and simply treat the results of a as a list of lines.

`using System; using Gtk; using Pango; class LayoutSample : DrawingArea { Pango.Layout layout; static void Main () { Application.Init (); new LayoutSample (); Application.Run (); } LayoutSample () { Window win = new Window ("Layout sample"); win.SetDefaultSize (400, 300); win.DeleteEvent += OnWinDelete; this.Realized += OnRealized; this.ExposeEvent += OnExposed; win.Add (this); win.ShowAll (); } void OnExposed (object o, ExposeEventArgs args) { this.GdkWindow.DrawLayout (this.Style.TextGC (StateType.Normal), 100, 150, layout); } void OnRealized (object o, EventArgs args) { layout = new Pango.Layout (this.PangoContext); layout.Wrap = Pango.WrapMode.Word; layout.FontDescription = FontDescription.FromString ("Tahoma 16"); layout.SetMarkup ("Hello Pango.Layout"); } void OnWinDelete (object o, DeleteEventArgs args) { Application.Quit (); } }`
- Constructor
  2.12.0.0
  System.Obsolete
  Pointer to the C object.
  Internal constructor

  This is an internal constructor and should not be used by user code.

- Constructor
  2.12.0.0
  a .
  Create a new PangoLayout object with attributes initialized to default values for a particular .
- Constructor
  2.12.0.0
  a .
  Create a new PangoLayout object with attributes initialized to default values for a particular .
- Property
  2.12.0.0
  Pango.Alignment Set or return the alignment for lines within the layout that do not take up the full width. an object of type an object of type
- Property
  2.12.0.0
  Pango.AttrList Sets/gets the text attributes for a Layout object. a
- Property
  2.12.0.0
  System.Boolean To be added a To be added
- Property
  2.12.0.0
  Pango.Context the used for this layout. an object of type
- Method
  2.12.0.0
  System.Void Forces recomputation of any state in the that might depend on the layout's context. This function should be called if you make changes to the context subsequent to creating the layout.
- Method
  2.12.0.0
  Pango.Layout Copies an existing layout into a new one. an object of type
- Property
  2.12.0.0
  Pango.EllipsizeMode To be added a To be added
- Property
  2.12.0.0
  Pango.FontDescription The default font description for the layout. a If no font description is set on the layout, the font description from the layout's context is used.
- Method
  2.12.0.0
  System.Void `` `` `` the byte index of the cursor location to store the strong cursor position (may be ) location to store the weak cursor position (may be ) Given an index within a layout, determines the positions that of the strong and weak cursors if the insertion point is at that index. 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.
- Method
  2.12.0.0
  System.Void `` `` rectangle used to store the extents of the layout as drawn or to indicate that the result is not needed. rectangle used to store the logical extents of the layout or to indicate that the result is not needed. Computes the logical and ink extents 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.
- Method
  2.12.0.0
  Pango.LayoutLine `` the index of a line. Retrieves a particular line. the requested , or null if the index is out of range. This layout line can be referenced and retained, but will become invalid if changes are made to the Layout.
- Method
  2.12.0.0
  Pango.LayoutLine `` To be added. To be added. To be added. To be added.
- Method
  2.12.0.0
  System.Void `` `` Rectangle used to store the extents of the layout as drawn. Rectangle used to store the logical extents of the layout. Compute the logical and ink extents of layout.

  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.

- Method
  2.12.0.0
  System.Void `` `` an object of type an object of type Determine the logical width and height of a in device units.
- Method
  2.12.0.0
  System.Void `` `` location to store the logical width, or location to store the logical height, or Determines the logical width and height of a in Pango units (device units divided by ). This is simply a convenience function around .
- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  System.Int32 Set or return the amount by which the first line should be shorter than the rest of the lines. an object of type The value can 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.
- Method
  2.12.0.0
  System.Void `` `` `` `` a byte index of a grapheme within the layout. Somewhat confusingly, for the trailing edge of the grapheme, for the leading. Returns the line index of the grapheme, starting with index 0. Returns the x offset of the grapheme in Pango units. Converts from a byte index to a line and X position. The is measured from the left edge of the line.
- Method
  2.12.0.0
  Pango.Rectangle `` a byte offset within the text buffer. Obtains the graphical position of an offset in the . a representing the position of the grapheme associated with .

  The X coordinate of the resulting represents the leading edge of the grapheme. If the direction of the grapheme is right to left, the Width value will be negative.

- Property
  2.12.0.0
  System.Boolean To be added. To be added. To be added.
- Property
  2.12.0.0
  System.Boolean To be added. To be added. To be added.
- Property
  2.12.0.0
  Pango.LayoutIter An iterator to iterate over the visual extents of the layout. a new .
- Property
  2.12.0.0
  System.Boolean Sets whether or not each complete line should be stretched to fill the entire width of the layout. an object of type This stretching is typically done by adding whitespace, but for some scripts (such as Arabic), the justification is done by extending the characters.
- Property
  2.12.0.0
  System.Int32 Retrieves the count of lines for the layout. An integer, the line count
- Property
  2.12.0.0
  Pango.LayoutLine[] The count of lines for the layout. The count of lines for the layout. To be added.
- Property
  2.12.0.0
  Pango.LayoutLine[] To be added. To be added. To be added.
- Property
  2.12.0.0
  Pango.LogAttr[] Retrieves an array of logical attributes for each character in the layout. a
- Method
  2.12.0.0
  System.Void `` `` `` `` `` `` 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. the byte index of the grapheme for the old index 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. direction to move cursor. A negative value indicates motion to the left. 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. number of characters to move forward from the location returned for 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. is always on the line where the cursor should be displayed. Computes a new cursor position from an old position and a count of positions to move visually.

  If is positive, then the new strong cursor position will be one position to the right of the old cursor position. If is negative then the new strong cursor position will be one position to the left of the old cursor position.

  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.

  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.

- Method
  2.12.0.0
  System.Void `` marked-up text Sets the layout text and attribute list from marked-up text (see markup format). Replaces the current text and attribute list.
- Method
  2.12.0.0
  System.Void `` `` `` marked-up text the character following this char is underlined. returns a parsed accelerator char from the marked-up text. Sets the text of a Layout includ Sets the layout text and attribute list from marked-up text with an accelerator marker (see markup format). Replaces the current text and attribute list.
- Method
  2.12.0.0
  System.Void `` an object of type Set the text of the layout.
- Property
  2.12.0.0
  System.Boolean Whether or not to treat newlines and similar characters as paragraph separators. an object of type

  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.

  Used when you want to allow editing of newlines on a single text line.

- Property
  2.12.0.0
  System.Int32 the amount of spacing between the lines of the layout. the amount of spacing (in )
- Property
  2.12.0.0
  Pango.TabArray The tabs to use for the layout. the current used by this layout. If no has been set, then the default tabs are in use and null is returned.

  By default, tabs are every 8 spaces.

  Setting new tabs overrides the default tabs. If Tabs is set to null, the default tabs are reinstated.

- Property
  2.12.0.0
  System.String Sets the text of the layout. a in UTF-8 encoding.
- Property
  2.12.0.0
  System.Int32 To be added. To be added. To be added.
- Property
  2.12.0.0
  System.Int32 Sets the width to which the lines of the Layout should be wrapped. an object of type
- Property
  2.12.0.0
  Pango.WrapMode Gets or sets the wrap mode Active wrap mode. The wrap mode only has an effect if a width is set on the layout using . To turn off wrapping, set the width to -1.
- Method
  2.12.0.0
  System.Boolean `` `` `` `` a , the X offset (in thousandths of a device unit) from the left edge of the layout. a , the Y offset (in thousandths of a device unit) from the top edge of the layout. a for storing the calculated byte index a to store where in the grapheme the user clicked. It will either be zero or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme. Convert from X and Y position within a layout to the byte index to the character at that logical position. a , true if the coordinates are inside the Layout. To be added.