~ubuntu-branches/ubuntu/natty/pangomm/natty

« back to all changes in this revision

Viewing changes to pango/pangomm/layout.h

  • Committer: Bazaar Package Importer
  • Author(s): Deng Xiyue
  • Date: 2009-04-03 00:35:01 UTC
  • mfrom: (5.1.2 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090403003501-y05hsap2s021a2rr
Tags: 2.24.0-2
* Upload to unstable.
  + Drop check-dist.mk.
  + Track unstable branch in Vcs-*.
* Change -dbg package to section debug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * Copyright(C) 1998-1999 The gtkmm Development Team
14
14
 *
15
15
 * This library is free software; you can redistribute it and/or
16
 
 * modify it under the terms of the GNU Library General Public
 
16
 * modify it under the terms of the GNU Lesser General Public
17
17
 * License as published by the Free Software Foundation; either
18
 
 * version 2 of the License, or(at your option) any later version.
 
18
 * version 2.1 of the License, or(at your option) any later version.
19
19
 *
20
20
 * This library is distributed in the hope that it will be useful,
21
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23
 
 * Library General Public License for more details.
 
23
 * Lesser General Public License for more details.
24
24
 *
25
 
 * You should have received a copy of the GNU Library General Public
 
25
 * You should have received a copy of the GNU Lesser General Public
26
26
 * License along with this library; if not, write to the Free
27
27
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28
28
 */
343
343
   * this value if the layout contains multiple paragraphs of text.
344
344
   * The default value of -1 means that first line of each paragraph is ellipsized.
345
345
   * This behvaior may be changed in the future to act per layout instead of per
346
 
   * paragraph.  File a bug against pango at http://bugzilla.gnome.org/ if your
 
346
   * paragraph.  File a bug against pango at <ulink
 
347
   * url="http://bugzilla.gnome.org/">http://bugzilla.gnome.org/</ulink> if your
347
348
   * code relies on this behavior.
348
349
   * 
349
350
   * Height setting only has effect if a positive width is set on
493
494
   * (by default, tabs are every 8 spaces). If @a tabs is <tt>0</tt>, the default
494
495
   * tabs are reinstated. @a tabs is copied into the layout; you must
495
496
   * free your copy of @a tabs yourself.
496
 
   * @param tabs A Pango::TabArray.
 
497
   * @param tabs A Pango::TabArray, or <tt>0</tt>.
497
498
   */
498
499
  void set_tabs(TabArray& tabs);
499
500
  
603
604
   * (X position is measured from the left edge of the line)
604
605
   * @param index The byte index of a grapheme within the layout.
605
606
   * @param trailing An integer indicating the edge of the grapheme to retrieve the
606
 
   * position of. If 0, the trailing edge of the grapheme, if &gt; 0,
 
607
   * position of. If 0, the trailing edge of the grapheme, if > 0,
607
608
   * the leading of the grapheme.
608
609
   * @param line Location to store resulting line index. (which will
609
610
   * between 0 and pango_layout_get_line_count(layout) - 1).
661
662
   * to text insertion in the base direction for the layout.
662
663
   * @param old_index The byte index of the grapheme for the old index.
663
664
   * @param old_trailing If 0, the cursor was at the trailing edge of the
664
 
   * grapheme indicated by @a old_index, if &gt; 0, the cursor
 
665
   * grapheme indicated by @a old_index, if > 0, the cursor
665
666
   * was at the leading edge.
666
667
   * @param direction Direction to move cursor. A negative
667
668
   * value indicates motion to the left.
783
784
   * Use the faster pango_layout_get_line_readonly() if you do not plan
784
785
   * to modify the contents of the line (glyphs, glyph widths, etc.).
785
786
   * @param line The index of a line, which must be between 0 and
786
 
   * <tt>pango_layout_get_line_count(layout) - 1</tt>, inclusive.
 
787
   * <literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.
787
788
   * @return The requested Pango::LayoutLine, or <tt>0</tt> if the
788
789
   * index is out of range. This layout line can
789
790
   * be ref'ed and retained, but will become invalid
797
798
   * but the user is not expected
798
799
   * to modify the contents of the line (glyphs, glyph widths, etc.).
799
800
   * @param line The index of a line, which must be between 0 and
800
 
   * <tt>pango_layout_get_line_count(layout) - 1</tt>, inclusive.
 
801
   * <literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.
801
802
   * @return The requested Pango::LayoutLine, or <tt>0</tt> if the
802
803
   * index is out of range. This layout line can
803
804
   * be ref'ed and retained, but will become invalid
810
811
 
811
812
  //Note that the const version uses a different (faster) C function:
812
813
  
813
 
  /** Return value: a SList containing the lines in the layout. This
814
 
   * @return A SList containing the lines in the layout. This
815
 
   * points to internal data of the Pango::Layout and must be used with
816
 
   * care. It will become invalid on any change to the layout's
 
814
  /** Return value: (element-type Pango.LayoutLine): (transfer none): a SList containing
 
815
   * @return (element-type Pango.LayoutLine): (transfer none): a SList containing
 
816
   * the lines in the layout. This points to internal data of the Pango::Layout
 
817
   * and must be used with care. It will become invalid on any change to the layout's
817
818
   * text or properties.
818
819
   */
819
820
  SListHandle_LayoutLine get_lines();
820
821
  
821
 
  /** Return value: a SList containing the lines in the layout. This
822
 
   * @return A SList containing the lines in the layout. This
823
 
   * points to internal data of the Pango::Layout and must be used with
824
 
   * care. It will become invalid on any change to the layout's
 
822
  /** Return value: (element-type Pango.LayoutLine): (transfer none): a SList containing
 
823
   * @return (element-type Pango.LayoutLine): (transfer none): a SList containing
 
824
   * the lines in the layout. This points to internal data of the Pango::Layout and
 
825
   * must be used with care. It will become invalid on any change to the layout's
825
826
   * text or properties.  No changes should be made to the lines.
826
827
   * 
827
828
   * Since: 1.16.
842
843
   */
843
844
  void add_to_cairo_context(const Cairo::RefPtr<Cairo::Context>& context);
844
845
 
 
846
  /** Draws a Layout in the specified Cairo @a context. The top-left
 
847
   *  corner of the Layout will be drawn at the current point of the
 
848
   *  cairo context.
 
849
   *
 
850
   * @param context A Cairo context.
 
851
   *
 
852
   * @newin2p16
 
853
   */
 
854
  void show_in_cairo_context(const Cairo::RefPtr<Cairo::Context>& context);
 
855
 
845
856
 
846
857
public:
847
858