新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Gtk::CellRendererText

Gtk::CellRendererText クラス

The Gtk::CellRendererText is used for rendering a cell to a Gdk::Drawable with texts.

クラスメソッド

Gtk::CellRendererText.new
Creates a new Gtk::CellRendererText. Adjust how text is drawn using object properties. Object properties can be set globally (with GLib::Object#set_property). Also, with Gtk::TreeViewColumn, you can bind a property to a value in a Gtk::TreeModel. For example, you can bind the "text" property on the cell renderer to a string value in the model, thus rendering a different string in each row of the Gtk::TreeView.
  • Returns : the new cell renderer

インスタンスメソッド

attributes
Returns the attribute list.
  • Returns: Pango::AttrList?
attributes=(attrlist)
Sets the attribute list.
  • attrlist: Pango::AttrList?
  • Returns: attrlist
set_attributes
Same as Gtk::CellRendererText#attributes=.
  • attrlist: Pango::AttrList?
  • Returns: self
background=(color_name)
Sets the background color .
  • color_name: The color name like as "red". The color_name can either one of a large set of standard names. (Taken from the X11 rgb.txt file), or it can be a hex value in the form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')
  • Returns: color_name
set_background(color_name)
Same as Gtk::CellRendererText#background=.
  • color_name: The color name.
  • Returns: self
background_gdk
Returns the background color.
background_gdk=(color)
Sets the background color.
  • color: the new color (Gdk::Color).
  • Returns: color.
set_background_gdk(color)
Same as Gtk::CellRendererText#background_gdk=.
  • color: the new color (Gdk::Color).
  • Returns: color.
background_set?
Returns value whether background properties are enabled or not.
  • Returns: true if the background properties are enabled.
background_set=(value)
Sets value whether background properties are enabled or not.
  • value: true if background properties are enabled.
  • Returns: value
set_background_set(value)
Same as Gtk::CellRendererText#background_set=.
  • value: true if background properties are enabled.
  • Returns: self
editable?
Returns the Gtk::CellRendererText is editable or not.
  • Returns: true if editable
editable=(editable)
Sets value whether the Gtk::CellRenderText? is editable or not.
  • editable: true if editable
  • Returns: editable
set_editable(editable)
Same as Gtk::CellRendererText#editable=.
  • editable: true if editable
  • Returns: self
editable_set?
Returns the value whether editability are enabled or not.
  • Returns: true if the editability are enabled.
editable_set=(value)
Sets the value whether editablity are enabled or not.
  • value: true if the editability are enabled.
  • Returns: value
set_editable_set(value)
Same as Gtk::CellRendererText#editable_set=.
  • value: true if the editability are enabled.
  • Returns: self
family
Returns the font family name.
  • Returns: the font family name
family=(family)
Sets the font family name.
  • family: the font family name
  • Returns: the font family name
set_family(family)
Same as Gtk::CellRendererText#family=.
  • family: the font family name
  • Returns: self
family_set?
Returns the value whether font family properties are enabled or not.
  • Returns: true if the font family properties are enabled.
family_set=(value)
Sets the value whether editablity are enabled or not.
  • value: true if the font family properties are enabled.
  • Returns: value
set_family_set(value)
Same as Gtk::CellRendererText#family_set=.
  • value: true if the font family properties are enabled.
  • Returns: self
fixed_height_from_font=(number_of_rows)
Sets the height of a renderer to explicitly be determined by the "font" and "y_pad" property set on it. Further changes in these properties do not affect the height, so they must be accompanied by a subsequent call to this method. Using this method is unflexible, and should really only be used if calculating the size of a cell is too slow (ie, a massive number of cells displayed). If number_of_rows is -1, then the fixed height is unset, and the height is determined by the properties again.
  • number_of_rows: Number of rows of text each cell renderer is allocated, or -1
  • Returns: number_of_rows
set_fixed_height_from_font(number_of_rows)
Same as Gtk::CellRendererText#fixed_height_from_font=.
  • number_of_rows: Number of rows of text each cell renderer is allocated, or -1
  • Returns: self
font
Returns the string representation of a font description. The family list in the string description will only have a terminating comma if the last word of the list is a valid style option.
  • Returns: The string representation of a font description.
font=(font)
Set the font description from a string representation in the form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE_OPTIONS is a whitespace separated list of words where each WORD describes one of style, variant, weight, or stretch, and SIZE is an decimal number (size in points). Any one of the options may be absent. If FAMILY-LIST is absent, then the family_name field of the resulting font description will be initialized to nil. If STYLE-OPTIONS is missing, then all style options will be set to the default values. If SIZE is missing, the size in the resulting font description will be set to 0.
  • font: string representation of a font description.
  • Returns: font
set_font(font)
Same as Gtk::CellRendererText#font=.
  • font: string representation of a font description.
  • Returns: self
font_desc
Returns the Pango::FontDescription.
font_desc=(font_desc)
Sets the Pango::FontDescription
set_font_desc
Same as Gtk::CellRendererText#font_desc=.
foreground=(color_name)
Sets the foreground color.
  • color_name: The color name like as "red". See background=.
  • Returns: color_name
set_foreground(color_name)
Same as Gtk::CellRendererText#foreground=.
  • color_name: The color name.
  • Returns: self
foreground_gdk
Returns the foreground color.
foreground_gdk=(color)
Sets the foreground color.
  • color: the new color (Gdk::Color).
  • Returns: color.
set_foreground_gdk(color)
Same as Gtk::CellRendererText#foreground_gdk=.
  • color: the new color (Gdk::Color).
  • Returns: color.
foreground_set?
Returns the value whether foreground properties are enabled or not.
  • Returns: true if the foreground properties are enabled.
foreground_set=(value)
Sets the value whether foreground properties are enabled or not.
  • value: true if foreground properties are enabled.
  • Returns: value
set_foreground_set(value)
Same as Gtk::CellRendererText#foreground_set=.
  • value: true if foreground properties are enabled.
  • Returns: self
markup=(text)
Set the marked up text to render.
  • text: the marked up text
  • Returns: text
set_markup(text)
Same as Gtk::CellRendererText#markup=.
  • text: the marked up text
  • Returns: self
rise
Returns the offset of text above the baseline (below the baseline if rise is negative).
  • Returns: the offset of text above the baseline
rise=(offset)
Sets the offset of text above the baseline.
  • offset: the offset of text above the baseline
  • Returns: offset
set_rise(offset)
Same as Gtk::CellRendererText#rise=.
  • offset: the offset of text above the baseline
  • Returns: self
rise_set?
Returns value whether rise property is enabled or not.
  • Returns: true if the rise property is enabled.
rise_set=(value)
Sets the value whether rise property is enabled or not.
  • value: true if rise property is enabled.
  • Returns: value
set_rise_set(value)
Same as Gtk::CellRendererText#rise_set=.
  • value: true if rise property is enabled.
  • Returns: self
scale
Returns the font scaling factor.
  • Returns: the font scaling factor.
scale=(scale)
Sets the font scaling factor.
  • scale: the font scaling factor.
  • Returns: scale
set_scale(scale)
Same as Gtk::CellRendererText#scale=.
  • scale: the font scaling factor.
  • Returns: self
scale_set?
Returns the value whether scale property is enabled or not.
  • Returns: true if the scale property is enabled.
scale_set=(value)
Sets the value whether scale property is enabled or not.
  • value: true if scale property is enabled.
  • Returns: value
set_scale_set(value)
Same as Gtk::CellRendererText#scale_set=.
  • value: true if scale property is enabled.
  • Returns: self
size
Returns the font size.
  • Returns: the font size
size=(size)
Sets the font size.
  • size: the font size
  • Returns: size
set_size(size)
Same as Gtk::CellRendererText#size=.
  • size: the font size
  • Returns: self
size_points
Returns the font size in points.
  • Returns: the font size in points
size_points=(size)
Sets the font size in points.
  • size: the font size in points
  • Returns: size
set_size_points(size)
Same as Gtk::CellRendererText#size_points=.
  • size: the font size in points
  • Returns: self
size_set?
Returns the value whether size properties are enabled or not.
  • Returns: true if the size properties are enabled.
size_set=(value)
Sets the value whether size properties are enabled or not.
  • value: true if size properties are enabled.
  • Returns: value
set_size_set(value)
Same as Gtk::CellRendererText#size_set=.
  • value: true if size properties are enabled.
  • Returns: self
stretch
Returns the width of the font relative to other designs within a family.
stretch=(stretch)
Sets the width of the font relative to other designs within a family.
  • stretch: the width of the font relative (PangoStretch)
  • Returns: stretch
set_stretch(stretch)
Same as Gtk::CellRendererText#stretch=.
  • stretch: the width of the font relative (PangoStretch)
  • Returns: self
stretch_set?
Returns the value whether stretch property is enabled or not.
  • Returns: true if the stretch property is enabled.
stretch_set=(value)
Sets the value whether stretch property is enabled or not.
  • value: true if stretch property is enabled.
  • Returns: value
set_stretch_set(value)
Same as Gtk::CellRendererText#stretch_set=.
  • value: true if stretch property is enabled.
  • Returns: self
strikethrough?
Returns whether to strike through the text or not.
strikethrough=(strikethrough)
Sets whether to strike through the text or not.
set_strikethrough(strikethrough)
Same as Gtk::CellRendererText#strikethrough=.
strikethrough_set?
Returns the value whether strikethrough property is enabled or not.
  • Returns: true if the strikethrough property is enabled.
strikethrough_set=(value)
Sets the value whether strikethrough property is enabled or not.
  • value: true if strikethrough property is enabled.
  • Returns: value
set_strikethrough_set(value)
Same as Gtk::CellRendererText#strikethrough_set=.
  • value: true if strikethrough property is enabled.
  • Returns: self
style
Returns the font style.
style=(style)
Sets the font style.
  • style: the font style (PangoStyle)
  • Returns: style
set_style(style)
Same as Gtk::CellRendererText#style=.
  • style: the font style (PangoStyle)
  • Returns: self
style_set?
Returns the value whether style property is enabled or not.
  • Returns: true if the style property is enabled.
style_set=(value)
Sets the value whether style property is enabled or not.
  • value: true if style property is enabled.
  • Returns: value
set_style_set(value)
Same as Gtk::CellRendererText#style_set=.
  • value: true if style property is enabled.
  • Returns: self
text
Returns the text to render.
  • Returns: the text to render.
text=(text)
Sets the text to render.
  • text: the text to render.
  • Returns: text
set_text(text)
Same as Gtk::CellRendererText#text=.
  • text: the text to render.
  • Returns: self
underline
Returns the style of underline for this text.
underline=(underline)
Sets the style of underline.
  • underline: the style of underline (PangoUnderline)
  • Returns: underline
set_underline(underline)
Same as Gtk::CellRendererText#underline=.
variant
Returns the specifying capitalization variant of the font.
  • Returns: the specifying capitalization variant of the font (PangoVariant).
variant=(variant)
Sets the style of variant.
  • variant: the specifying capitalization variant of the font (PangoVariant).
  • Returns: variant
set_variant(variant)
Sets the style of variant.
  • variant: the specifying capitalization variant of the font (PangoVariant).
  • Returns: self
variant_set?
Returns the value whether variant property is enabled or not.
  • Returns: true if the variant property is enabled.
variant_set=(value)
Sets the value whether variant property is enabled or not.
  • value: true if variant property is enabled.
  • Returns: value
set_variant_set(value)
Same as Gtk::CellRendererText#variant_set=.
  • value: true if variant property is enabled.
  • Returns: self
weight
Returns specifying the weight (boldness) of a font.
  • Returns: specifying the weight (boldness) of a font. This is a numerical value ranging from 100 to 900, but there are some predefined values (PangoWeight).
weight=(weight)
Sets specifying the weight (boldness) of a font.
  • weight: This is a numerical value ranging from 100 to 900, but there are some predefined values (PangoWeight).
  • Returns: weight
set_weight(weight)
Same as Gtk::CellRendererText#weight=.
  • weight: This is a numerical value ranging from 100 to 900, but there are some predefined values (PangoWeight).
  • Returns: self
weight_set?
Returns the value whether weight property is enabled or not.
  • Returns: true if the weight property is enabled.
weight_set=(value)
Sets the value whether weight property is enabled or not.
  • value: true if weight property is enabled.
  • Returns: value
set_weight_set(value)
Same as Gtk::CellRendererText#weight_set=.
  • value: true if weight property is enabled.
  • Returns: self
align_set=()
要編集
set_align_set()
要編集
align_set?()
要編集
ellipsize_set=()
要編集
set_ellipsize_set()
要編集
ellipsize_set?()
要編集
language_set=()
要編集
set_language_set()
要編集
language_set?()
要編集
underline_set=()
要編集
set_underline_set()
要編集
underline_set?()
要編集
wrap_mode=()
要編集
set_wrap_mode()
要編集
wrap_mode()
要編集
ellipsize=()
要編集
set_ellipsize()
要編集
ellipsize()
要編集
language=()
要編集
set_language()
要編集
language()
要編集
alignment=()
要編集
set_alignment()
要編集
alignment()
要編集
wrap_width=()
要編集
set_wrap_width()
要編集
wrap_width()
要編集
width_chars=()
要編集
set_width_chars()
要編集
width_chars()
要編集
single_paragraph_mode=()
要編集
set_single_paragraph_mode()
要編集
single_paragraph_mode?()
要編集

プロパティ

attributes: Pango::AttrList (Read/Write)
A list of style attributes to apply to the text of the renderer
background: String (Write)
Background color as a string
background-gdk: Gdk::Color (Read/Write)
Background color as a Gdk::Color
background-set: true or false (Read/Write)
Whether this tag affects the background color
editable: true or false (Read/Write)
Whether the text can be modified by the user
editable-set: true or false (Read/Write)
Whether this tag affects text editability
family: String (Read/Write)
Name of the font family, e.g. Sans, Helvetica, Times, Monospace
family-set: true or false (Read/Write)
Whether this tag affects the font family
font: String (Read/Write)
Font description as a string
font-desc: Pango::FontDescription (Read/Write)
Font description as a PangoFontDescription struct
foreground: String (Write)
Foreground color as a string
foreground-gdk: Gdk::Color (Read/Write)
Foreground color as a Gdk::Color
foreground-set: true or false (Read/Write)
Whether this tag affects the foreground color
markup: String (Write)
Marked up text to render
rise: Integer (Read/Write)
Offset of text above the baseline (below the baseline if rise is negative)
rise-set: true or false (Read/Write)
Whether this tag affects the rise
scale: Float (Read/Write)
Font scaling factor
scale-set: true or false (Read/Write)
Whether this tag scales the font size by a factor
size: Integer (Read/Write)
Font size
size-points: Float (Read/Write)
Font size in points
size-set: true or false (Read/Write)
Whether this tag affects the font size
stretch: Integer (Read/Write)
Font stretch
stretch-set: true or false (Read/Write)
Whether this tag affects the font stretch
strikethrough: true or false (Read/Write)
Whether to strike through the text
strikethrough-set: true or false (Read/Write)
Whether this tag affects strikethrough
style: Integer (Read/Write)
Font style
style-set: true or false (Read/Write)
Whether this tag affects the font style
text: String (Read/Write)
Text to render
underline: Integer (Read/Write)
Style of underline for this text
underline-set: true or false (Read/Write)
Whether this tag affects underlining
variant: Integer (Read/Write)
Font variant
variant-set: true or false (Read/Write)
Whether this tag affects the font variant
weight: Integer (Read/Write)
Font weight
weight-set: true or false (Read/Write)
Whether this tag affects the font weight
align-set:
要編集
ellipsize-set:
要編集
language-set:
要編集
wrap-mode:
要編集
ellipsize:
要編集
language:
要編集
alignment:
要編集
wrap-width:
要編集
width-chars:
要編集
single-paragraph-mode:
要編集

更新履歴

  • 2014-06-15 クラスのメンバ項目でリストから漏れているものを追加。 - きたがわ
  • - Masao?