Top |
Functions
Properties
PangoAlignment | alignment | Read / Write |
ClutterColor * | color | Read / Write |
gboolean | draw-background | Read / Write |
PangoEllipsizeMode | ellipsize | Read / Write |
gchar * | font-name | Read / Write |
ClutterActor * | image | Read / Write |
gboolean | single-line-mode | Read / Write |
gchar * | text | Read / Write |
ClutterColor * | text-color | Read / Write |
gboolean | use-markup | Read / Write |
gboolean | wrap | Read / Write |
PangoWrapMode | wrap-mode | Read / Write |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── ChamplainMarker ╰── ChamplainLabel
Implemented Interfaces
ChamplainLabel implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainLocation.
Description
Markers reprensent points of interest on a map. Markers need to be placed on a layer (a ChamplainMarkerLayer). Layers have to be added to a ChamplainView for the markers to show on the map.
A marker is nothing more than a regular ClutterActor. You can draw on it what ever you want. Set the markers position on the map using champlain_location_set_location.
Champlain has a default type of markers with text. To create one, use champlain_label_new_with_text.
Functions
champlain_label_new ()
ClutterActor *
champlain_label_new (void
);
Creates a new instance of ChamplainLabel.
Since 0.10
champlain_label_new_with_text ()
ClutterActor * champlain_label_new_with_text (const gchar *text
,const gchar *font
,ClutterColor *text_color
,ClutterColor *label_color
);
Creates a new instance of ChamplainLabel with text value.
Parameters
text |
the text of the label |
|
font |
the font to use to draw the text, for example "Courrier Bold 11", can be NULL. |
[allow-none] |
text_color |
a ClutterColor, the color of the text, can be NULL. |
[allow-none] |
label_color |
a ClutterColor, the color of the label, can be NULL. |
[allow-none] |
Since 0.10
champlain_label_new_with_image ()
ClutterActor *
champlain_label_new_with_image (ClutterActor *actor
);
Creates a new instance of ChamplainLabel with image.
Since 0.10
champlain_label_new_from_file ()
ClutterActor * champlain_label_new_from_file (const gchar *filename
,GError **error
);
Creates a new instance of ChamplainLabel with image loaded from file.
Since 0.10
champlain_label_new_full ()
ClutterActor * champlain_label_new_full (const gchar *text
,ClutterActor *actor
);
Creates a new instance of ChamplainLabel consisting of a custom ClutterActor.
Since 0.10
champlain_label_set_text ()
void champlain_label_set_text (ChamplainLabel *label
,const gchar *text
);
Sets the label's text.
Since 0.10
champlain_label_set_image ()
void champlain_label_set_image (ChamplainLabel *label
,ClutterActor *image
);
Sets the label's image.
Parameters
label |
||
image |
The image as a |
[allow-none] |
Since 0.10
champlain_label_set_use_markup ()
void champlain_label_set_use_markup (ChamplainLabel *label
,gboolean use_markup
);
Sets if the label's text uses markup.
Since 0.10
champlain_label_set_alignment ()
void champlain_label_set_alignment (ChamplainLabel *label
,PangoAlignment alignment
);
Sets the label's text alignment.
Since 0.10
champlain_label_set_color ()
void champlain_label_set_color (ChamplainLabel *label
,const ClutterColor *color
);
Sets the label's background color.
Parameters
label |
||
color |
The label's background color or NULL to reset the background to the default color. The color parameter is copied. |
[allow-none] |
Since 0.10
champlain_label_set_text_color ()
void champlain_label_set_text_color (ChamplainLabel *label
,const ClutterColor *color
);
Sets the label's text color.
Parameters
label |
||
color |
The label's text color or NULL to reset the text to the default color. The color parameter is copied. |
[allow-none] |
Since 0.10
champlain_label_set_font_name ()
void champlain_label_set_font_name (ChamplainLabel *label
,const gchar *font_name
);
Sets the label's font name such as "Sans 12".
Parameters
label |
||
font_name |
The label's font name or NULL to reset the font to the default value. |
[allow-none] |
Since 0.10
champlain_label_set_wrap ()
void champlain_label_set_wrap (ChamplainLabel *label
,gboolean wrap
);
Sets if the label's text wrap.
Since 0.10
champlain_label_set_wrap_mode ()
void champlain_label_set_wrap_mode (ChamplainLabel *label
,PangoWrapMode wrap_mode
);
Sets the label's text wrap mode.
Since 0.10
champlain_label_set_attributes ()
void champlain_label_set_attributes (ChamplainLabel *label
,PangoAttrList *list
);
Sets the label's text attributes.
Since 0.10
champlain_label_set_single_line_mode ()
void champlain_label_set_single_line_mode (ChamplainLabel *label
,gboolean mode
);
Sets if the label's text is on a single line.
Since 0.10
champlain_label_set_ellipsize ()
void champlain_label_set_ellipsize (ChamplainLabel *label
,PangoEllipsizeMode mode
);
Sets the label's text ellipsize mode.
Since 0.10
champlain_label_set_draw_background ()
void champlain_label_set_draw_background (ChamplainLabel *label
,gboolean background
);
Sets if the label has a background.
Since 0.10
champlain_label_get_use_markup ()
gboolean
champlain_label_get_use_markup (ChamplainLabel *label
);
Check whether the label uses markup.
Since 0.10
champlain_label_get_text ()
const gchar *
champlain_label_get_text (ChamplainLabel *label
);
Get the label's text.
Since 0.10
champlain_label_get_image ()
ClutterActor *
champlain_label_get_image (ChamplainLabel *label
);
Get the label's image.
Since 0.10
champlain_label_get_alignment ()
PangoAlignment
champlain_label_get_alignment (ChamplainLabel *label
);
Get the label's text alignment.
Since 0.10
champlain_label_get_color ()
ClutterColor *
champlain_label_get_color (ChamplainLabel *label
);
Gets the label's background color.
Since 0.10
champlain_label_get_text_color ()
ClutterColor *
champlain_label_get_text_color (ChamplainLabel *label
);
Gets the label's text color.
Since 0.10
champlain_label_get_font_name ()
const gchar *
champlain_label_get_font_name (ChamplainLabel *label
);
Gets the label's font name.
Since 0.10
champlain_label_get_wrap ()
gboolean
champlain_label_get_wrap (ChamplainLabel *label
);
Checks whether the label text wraps.
Since 0.10
champlain_label_get_wrap_mode ()
PangoWrapMode
champlain_label_get_wrap_mode (ChamplainLabel *label
);
Gets the label's text wrap mode.
Since 0.10
champlain_label_get_ellipsize ()
PangoEllipsizeMode
champlain_label_get_ellipsize (ChamplainLabel *label
);
Gets the label's text ellipsize mode.
Since 0.10
champlain_label_get_single_line_mode ()
gboolean
champlain_label_get_single_line_mode (ChamplainLabel *label
);
Checks the label's single line mode.
Since 0.10
champlain_label_get_draw_background ()
gboolean
champlain_label_get_draw_background (ChamplainLabel *label
);
Checks whether the label has a background.
Since 0.10
champlain_label_get_attributes ()
PangoAttrList *
champlain_label_get_attributes (ChamplainLabel *label
);
Gets the label's text attributes.
Since 0.10
Types and Values
struct ChamplainLabel
struct ChamplainLabel;
The ChamplainLabel structure contains only private data and should be accessed using the provided API
Since 0.10
Property Details
The “alignment”
property
“alignment” PangoAlignment
The label's alignment
Flags: Read / Write
Default value: PANGO_ALIGN_LEFT
Since 0.10
The “draw-background”
property
“draw-background” gboolean
If the label has a background
Flags: Read / Write
Default value: TRUE
Since 0.10
The “ellipsize”
property
“ellipsize” PangoEllipsizeMode
The label's ellipsize mode
Flags: Read / Write
Default value: PANGO_ELLIPSIZE_NONE
Since 0.10
The “font-name”
property
“font-name” gchar *
The label's text font name
Flags: Read / Write
Default value: "Sans 11"
Since 0.10
The “single-line-mode”
property
“single-line-mode” gboolean
If the label is in single line mode
Flags: Read / Write
Default value: TRUE
Since 0.10
The “text”
property
“text” gchar *
The text of the label
Flags: Read / Write
Default value: ""
Since 0.10
The “text-color”
property
“text-color” ClutterColor *
The label's text color
Flags: Read / Write
Since 0.10
The “use-markup”
property
“use-markup” gboolean
If the label's text uses markup
Flags: Read / Write
Default value: FALSE
Since 0.10
The “wrap”
property
“wrap” gboolean
If the label's text wrap is set
Flags: Read / Write
Default value: FALSE
Since 0.10
The “wrap-mode”
property
“wrap-mode” PangoWrapMode
The label's text wrap mode
Flags: Read / Write
Default value: PANGO_WRAP_WORD
Since 0.10