Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gtk::CellRendererText Class Reference

A GtkCellRendererText C++ wrapper class. More...

`#include <xfc/gtk/cellrenderertext.hh>`

Inheritance diagram for Xfc::Gtk::CellRendererText:

List of all members.

## Property Prototypes

- const TextPropertyType text_property
    Text to render (see property_text()).
- const MarkupPropertyType markup_property
    Marked up text to render (see property_markup()).
- const AttributePropertyType attribute_property
    A list of style attributes to apply to the text of the renderer (see property_attribute()).
- const SingleParagraphModePropertyType single_paragraph_mode_property
    Whether or not to keep all text in a single paragraph (see property_single_paragraph_mode()).
- const WidthCharsPropertyType width_chars_property
    Width In Characters (see property_width_chars()).
- const BackgroundPropertyType background_property
    Background color as a string (see property_background()).
- const BackgroundGdkPropertyType background_gdk_property
    Background color as a Gdk::Color (see property_background_gdk()).
- const ForegroundPropertyType foreground_property
    Foreground color as a string (see property_foreground()).
- const ForegroundGdkPropertyType foreground_gdk_property
    Foreground color as a Gdk::Color (see property_foreground_gdk()).
- const EditablePropertyType editable_property
    Whether the text can be modified by the user (see property_editable()).
- const FontPropertyType font_property
    Font description as a string (see property_font()).
- const FontDescPropertyType font_desc_property
    Font description as a Pango::FontDescription (see property_font_desc()).
- const FamilyPropertyType family_property
    Name of the font family (see property_family()).
- const StylePropertyType style_property
    Font style (see property_style()).
- const VariantPropertyType variant_property
    Font variant (see property_variant()).
- const WeightPropertyType weight_property
    Font weight (see property_weight()).
- const StretchPropertyType stretch_property
    Font stretch (see property_stretch()).
- const SizePropertyType size_property
    Font size (see property_size()).
- const SizePointsPropertyType size_points_property
    Font size in points (see property_size_points()).
- const ScalePropertyType scale_property
    Font size in points (see property_size_points()).
- const RisePropertyType rise_property
    Offset of text above the baseline (see property_rise()).
- const LanguagePropertyType language_property
    The language this text is in, as an ISO code (see property_language()).
- const StrikethroughPropertyType strikethrough_property
    Whether to strike through the text (see property_strikethrough()).
- const UnderlinePropertyType underline_property
    Style of underline for this text (see property_underline()).
- const EllipsizePropertyType ellipsize_property
    The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string, if at all (see property_ellipsize()).
- const BackgroundSetPropertyType background_set_property
    Whether this tag affects the background color (see property_background_set()).
- const ForegroundSetPropertyType foreground_set_property
    Whether this tag affects the foreground color (see property_foreground_set()).
- const EditableSetPropertyType editable_set_property
    Whether this tag affects text editability (see property_editable_set()).
- const FamilySetPropertyType family_set_property
    Whether this tag affects the font family (see property_family_set()).
- const StyleSetPropertyType style_set_property
    Whether this tag affects the font style (see property_style_set()).
- const VariantSetPropertyType variant_set_property
    Whether this tag affects the font variant (see property_variant_set()).
- const WeightSetPropertyType weight_set_property
    Whether this tag affects the font weight (see property_weight_set()).
- const StretchSetPropertyType stretch_set_property
    Whether this tag affects the font stretch (see property_stretch_set()).
- const SizeSetPropertyType size_set_property
    Whether this tag affects the font size (see property_size_set()).
- const ScaleSetPropertyType scale_set_property
    Whether this tag scales the font size by a factor (see property_scale_set()).
- const RiseSetPropertyType rise_set_property
    Whether this tag scales the font size by a factor (see property_rise_set()).
- const StrikethroughSetPropertyType strikethrough_set_property
    Whether this tag affects strikethrough (see property_strikethrough_set()).
- const UnderlineSetPropertyType underline_set_property
    Whether this tag affects underlining (see property_underline_set()).
