Champlain.Label¶
- Subclasses:
None
Methods¶
- Inherited:
Champlain.Marker (15), Clutter.Actor (238), GObject.Object (37), Clutter.Animatable (5), Clutter.Container (17), Clutter.Scriptable (4), Champlain.Location (3)
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Champlain.Marker (3), Clutter.Actor (82), Champlain.Location (2)
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
The label’s alignment |
||
r/w |
The label’s color |
||
r/w |
The label has a background |
||
r/w |
The label background has a shadow |
||
r/w |
The label’s text ellipsize mode |
||
r/w |
The label’s text font name |
||
r/w |
The image of the label |
||
r/w |
The label’s single line mode |
||
r/w |
The text of the label |
||
r/w |
The label’s text color |
||
r/w |
The text uses markup |
||
r/w |
The label’s text wrap |
||
r/w |
The label’s text wrap mode |
Signals¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Champlain.Label(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Champlain.Labelstructure contains only private data and should be accessed using the provided APINew in version 0.10.
- classmethod new()¶
- Returns:
a new
Champlain.Labelready to be used as aClutter.Actor.- Return type:
Creates a new instance of
Champlain.Label.New in version 0.10.
- classmethod new_from_file(filename)¶
- Parameters:
filename (
str) – The filename of the image.- Raises:
- Returns:
a new
Champlain.Labelwith a drawn label containing the given image.- Return type:
Creates a new instance of
Champlain.Labelwith image loaded from file.New in version 0.10.
- classmethod new_full(text, actor)¶
- Parameters:
text (
str) – The text of the labelactor (
Clutter.Actor) – The image as a ClutterActor
- Returns:
a new
Champlain.Labelwith a drawn label containing the given image.- Return type:
Creates a new instance of
Champlain.Labelconsisting of a customClutter.Actor.New in version 0.10.
- classmethod new_with_image(actor)¶
- Parameters:
actor (
Clutter.Actor) – The image as a ClutterActor.- Returns:
a new
Champlain.Labelwith a drawn label containing the given image.- Return type:
Creates a new instance of
Champlain.Labelwith image.New in version 0.10.
- classmethod new_with_text(text, font, text_color, label_color)¶
- Parameters:
text (
str) – the text of the labelfont (
strorNone) – the font to use to draw the text, for example “Courrier Bold 11”, can beNonetext_color (
Clutter.ColororNone) – aClutter.Color, the color of the text, can beNonelabel_color (
Clutter.ColororNone) – aClutter.Color, the color of the label, can beNone
- Returns:
a new
Champlain.Labelwith a drawn label containing the given text.- Return type:
Creates a new instance of
Champlain.Labelwith text value.New in version 0.10.
- get_alignment()¶
- Returns:
the label’s text alignment.
- Return type:
Get the label’s text alignment.
New in version 0.10.
- get_attributes()¶
- Returns:
the label’s text attributes.
- Return type:
Gets the label’s text attributes.
New in version 0.10.
- get_color()¶
- Returns:
the label’s background color.
- Return type:
Gets the label’s background color.
New in version 0.10.
- get_draw_background()¶
- Returns:
if the label has a background.
- Return type:
Checks whether the label has a background.
New in version 0.10.
- get_draw_shadow()¶
- Returns:
if the label’s background has a shadow.
- Return type:
Checks whether the label’s background has a shadow.
New in version 0.12.10.
- get_ellipsize()¶
- Returns:
the label’s text ellipsize mode.
- Return type:
Gets the label’s text ellipsize mode.
New in version 0.10.
- get_font_name()¶
- Returns:
the label’s font name.
- Return type:
Gets the label’s font name.
New in version 0.10.
- get_image()¶
- Returns:
the label’s image.
- Return type:
Get the label’s image.
New in version 0.10.
- get_single_line_mode()¶
- Returns:
the label’s text single line mode.
- Return type:
Checks the label’s single line mode.
New in version 0.10.
- get_text_color()¶
- Returns:
the label’s text color.
- Return type:
Gets the label’s text color.
New in version 0.10.
- get_use_markup()¶
- Returns:
if the label’s text contains markup.
- Return type:
Check whether the label uses markup.
New in version 0.10.
- get_wrap()¶
- Returns:
if the label’s text wraps.
- Return type:
Checks whether the label text wraps.
New in version 0.10.
- get_wrap_mode()¶
- Returns:
the label’s text wrap mode.
- Return type:
Gets the label’s text wrap mode.
New in version 0.10.
- set_alignment(alignment)¶
- Parameters:
alignment (
Pango.Alignment) – The label’s alignment
Sets the label’s text alignment.
New in version 0.10.
- set_attributes(list)¶
- Parameters:
list (
Pango.AttrList) – The label’s text attributes.
Sets the label’s text attributes.
New in version 0.10.
- set_color(color)¶
- Parameters:
color (
Clutter.ColororNone) – The label’s background color orNoneto reset the background to the default color. The color parameter is copied.
Sets the label’s background color.
New in version 0.10.
- set_draw_background(background)¶
- Parameters:
background (
bool) – value.
Sets if the label has a background.
New in version 0.10.
- set_draw_shadow(shadow)¶
- Parameters:
shadow (
bool) – value.
Sets if the label’s background has a shadow.
New in version 0.12.10.
- set_ellipsize(mode)¶
- Parameters:
mode (
Pango.EllipsizeMode) – The label’s ellipsize mode.
Sets the label’s text ellipsize mode.
New in version 0.10.
- set_font_name(font_name)¶
- Parameters:
font_name (
strorNone) – The label’s font name orNoneto reset the font to the default value.
Sets the label’s font name such as “Sans 12”.
New in version 0.10.
- set_image(image)¶
- Parameters:
image (
Clutter.ActororNone) – The image as a ClutterActor orNoneto remove the current image.
Sets the label’s image.
New in version 0.10.
- set_single_line_mode(mode)¶
- Parameters:
mode (
bool) – The label’s single line mode
Sets if the label’s text is on a single line.
New in version 0.10.
- set_text(text)¶
- Parameters:
text (
str) – The new text of the label
Sets the label’s text.
New in version 0.10.
- set_text_color(color)¶
- Parameters:
color (
Clutter.ColororNone) – The label’s text color orNoneto reset the text to the default color. The color parameter is copied.
Sets the label’s text color.
New in version 0.10.
- set_use_markup(use_markup)¶
- Parameters:
use_markup (
bool) – The value
Sets if the label’s text uses markup.
New in version 0.10.
- set_wrap(wrap)¶
- Parameters:
wrap (
bool) – The label’s wrap.
Sets if the label’s text wrap.
New in version 0.10.
- set_wrap_mode(wrap_mode)¶
- Parameters:
wrap_mode (
Pango.WrapMode) – The label’s wrap mode.
Sets the label’s text wrap mode.
New in version 0.10.
Property Details¶
- Champlain.Label.props.alignment¶
- Name:
alignment- Type:
- Default Value:
- Flags:
The label’s alignment
New in version 0.10.
- Champlain.Label.props.color¶
- Name:
color- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x00000000)>- Flags:
The label’s color
New in version 0.10.
- Champlain.Label.props.draw_background¶
-
If the label has a background
New in version 0.10.
- Champlain.Label.props.draw_shadow¶
-
If the label background has a shadow
New in version 0.12.10.
- Champlain.Label.props.ellipsize¶
- Name:
ellipsize- Type:
- Default Value:
- Flags:
The label’s ellipsize mode
New in version 0.10.
- Champlain.Label.props.font_name¶
-
The label’s text font name
New in version 0.10.
- Champlain.Label.props.image¶
- Name:
image- Type:
- Default Value:
- Flags:
The image of the label
New in version 0.10.
- Champlain.Label.props.single_line_mode¶
-
If the label is in single line mode
New in version 0.10.
- Champlain.Label.props.text¶
-
The text of the label
New in version 0.10.
- Champlain.Label.props.text_color¶
- Name:
text-color- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x00000000)>- Flags:
The label’s text color
New in version 0.10.
- Champlain.Label.props.use_markup¶
-
If the label’s text uses markup
New in version 0.10.
- Champlain.Label.props.wrap¶
-
If the label’s text wrap is set
New in version 0.10.
- Champlain.Label.props.wrap_mode¶
- Name:
wrap-mode- Type:
- Default Value:
- Flags:
The label’s text wrap mode
New in version 0.10.