Class: Gtk::CellRendererText

Inherits:
CellRenderer
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from CellRenderer

#activate, #cell_background=, #cell_background_rgba, #cell_background_rgba=, #cell_background_set=, #cell_background_set?, #editing=, #editing?, #get_aligned_area, #get_alignment, #get_fixed_size, #get_padding, #get_preferred_height, #get_preferred_height_for_width, #get_preferred_size, #get_preferred_width, #get_preferred_width_for_height, #get_state, #height, #height=, #is_activatable, #is_expanded, #is_expanded=, #is_expanded?, #is_expander, #is_expander=, #is_expander?, #mode, #mode=, #request_mode, #sensitive, #sensitive=, #sensitive?, #set_alignment, #set_fixed_size, #set_padding, #snapshot, #start_editing, #stop_editing, #visible, #visible=, #visible?, #width, #width=, #xalign, #xalign=, #xpad, #xpad=, #yalign, #yalign=, #ypad, #ypad=

Constructor Details

#initializeGtk::CellRenderer

Creates a new GtkCellRendererText. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set()). Also, with GtkTreeViewColumn, you can bind a property to a value in a GtkTreeModel. 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 GtkTreeView.

Instance Method Details

#align_set=(align_set) ⇒ Boolean

Parameters:

  • align_set (Boolean)

Returns:

  • (Boolean)

    align-set

  • (Boolean)

    align-set

#align_set?Boolean

Returns align-set.

Returns:

  • (Boolean)

    align-set

#alignmentPango::Alignment

Specifies how to align the lines of text with respect to each other.

Note that this property describes how to align the lines of text in case there are several of them. The "xalign" property of GtkCellRenderer, on the other hand, sets the horizontal alignment of the whole text.

Returns:

  • (Pango::Alignment)

    alignment

#alignment=(alignment) ⇒ Pango::Alignment

Specifies how to align the lines of text with respect to each other.

Note that this property describes how to align the lines of text in case there are several of them. The "xalign" property of GtkCellRenderer, on the other hand, sets the horizontal alignment of the whole text.

Parameters:

  • alignment (Pango::Alignment)

Returns:

  • (Pango::Alignment)

    alignment

  • (Pango::Alignment)

    alignment

#attributesPango::AttrList

Returns attributes.

Returns:

  • (Pango::AttrList)

    attributes

#attributes=(attributes) ⇒ Pango::AttrList

Parameters:

  • attributes (Pango::AttrList)

Returns:

  • (Pango::AttrList)

    attributes

  • (Pango::AttrList)

    attributes

#background=(background) ⇒ String

Returns background.

Parameters:

  • background (String)

Returns:

  • (String)

    background

#background_rgbaGdk::RGBA

Background color as a GdkRGBA

Returns:

  • (Gdk::RGBA)

    background-rgba

#background_rgba=(background_rgba) ⇒ Gdk::RGBA

Background color as a GdkRGBA

Parameters:

  • background_rgba (Gdk::RGBA)

Returns:

  • (Gdk::RGBA)

    background-rgba

  • (Gdk::RGBA)

    background-rgba

#background_set=(background_set) ⇒ Boolean

Parameters:

  • background_set (Boolean)

Returns:

  • (Boolean)

    background-set

  • (Boolean)

    background-set

#background_set?Boolean

Returns background-set.

Returns:

  • (Boolean)

    background-set

#editable=(editable) ⇒ Boolean

Parameters:

  • editable (Boolean)

Returns:

  • (Boolean)

    editable

  • (Boolean)

    editable

#editable?Boolean

Returns editable.

Returns:

  • (Boolean)

    editable

#editable_set=(editable_set) ⇒ Boolean

Parameters:

  • editable_set (Boolean)

Returns:

  • (Boolean)

    editable-set

  • (Boolean)

    editable-set

#editable_set?Boolean

Returns editable-set.

Returns:

  • (Boolean)

    editable-set

#ellipsizePango::EllipsizeMode

Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string. Setting it to %PANGO_ELLIPSIZE_NONE turns off ellipsizing. See the wrap-width property for another way of making the text fit into a given width.