- const LanguageSetPropertyType language_set_property
    Whether this tag affects the language the text is rendered as (see property_language_set()).
- const EllipsizeSetPropertyType ellipsize_set_property
    Whether this tag affects the ellipsize mode (see property_ellipsize_set()).

## Signal Prototypes

- const EditedSignalType edited_signal
    Edited signal (see signal_edited()).

## Public Member Functions

Constructors

- CellRendererText ()
    Construct a new CellRendererText.
- virtual ~CellRendererText ()
    Destructor.

Accessors

- GtkCellRendererText * gtk_cell_renderer_text () const
    Get a pointer to the GtkCellRendererText structure.
- operator GtkCellRendererText * () const
    Conversion operator; safely converts a CellRendererText to a GtkCellRendererText pointer.

Methods

- void set_fixed_height_from_font (int number_of_rows)
    Sets the height of a renderer to explicitly be determined by the "font" and the "y_pad" property set on it.

Property Proxies

- const TextPropertyProxy property_text ()
    Text to render (String : Read / Write).
- const MarkupPropertyProxy property_markup ()
    Marked up text to render (String : Write).
- const AttributePropertyProxy property_attribute ()
    A list of style attributes to apply to the text of the renderer (Pointer<Pango::AttrList> : Read / Write).
- const SingleParagraphModePropertyProxy property_single_paragraph_mode ()
    Whether or not to keep all text in a single paragraph (bool : Read / Write).
- const WidthCharsPropertyProxy property_width_chars ()
    The desired width of the label, in characters (int : Read / Write).
- const BackgroundPropertyProxy property_background ()
    Background color as a string (String : Write).
- const BackgroundGdkPropertyProxy property_background_gdk ()
    Background color as a Gdk::Color (Pointer<Gdk::Color> : Read / Write).
- const ForegroundPropertyProxy property_foreground ()
    Foreground color as a string (String : Write).
- const ForegroundGdkPropertyProxy property_foreground_gdk ()
    Foreground color as a Gdk::Color (Pointer<Gdk::Color> : Read / Write).
- const EditablePropertyProxy property_editable ()
    Whether the text can be modified by the user (bool : Read / Write).
- const FontPropertyProxy property_font ()
    Font description as a string (String : Read / Write).
- const FontDescPropertyProxy property_font_desc ()
    Font description as a Pango::FontDescription (Pointer<Pango::FontDescription> : Read / Write).
- const FamilyPropertyProxy property_family ()
    Name of the font family, e.g. Sans, Helvetica, Times, Monospace (String : Read / Write).
- const StylePropertyProxy property_style ()
    Font style (Pango::Style : Read / Write).
- const VariantPropertyProxy property_variant ()
    Font variant (Pango::Variant : Read / Write).
- const WeightPropertyProxy property_weight ()
    Font weight (int : Read / Write).
- const StretchPropertyProxy property_stretch ()
    Font stretch (Pango::Stretch : Read / Write).
- const SizePropertyProxy property_size ()
    Font size (int : Read / Write).
- const SizePointsPropertyProxy property_size_points ()
    Font size in points (double : Read / Write).
- const ScalePropertyProxy property_scale ()
    Font scaling factor (double : Read / Write).
- const RisePropertyProxy property_rise ()
    Offset of text above the baseline (below the baseline if rise is negative) (int : Read / Write).
- const LanguagePropertyProxy property_language ()
    The language this text is in, as an ISO code (String : Read / Write).
- const StrikethroughPropertyProxy property_strikethrough ()
    Whether to strike through the text (bool : Read / Write).
- const UnderlinePropertyProxy property_underline ()
    Style of underline for this text (Pango::Underline : Read / Write).
- const EllipsizePropertyProxy property_ellipsize ()
    The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string, if at all.
- const BackgroundSetPropertyProxy property_background_set ()
    Whether this tag affects the background color (bool : Read / Write).
- const ForegroundSetPropertyProxy property_foreground_set ()
    Whether this tag affects the foreground color (bool : Read / Write).
