[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] create - Pango::Layout

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2005年 11月 10日 (木) 16:00:09 JST


-------------------------
REMOTE_ADDR = 15.211.169.100
REMOTE_HOST = 
REMOTE_USER = ruby-gnome2-hiki
        URL = /hiki.cgi?Pango%3A%3ALayout
-------------------------
TITLE       = Pango::Layout
KEYWORD     = 
= class Pango::Layout
The Pango::Layout class represents and entire paragraph of text. It is initialized with a 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. 

There are also a number of parameters to adjust the formatting of a Pango::Layout, which are illustrated in Figure 1, 鄭djustable parameters for a Pango::Layout It is possible, as well, to ignore the 2-D setup, and simply treat the results of a Pango::Layout as a list of lines. 

=== Figure 1. Adjustable parameters for a Pango::Layout
((<URL:http://developer.gnome.org/doc/API/2.0/pango/layout.gif>))

== Object Hierarchy
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Pango::Layout

== Class Methods
--- Pango::Layout.new
    Create a new Pango::Layout object with attributes initialized to default values for a particular Pango::Context.
    * Returns: a new Pango::Layout  

== Instance Methods
--- context
    Retrieves the Pango::Context used for this layout.
    * Returns: The Pango::Context for the layout 

--- context_changed
    Forces recomputation of any state in the Pango::Layout that might depend on the layout's context. This method should be called if you make changes to the context subsequent to creating the layout.
    * Returns: self

--- text
    Gets the text in the layout. 
    * Returns: the text in the layout  
--- text=(text)
    Sets the text of the layout.
    * text: a UTF-8 string
    * Returns: self
--- set_text(text)
    Same as Pango::Layout#text=.
    * text: a UTF-8 string
    * Returns: self

--- markup=(markup)
    Same as Pango::Layout#set_markup(markup, nil).
    * markup: some marked-up text (see ((<markup format|pango-markup>)))  
    * Returns: any located accelerators  
--- set_markup(markup, accel_marker = nil)
    Sets the layout text and attribute list from marked-up text (see markup format). Replaces the current text and attribute list. If accel_marker is non-nil, the given character will mark the character following it as an accelerator. For example, the accel marker might be an ampersand or underscore. All characters marked as an accelerator will receive a Pango::UNDERLINE_LOW attribute, and the first character so marked will be returned value. Two accel_marker characters following each other produce a single literal accel_marker character.
    * markup: some marked-up text (see ((<markup format|pango-markup>)))  
    * accel_marker : marker for accelerators in the text or nil
    * Returns: any located accelerators  

--- attributes
    Gets the attribute list for the layout, if any.
    * Returns : a Pango::AttrList
--- attributes=(attrs)
    Sets the text attributes for a layout object.
    * attrs : a Pango::AttrList  
    * Returns: attrs
--- set_attributes(attrs)
    Same as Pango::Layout#attributes=
    * attrs : a Pango::AttrList  
    * Returns: self

--- font_description
    Gets the font description for the layout, if any.
    * Returns: the layout's font description(Pango::FontDescription), or nil if the font description from the layout's context is inherited. 
--- font_description=(desc)
    Sets the default font description for the layout. If no font description is set on the layout, the font description from the layout's context is used.
    * desc: the new Pango::FontDescription, or nil to unset the current font description.
    * Returns: desc
--- set_font_description(desc)
    Same as Pango::Layout#font_description=.
    * desc: the new Pango::FontDescription, or nil to unset the current font description.
    * Returns: self

--- width
    
     * Returns: self
--- width=
     
     * Returns: self
--- set_width
     
     * Returns: self

--- alignment
     
     * Returns: self
--- alignment=
     
     * Returns: self
--- auto_dir=
     
     * Returns: self
--- auto_dir?
     
     * Returns: self

--- copy
     
     * Returns: self
--- ellipsize
     
     * Returns: self
--- ellipsize=
     
     * Returns: self
--- extents
     
     * Returns: self
--- get_clip_region
     
     * Returns: self
--- get_cursor_pos
     
     * Returns: self
--- get_extents
     
     * Returns: self
--- get_line
     
     * Returns: self
--- get_pixel_extents
     
     * Returns: self
--- indent
     
     * Returns: self
--- indent=
     
     * Returns: self
--- index_to_pos
     
     * Returns: self
--- iter
     
     * Returns: self
--- justify=
     
     * Returns: self
--- justify?
     
     * Returns: self
--- line_count
     
     * Returns: self
--- lines
     
     * Returns: self
--- log_attrs
     
     * Returns: self
--- move_cursor_visually
     
     * Returns: self
--- pixel_extents
     
     * Returns: self
--- pixel_size
     
     * Returns: self
--- set_alignment
     
     * Returns: self
--- set_auto_dir
     
     * Returns: self
--- set_ellipsize
     
     * Returns: self
--- set_indent
     
     * Returns: self
--- set_justify
     
     * Returns: self
--- set_single_paragraph_mode
     
     * Returns: self
--- set_spacing
     
     * Returns: self
--- set_tabs
     
     * Returns: self
--- set_wrap
     
     * Returns: self
--- single_paragraph_mode=
     
     * Returns: self
--- single_paragraph_mode?
     
     * Returns: self
--- size
     
     * Returns: self
--- spacing
     
     * Returns: self
--- spacing=
     
     * Returns: self
--- tabs
     
     * Returns: self
--- tabs=
     
     * Returns: self
--- wrap
     
     * Returns: self
--- wrap=
     
     * Returns: self
--- xy_to_index
     
     * Returns: self

== Constants
--- ALIGN_CENTER
--- ALIGN_LEFT
--- ALIGN_RIGHT
--- Alignment
--- ELLIPSIZE_END
--- ELLIPSIZE_MIDDLE
--- ELLIPSIZE_NONE
--- ELLIPSIZE_START
--- EllipsizeMode
--- WRAP_CHAR
--- WRAP_WORD
--- WRAP_WORD_CHAR
--- WrapMode

== See Also

== ChangeLog
* 2005-11-10 Added. - ((<Masao>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index