Returns:

  • (Pango::EllipsizeMode)

    ellipsize

#ellipsize=(ellipsize) ⇒ Pango::EllipsizeMode

Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string. Setting it to %PANGO_ELLIPSIZE_NONE turns off ellipsizing. See the wrap-width property for another way of making the text fit into a given width.

Parameters:

  • ellipsize (Pango::EllipsizeMode)

Returns:

  • (Pango::EllipsizeMode)

    ellipsize

  • (Pango::EllipsizeMode)

    ellipsize

#ellipsize_set=(ellipsize_set) ⇒ Boolean

Parameters:

  • ellipsize_set (Boolean)

Returns:

  • (Boolean)

    ellipsize-set

  • (Boolean)

    ellipsize-set

#ellipsize_set?Boolean

Returns ellipsize-set.

Returns:

  • (Boolean)

    ellipsize-set

#familyString

Returns family.

Returns:

  • (String)

    family

#family=(family) ⇒ String

Parameters:

  • family (String)

Returns:

  • (String)

    family

  • (String)

    family

#family_set=(family_set) ⇒ Boolean

Parameters:

  • family_set (Boolean)

Returns:

  • (Boolean)

    family-set

  • (Boolean)

    family-set

#family_set?Boolean

Returns family-set.

Returns:

  • (Boolean)

    family-set

#fixed_height_from_font=(number_of_rows) ⇒ nil

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 function. Using this function is inflexible, 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.

Parameters:

  • number_of_rows (Integer)

    Number of rows of text each cell renderer is allocated, or -1

Returns:

  • (nil)

#fontString

Returns font.

Returns:

  • (String)

    font

#font=(font) ⇒ String

Parameters:

  • font (String)

Returns:

  • (String)

    font

  • (String)

    font

#font_descPango::FontDescription

Returns font-desc.

Returns:

  • (Pango::FontDescription)

    font-desc

#font_desc=(font_desc) ⇒ Pango::FontDescription

Parameters:

  • font_desc (Pango::FontDescription)

Returns:

  • (Pango::FontDescription)

    font-desc

  • (Pango::FontDescription)

    font-desc

#foreground=(foreground) ⇒ String

Returns foreground.

Parameters:

  • foreground (String)

Returns:

  • (String)

    foreground

#foreground_rgbaGdk::RGBA

Foreground color as a GdkRGBA

Returns:

  • (Gdk::RGBA)

    foreground-rgba

#foreground_rgba=(foreground_rgba) ⇒ Gdk::RGBA

Foreground color as a GdkRGBA

Parameters:

  • foreground_rgba (Gdk::RGBA)

Returns:

  • (Gdk::RGBA)

    foreground-rgba

  • (Gdk::RGBA)

    foreground-rgba

#foreground_set=(foreground_set) ⇒ Boolean

Parameters:

  • foreground_set (Boolean)

Returns:

  • (Boolean)

    foreground-set

  • (Boolean)

    foreground-set

#foreground_set?Boolean

Returns foreground-set.

Returns:

  • (Boolean)

    foreground-set

#languageString

Returns language.

Returns:

  • (String)

    language

#language=(language) ⇒ String

Parameters:

  • language (String)

Returns:

  • (String)

    language

  • (String)

    language

#language_set=(language_set) ⇒ Boolean

Parameters:

  • language_set (Boolean)

Returns:

  • (Boolean)

    language-set

  • (Boolean)

    language-set

#language_set?Boolean

Returns language-set.

Returns:

  • (Boolean)

    language-set

#markup=(markup) ⇒ String

Returns markup.

Parameters:

  • markup (String)

Returns:

  • (String)

    markup

#max_width_charsInteger

The desired maximum width of the cell, in characters. If this property is set to -1, the width will be calculated automatically.

For cell renderers that ellipsize or wrap text; this property controls the maximum reported width of the cell. The cell should not receive any greater allocation unless it is set to expand in its GtkCellLayout and all of the cell's siblings have received their natural width.