- const EditableSetPropertyProxy property_editable_set ()
    Whether this tag affects text editability (bool : Read / Write).
- const FamilySetPropertyProxy property_family_set ()
    Whether this tag affects the font family (bool : Read / Write).
- const StyleSetPropertyProxy property_style_set ()
    Whether this tag affects the font style (bool : Read / Write).
- const VariantSetPropertyProxy property_variant_set ()
    Whether this tag affects the font variant (bool : Read / Write).
- const WeightSetPropertyProxy property_weight_set ()
    Whether this tag affects the font weight (bool : Read / Write).
- const StretchSetPropertyProxy property_stretch_set ()
    Whether this tag affects the font stretch (bool : Read / Write).
- const SizeSetPropertyProxy property_size_set ()
    Whether this tag affects the font size (bool : Read / Write).
- const ScaleSetPropertyProxy property_scale_set ()
    Whether this tag scales the font size by a factor (bool : Read / Write).
- const RiseSetPropertyProxy property_rise_set ()
    Whether this tag scales the font size by a factor (bool : Read / Write).
- const StrikethroughSetPropertyProxy property_strikethrough_set ()
    Whether this tag affects strikethrough (bool : Read / Write).
- const UnderlineSetPropertyProxy property_underline_set ()
    Whether this tag affects underlining (bool : Read / Write).
- const LanguageSetPropertyProxy property_language_set ()
    Whether this tag affects the language the text is rendered as (bool : Read / Write).
- const EllipsizeSetPropertyProxy property_ellipsize_set ()
    Whether this tag affects the ellipsize mode.

Signal Proxies

- const EditedSignalProxy signal_edited ()
    Connect to the editing_done_signal; emitted when the user has finished editing the cell text.

## Protected Member Functions

Constructors

- CellRendererText (GtkCellRendererText *cell, bool owns_reference=false)
    Construct a new CellRendererText from an existing GtkCellRendererText.

## Detailed Description

A GtkCellRendererText C++ wrapper class.

## Constructor & Destructor Documentation

Xfc::Gtk::CellRendererText::CellRendererText | ( | GtkCellRendererText * | cell,
|  | bool | owns_reference = `false`
| ) | `[explicit, protected]`

Construct a new CellRendererText from an existing GtkCellRendererText.

Parameters:

  | cell | A pointer to a GtkCellRendererText.
  | owns_reference | Set false if the initial reference count is floating, set true if it's not.

The cell can be a newly created GtkCellRendererText or an existing GtkCellRendererText. (see G::Object::Object).

Xfc::Gtk::CellRendererText::CellRendererText | ( |  | ) |

| Construct a new CellRendererText. You can adjust how text is drawn using object properties. Also, with TreeViewColumn, you can bind a property to a value in a 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 TreeView.

## Member Function Documentation

const EllipsizePropertyProxy Xfc::Gtk::CellRendererText::property_ellipsize | ( |  | ) |

| The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string, if at all.

const LanguagePropertyProxy Xfc::Gtk::CellRendererText::property_language | ( |  | ) |

| The language this text is in, as an ISO code (String : Read / Write). Pango can use this as a hint when rendering the text. If you don't understand this property, you probably don't need it.

void Xfc::Gtk::CellRendererText::set_fixed_height_from_font | ( | int | number_of_rows | ) |

Sets the height of a renderer to explicitly be determined by the "font" and the "y_pad" property set on it.

Parameters:

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

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 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.

## Member Data Documentation

const EditedSignalType Xfc::Gtk::CellRendererText::edited_signal `[static, protected]`

Edited signal (see signal_edited()).

Calls a slot with the signature:

                 void function(const String& path, const String& new_text);
                 // path: Widget-dependent string representation of the event location;
                          e.g. for TreeView, a string representation of TreePath.
                 // new_text: The newly edited text.

const EllipsizePropertyType Xfc::Gtk::CellRendererText::ellipsize_property `[static, protected]`

| The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string, if at all (see property_ellipsize()).

The documentation for this class was generated from the following file:

- cellrenderertext.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3