Clutter::Label Class Reference

#include <label.h>

Inheritance diagram for Clutter::Label:

Inheritance graph
[legend]

List of all members.

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< Labelcreate ()
static Glib::RefPtr< Labelcreate (const Glib::ustring &font_name, const Glib::ustring &text)
static Glib::RefPtr< Labelcreate (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::Labelwrap (ClutterLabel *object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

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]


Member Function Documentation

ClutterLabel* Clutter::Label::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

const ClutterLabel* Clutter::Label::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

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.

Parameters:
text The text to be displayed.

Glib::ustring Clutter::Label::set_text (  )  const

Retrieves the text displayed by label.

Returns:
The text of the label. The returned string is owned by Clutter::Label and should not be modified or freed.

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.

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

Returns:
A string containing the font name, in a format understandable by pango_font_description_from_string(). The string is owned by Clutter::Label and should not be modified or freed.

Color Clutter::Label::get_color (  )  const

Retrieves the color of label.

Parameters:
color Return location for a Clutter::Color.

void Clutter::Label::set_color ( const Color color  ) 

Sets the color of label.

Parameters:
color A Clutter::Color.

Pango::EllipsizeMode Clutter::Label::get_ellipsize (  )  const

Return value: Pango::EllipsizeMode.

Returns:
Pango::EllipsizeMode
Since: 0.2.

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

Parameters:
mode A Pango::EllipsizeMode.

bool Clutter::Label::get_line_wrap (  )  const

Return value: true if the lines of the label are automatically wrapped.

Returns:
true if the lines of the label are automatically wrapped.
Since: 0.2.

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

Parameters:
wrap The setting.

bool Clutter::Label::get_use_markup (  )  const

Return value: true if the label's text will be parsed for markup.

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

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

Returns:
true if the lines of the label are automatically wrapped.
Since: 0.2.

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

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

Returns:
The Pango::Layout for this label
Since: 0.2.

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.

Returns:
The Pango::Layout for this label
Since: 0.2.

Pango::AttrList Clutter::Label::get_attributes (  )  const

Gets the attribute list that was set on the label using set_attributes(), if any.

Returns:
The attribute list, or 0 if none was set.
Since: 0.2.

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

Parameters:
attrs A Pango::AttrList.

Pango::Alignment Clutter::Label::get_alignment (  )  const

Return value: The labels Pango::Alignment.

Returns:
The labels Pango::Alignment
Since 0.2.

void Clutter::Label::set_alignment ( Pango::Alignment  wrap_mode  ) 

Sets text alignment of the label.

Parameters:
alignment A Pango::Alignment.

bool Clutter::Label::get_justify (  )  const

Retrieves whether the label should justify the text on both margins.

Returns:
true if the text should be justified
Since: 0.6.

void 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

Parameters:
justify Whether the text should be justified.


Friends And Related Function Documentation

Glib::RefPtr< Clutter::Label > wrap ( ClutterLabel *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
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.
Returns:
A C++ instance that wraps this C instance.


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

Generated on Fri Jun 6 02:18:32 2008 for cluttermm by  doxygen 1.5.5