Returns:

  • (Integer)

    max-width-chars

#max_width_chars=(max_width_chars) ⇒ Integer

The desired maximum width of the cell, in characters. If this property is set to -1, the width will be calculated automatically.

For cell renderers that ellipsize or wrap text; this property controls the maximum reported width of the cell. The cell should not receive any greater allocation unless it is set to expand in its GtkCellLayout and all of the cell's siblings have received their natural width.

Parameters:

  • max_width_chars (Integer)

Returns:

  • (Integer)

    max-width-chars

  • (Integer)

    max-width-chars

#placeholder_textString

The text that will be displayed in the GtkCellRenderer if GtkCellRendererText:editable is true and the cell is empty.

Returns:

  • (String)

    placeholder-text

#placeholder_text=(placeholder_text) ⇒ String

The text that will be displayed in the GtkCellRenderer if GtkCellRendererText:editable is true and the cell is empty.

Parameters:

  • placeholder_text (String)

Returns:

  • (String)

    placeholder-text

  • (String)

    placeholder-text

#riseInteger

Returns rise.

Returns:

  • (Integer)

    rise

#rise=(rise) ⇒ Integer

Parameters:

  • rise (Integer)

Returns:

  • (Integer)

    rise

  • (Integer)

    rise

#rise_set=(rise_set) ⇒ Boolean

Parameters:

  • rise_set (Boolean)

Returns:

  • (Boolean)

    rise-set

  • (Boolean)

    rise-set

#rise_set?Boolean

Returns rise-set.

Returns:

  • (Boolean)

    rise-set

#scaleFloat

Returns scale.

Returns:

  • (Float)

    scale

#scale=(scale) ⇒ Float

Parameters:

  • scale (Float)

Returns:

  • (Float)

    scale

  • (Float)

    scale

#scale_set=(scale_set) ⇒ Boolean

Parameters:

  • scale_set (Boolean)

Returns:

  • (Boolean)

    scale-set

  • (Boolean)

    scale-set

#scale_set?Boolean

Returns scale-set.

Returns:

  • (Boolean)

    scale-set

#single_paragraph_mode=(single_paragraph_mode) ⇒ Boolean

Parameters:

  • single_paragraph_mode (Boolean)

Returns:

  • (Boolean)

    single-paragraph-mode

  • (Boolean)

    single-paragraph-mode

#single_paragraph_mode?Boolean

Returns single-paragraph-mode.

Returns:

  • (Boolean)

    single-paragraph-mode

#sizeInteger

Returns size.

Returns:

  • (Integer)

    size

#size=(size) ⇒ Integer

Parameters:

  • size (Integer)

Returns:

  • (Integer)

    size

  • (Integer)

    size

#size_pointsFloat

Returns size-points.

Returns:

  • (Float)

    size-points

#size_points=(size_points) ⇒ Float

Parameters:

  • size_points (Float)

Returns:

  • (Float)

    size-points

  • (Float)

    size-points

#size_set=(size_set) ⇒ Boolean

Parameters:

  • size_set (Boolean)

Returns:

  • (Boolean)

    size-set

  • (Boolean)

    size-set

#size_set?Boolean

Returns size-set.

Returns:

  • (Boolean)

    size-set

#stretchPango::Stretch

Returns stretch.

Returns:

  • (Pango::Stretch)

    stretch

#stretch=(stretch) ⇒ Pango::Stretch

Parameters:

  • stretch (Pango::Stretch)

Returns:

  • (Pango::Stretch)

    stretch

  • (Pango::Stretch)

    stretch

#stretch_set=(stretch_set) ⇒ Boolean

Parameters:

  • stretch_set (Boolean)

Returns:

  • (Boolean)

    stretch-set

  • (Boolean)

    stretch-set

#stretch_set?Boolean

Returns stretch-set.

Returns:

  • (Boolean)

    stretch-set

#strikethrough=(strikethrough) ⇒ Boolean

Parameters:

  • strikethrough (Boolean)

Returns:

  • (Boolean)

    strikethrough

  • (Boolean)

    strikethrough

