#include <label.h>
Public Member Functions | |
virtual | ~Label () |
ClutterLabel * | gobj () |
Provides access to the underlying C GObject. | |
const ClutterLabel * | gobj () const |
Provides access to the underlying C GObject. | |
ClutterLabel * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | set_text (const Glib::ustring &text) |
Sets text as the text to be displayed by label. | |
Glib::ustring | set_text () const |
Retrieves the text displayed by label. | |
void | set_font_name (const Glib::ustring &font_name) |
Sets font_name as the font used by label. | |
Glib::ustring | get_font_name () const |
Retrieves the font used by label. | |
Color | get_color () const |
Retrieves the color of label. | |
void | set_color (const Color &color) |
Sets the color of label. | |
Pango::EllipsizeMode | get_ellipsize () const |
Return value: Pango::EllipsizeMode. | |
void | set_ellipsize (Pango::EllipsizeMode wrap_mode) |
Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there is not enough space to render the entire string. | |
bool | get_line_wrap () const |
Return value: true if the lines of the label are automatically wrapped. | |
void | set_line_wrap (bool wrap) |
Toggles line wrapping within the Clutter::Label widget. | |
bool | get_use_markup () const |
Return value: true if the label's text will be parsed for markup. | |
void | set_use_markup (bool wrap) |
Sets whether the text of the label contains markup in Pango's text markup language. | |
Pango::WrapMode | get_line_wrap_mode () const |
Return value: true if the lines of the label are automatically wrapped. | |
void | set_line_wrap_mode (Pango::WrapMode wrap_mode) |
If line wrapping is on (see set_line_wrap()) this controls how the line wrapping is done. | |
Glib::RefPtr< Pango::Layout > | get_layout () |
Gets the Pango::Layout used to display the label. | |
Glib::RefPtr< const Pango::Layout > | get_layout () const |
Gets the Pango::Layout used to display the label. | |
Pango::AttrList | get_attributes () const |
Gets the attribute list that was set on the label using set_attributes(), if any. | |
void | set_attributes (Pango::AttrList &attrs) |
Sets a Pango::AttrList; the attributes in the list are applied to the label text. | |
Pango::Alignment | get_alignment () const |
Return value: The labels Pango::Alignment. | |
void | set_alignment (Pango::Alignment wrap_mode) |
Sets text alignment of the label. | |
bool | get_justify () const |
Retrieves whether the label should justify the text on both margins. | |
void | set_justify (bool justify) |
Sets whether the text of the label actor should be justified on both margins. | |
Static Public Member Functions | |
static Glib::RefPtr< Label > | create () |
static Glib::RefPtr< Label > | create (const Glib::ustring &font_name, const Glib::ustring &text) |
static Glib::RefPtr< Label > | create (const Glib::ustring &font_name, const Glib::ustring &text, const Color &color) |
Protected Member Functions | |
Label () | |
Label (const Glib::ustring &font_name, const Glib::ustring &text) | |
Label (const Glib::ustring &font_name, const Glib::ustring &text, const Color &color) | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Clutter::Label > | wrap (ClutterLabel *object, bool take_copy=false) |
A Glib::wrap() method for this object. |
virtual Clutter::Label::~Label | ( | ) | [virtual] |
Clutter::Label::Label | ( | ) | [protected] |
Clutter::Label::Label | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text | |||
) | [explicit, protected] |
Clutter::Label::Label | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text, | |||
const Color & | color | |||
) | [explicit, protected] |
ClutterLabel* Clutter::Label::gobj | ( | ) | [inline] |
const ClutterLabel* Clutter::Label::gobj | ( | ) | const [inline] |
ClutterLabel* Clutter::Label::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Clutter::Actor.
static Glib::RefPtr<Label> Clutter::Label::create | ( | ) | [static] |
static Glib::RefPtr<Label> Clutter::Label::create | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text | |||
) | [static] |
static Glib::RefPtr<Label> Clutter::Label::create | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text, | |||
const Color & | color | |||
) | [static] |
void Clutter::Label::set_text | ( | const Glib::ustring & | text | ) |
Sets text as the text to be displayed by label.
text | The text to be displayed. |
Glib::ustring Clutter::Label::set_text | ( | ) | const |
Retrieves the text displayed by label.
void Clutter::Label::set_font_name | ( | const Glib::ustring & | font_name | ) |
Sets font_name as the font used by label.
font_name must be a string containing the font name and its size, similarly to what you would feed to the pango_font_description_from_string() function.
font_name | A font name and size, or 0 for the default font. |
Glib::ustring Clutter::Label::get_font_name | ( | ) | const |
Retrieves the font used by label.
Color Clutter::Label::get_color | ( | ) | const |
void Clutter::Label::set_color | ( | const Color & | color | ) |
Pango::EllipsizeMode Clutter::Label::get_ellipsize | ( | ) | const |
Return value: Pango::EllipsizeMode.
void Clutter::Label::set_ellipsize | ( | Pango::EllipsizeMode | wrap_mode | ) |
Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there is not enough space to render the entire string.
Since: 0.2
mode | A Pango::EllipsizeMode. |
bool Clutter::Label::get_line_wrap | ( | ) | const |
Return value: true
if the lines of the label are automatically wrapped.
true
if the lines of the label are automatically wrapped.void Clutter::Label::set_line_wrap | ( | bool | wrap | ) |
Toggles line wrapping within the Clutter::Label widget.
true
makes it break lines if text exceeds the widget's size. false
lets the text get cut off by the edge of the widget if it exceeds the widget size.
Since: 0.2
wrap | The setting. |
bool Clutter::Label::get_use_markup | ( | ) | const |
Return value: true
if the label's text will be parsed for markup.
true
if the label's text will be parsed for markup. void Clutter::Label::set_use_markup | ( | bool | wrap | ) |
Sets whether the text of the label contains markup in Pango's text markup language.
setting | true if the label's text should be parsed for markup. |
Pango::WrapMode Clutter::Label::get_line_wrap_mode | ( | ) | const |
Return value: true
if the lines of the label are automatically wrapped.
true
if the lines of the label are automatically wrapped.void Clutter::Label::set_line_wrap_mode | ( | Pango::WrapMode | wrap_mode | ) |
If line wrapping is on (see set_line_wrap()) this controls how the line wrapping is done.
The default is Pango::WRAP_WORD which means wrap on word boundaries.
Since: 0.2
wrap_mode | The line wrapping mode. |
Glib::RefPtr<Pango::Layout> Clutter::Label::get_layout | ( | ) |
Gets the Pango::Layout used to display the label.
The layout is useful to e.g. convert text positions to pixel positions. The returned layout is owned by the label so need not be freed by the caller.
Glib::RefPtr<const Pango::Layout> Clutter::Label::get_layout | ( | ) | const |
Gets the Pango::Layout used to display the label.
The layout is useful to e.g. convert text positions to pixel positions. The returned layout is owned by the label so need not be freed by the caller.
Pango::AttrList Clutter::Label::get_attributes | ( | ) | const |
Gets the attribute list that was set on the label using set_attributes(), if any.
0
if none was set.void Clutter::Label::set_attributes | ( | Pango::AttrList & | attrs | ) |
Sets a Pango::AttrList; the attributes in the list are applied to the label text.
The attributes set with this function will be ignored if the "use_markup" property is true
.
Since: 0.2
attrs | A Pango::AttrList. |
Pango::Alignment Clutter::Label::get_alignment | ( | ) | const |
Return value: The labels Pango::Alignment.
void Clutter::Label::set_alignment | ( | Pango::Alignment | wrap_mode | ) |
Sets text alignment of the label.
alignment | A Pango::Alignment. |
bool Clutter::Label::get_justify | ( | ) | const |
Retrieves whether the label should justify the text on both margins.
true
if the text should be justifiedvoid Clutter::Label::set_justify | ( | bool | justify | ) |
Sets whether the text of the label actor should be justified on both margins.
This setting is ignored if Clutter is compiled against Pango > 1.18.
Since: 0.6
justify | Whether the text should be justified. |
Glib::RefPtr< Clutter::Label > wrap | ( | ClutterLabel * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |