Top |
PangoAlignment | alignment | Read / Write |
ClutterColor * | color | Read / Write |
gboolean | draw-background | Read / Write |
gboolean | draw-shadow | 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 |
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── ChamplainMarker ╰── ChamplainLabel
ChamplainLabel implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainLocation.
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.
ClutterActor *
champlain_label_new (void
);
Creates a new instance of ChamplainLabel.
Since: 0.10
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.
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
ClutterActor *
champlain_label_new_with_image (ClutterActor *actor
);
Creates a new instance of ChamplainLabel with image.
Since: 0.10
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
ClutterActor * champlain_label_new_full (const gchar *text
,ClutterActor *actor
);
Creates a new instance of ChamplainLabel consisting of a custom ClutterActor.
Since: 0.10
void champlain_label_set_text (ChamplainLabel *label
,const gchar *text
);
Sets the label's text.
Since: 0.10
void champlain_label_set_image (ChamplainLabel *label
,ClutterActor *image
);
Sets the label's image.
label |
||
image |
The image as a |
[allow-none] |
Since: 0.10
void champlain_label_set_use_markup (ChamplainLabel *label
,gboolean use_markup
);
Sets if the label's text uses markup.
Since: 0.10
void champlain_label_set_alignment (ChamplainLabel *label
,PangoAlignment alignment
);
Sets the label's text alignment.
Since: 0.10
void champlain_label_set_color (ChamplainLabel *label
,const ClutterColor *color
);
Sets the label's background color.
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
void champlain_label_set_text_color (ChamplainLabel *label
,const ClutterColor *color
);
Sets the label's text color.
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
void champlain_label_set_font_name (ChamplainLabel *label
,const gchar *font_name
);
Sets the label's font name such as "Sans 12".
label |
||
font_name |
The label's font name or NULL to reset the font to the default value. |
[allow-none] |
Since: 0.10
void champlain_label_set_wrap (ChamplainLabel *label
,gboolean wrap
);
Sets if the label's text wrap.
Since: 0.10
void champlain_label_set_wrap_mode (ChamplainLabel *label
,PangoWrapMode wrap_mode
);
Sets the label's text wrap mode.
Since: 0.10
void champlain_label_set_attributes (ChamplainLabel *label
,PangoAttrList *list
);
Sets the label's text attributes.
Since: 0.10
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
void champlain_label_set_ellipsize (ChamplainLabel *label
,PangoEllipsizeMode mode
);
Sets the label's text ellipsize mode.
Since: 0.10
void champlain_label_set_draw_background (ChamplainLabel *label
,gboolean background
);
Sets if the label has a background.
Since: 0.10
void champlain_label_set_draw_shadow (ChamplainLabel *label
,gboolean shadow
);
Sets if the label's background has a shadow.
Since: 0.12.10
gboolean
champlain_label_get_use_markup (ChamplainLabel *label
);
Check whether the label uses markup.
Since: 0.10
const gchar *
champlain_label_get_text (ChamplainLabel *label
);
Get the label's text.
Since: 0.10
ClutterActor *
champlain_label_get_image (ChamplainLabel *label
);
Get the label's image.
Since: 0.10
PangoAlignment
champlain_label_get_alignment (ChamplainLabel *label
);
Get the label's text alignment.
Since: 0.10
ClutterColor *
champlain_label_get_color (ChamplainLabel *label
);
Gets the label's background color.
Since: 0.10
ClutterColor *
champlain_label_get_text_color (ChamplainLabel *label
);
Gets the label's text color.
Since: 0.10
const gchar *
champlain_label_get_font_name (ChamplainLabel *label
);
Gets the label's font name.
Since: 0.10
gboolean
champlain_label_get_wrap (ChamplainLabel *label
);
Checks whether the label text wraps.
Since: 0.10
PangoWrapMode
champlain_label_get_wrap_mode (ChamplainLabel *label
);
Gets the label's text wrap mode.
Since: 0.10
PangoEllipsizeMode
champlain_label_get_ellipsize (ChamplainLabel *label
);
Gets the label's text ellipsize mode.
Since: 0.10
gboolean
champlain_label_get_single_line_mode (ChamplainLabel *label
);
Checks the label's single line mode.
Since: 0.10
gboolean
champlain_label_get_draw_background (ChamplainLabel *label
);
Checks whether the label has a background.
Since: 0.10
gboolean
champlain_label_get_draw_shadow (ChamplainLabel *label
);
Checks whether the label's background has a shadow.
Since: 0.12.10
PangoAttrList *
champlain_label_get_attributes (ChamplainLabel *label
);
Gets the label's text attributes.
Since: 0.10
struct ChamplainLabel;
The ChamplainLabel structure contains only private data and should be accessed using the provided API
Since: 0.10
“alignment”
property“alignment” PangoAlignment
The label's alignment
Owner: ChamplainLabel
Flags: Read / Write
Default value: PANGO_ALIGN_LEFT
Since: 0.10
“color”
property“color” ClutterColor *
The label's color
Owner: ChamplainLabel
Flags: Read / Write
Since: 0.10
“draw-background”
property“draw-background” gboolean
If the label has a background
Owner: ChamplainLabel
Flags: Read / Write
Default value: TRUE
Since: 0.10
“draw-shadow”
property“draw-shadow” gboolean
If the label background has a shadow
Owner: ChamplainLabel
Flags: Read / Write
Default value: TRUE
Since: 0.12.10
“ellipsize”
property“ellipsize” PangoEllipsizeMode
The label's ellipsize mode
Owner: ChamplainLabel
Flags: Read / Write
Default value: PANGO_ELLIPSIZE_NONE
Since: 0.10
“font-name”
property“font-name” gchar *
The label's text font name
Owner: ChamplainLabel
Flags: Read / Write
Default value: "Sans 11"
Since: 0.10
“image”
property“image” ClutterActor *
The image of the label
Owner: ChamplainLabel
Flags: Read / Write
Since: 0.10
“single-line-mode”
property“single-line-mode” gboolean
If the label is in single line mode
Owner: ChamplainLabel
Flags: Read / Write
Default value: TRUE
Since: 0.10
“text”
property“text” gchar *
The text of the label
Owner: ChamplainLabel
Flags: Read / Write
Default value: ""
Since: 0.10
“text-color”
property“text-color” ClutterColor *
The label's text color
Owner: ChamplainLabel
Flags: Read / Write
Since: 0.10
“use-markup”
property“use-markup” gboolean
If the label's text uses markup
Owner: ChamplainLabel
Flags: Read / Write
Default value: FALSE
Since: 0.10
“wrap”
property“wrap” gboolean
If the label's text wrap is set
Owner: ChamplainLabel
Flags: Read / Write
Default value: FALSE
Since: 0.10
“wrap-mode”
property“wrap-mode” PangoWrapMode
The label's text wrap mode
Owner: ChamplainLabel
Flags: Read / Write
Default value: PANGO_WRAP_WORD
Since: 0.10