#strikethrough?Boolean

Returns strikethrough.

Returns:

  • (Boolean)

    strikethrough

#strikethrough_set=(strikethrough_set) ⇒ Boolean

Parameters:

  • strikethrough_set (Boolean)

Returns:

  • (Boolean)

    strikethrough-set

  • (Boolean)

    strikethrough-set

#strikethrough_set?Boolean

Returns strikethrough-set.

Returns:

  • (Boolean)

    strikethrough-set

#stylePango::Style

Returns style.

Returns:

  • (Pango::Style)

    style

#style=(style) ⇒ Pango::Style

Parameters:

  • style (Pango::Style)

Returns:

  • (Pango::Style)

    style

  • (Pango::Style)

    style

#style_set=(style_set) ⇒ Boolean

Parameters:

  • style_set (Boolean)

Returns:

  • (Boolean)

    style-set

  • (Boolean)

    style-set

#style_set?Boolean

Returns style-set.

Returns:

  • (Boolean)

    style-set

#textString

Returns text.

Returns:

  • (String)

    text

#text=(text) ⇒ String

Parameters:

  • text (String)

Returns:

  • (String)

    text

  • (String)

    text

#underlinePango::Underline

Returns underline.

Returns:

  • (Pango::Underline)

    underline

#underline=(underline) ⇒ Pango::Underline

Parameters:

  • underline (Pango::Underline)

Returns:

  • (Pango::Underline)

    underline

  • (Pango::Underline)

    underline

#underline_set=(underline_set) ⇒ Boolean

Parameters:

  • underline_set (Boolean)

Returns:

  • (Boolean)

    underline-set

  • (Boolean)

    underline-set

#underline_set?Boolean

Returns underline-set.

Returns:

  • (Boolean)

    underline-set

#variantPango::Variant

Returns variant.

Returns:

  • (Pango::Variant)

    variant

#variant=(variant) ⇒ Pango::Variant

Parameters:

  • variant (Pango::Variant)

Returns:

  • (Pango::Variant)

    variant

  • (Pango::Variant)

    variant

#variant_set=(variant_set) ⇒ Boolean

Parameters:

  • variant_set (Boolean)

Returns:

  • (Boolean)

    variant-set

  • (Boolean)

    variant-set

#variant_set?Boolean

Returns variant-set.

Returns:

  • (Boolean)

    variant-set

#weightInteger

Returns weight.

Returns:

  • (Integer)

    weight

#weight=(weight) ⇒ Integer

Parameters:

  • weight (Integer)

Returns:

  • (Integer)

    weight

  • (Integer)

    weight

#weight_set=(weight_set) ⇒ Boolean

Parameters:

  • weight_set (Boolean)

Returns:

  • (Boolean)

    weight-set

  • (Boolean)

    weight-set

#weight_set?Boolean

Returns weight-set.

Returns:

  • (Boolean)

    weight-set

#width_charsInteger

The desired width of the cell, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.

Returns:

  • (Integer)

    width-chars

#width_chars=(width_chars) ⇒ Integer

The desired width of the cell, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.

Parameters:

  • width_chars (Integer)

Returns:

  • (Integer)

    width-chars

  • (Integer)

    width-chars

#wrap_modePango::WrapMode

Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the wrap-width property is set.

Returns:

  • (Pango::WrapMode)

    wrap-mode

#wrap_mode=(wrap_mode) ⇒ Pango::WrapMode

Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the wrap-width property is set.

Parameters:

  • wrap_mode (Pango::WrapMode)

Returns:

  • (Pango::WrapMode)

    wrap-mode

  • (Pango::WrapMode)

    wrap-mode

#wrap_widthInteger

Specifies the minimum width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to -1 turns wrapping off.

Returns:

  • (Integer)

    wrap-width

#wrap_width=(wrap_width) ⇒ Integer

Specifies the minimum width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to -1 turns wrapping off.

Parameters:

  • wrap_width (Integer)

Returns:

  • (Integer)

    wrap-width

  • (Integer)

    wrap-width