![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct ChamplainLabel; ClutterActor * champlain_label_new (void
); ClutterActor * champlain_label_new_with_text (const gchar *text
,const gchar *font
,ClutterColor *text_color
,ClutterColor *label_color
); ClutterActor * champlain_label_new_with_image (ClutterActor *actor
); ClutterActor * champlain_label_new_from_file (const gchar *filename
,GError **error
); ClutterActor * champlain_label_new_full (const gchar *text
,ClutterActor *actor
); void champlain_label_set_text (ChamplainLabel *label
,const gchar *text
); void champlain_label_set_image (ChamplainLabel *label
,ClutterActor *image
); void champlain_label_set_use_markup (ChamplainLabel *label
,gboolean use_markup
); void champlain_label_set_alignment (ChamplainLabel *label
,PangoAlignment alignment
); void champlain_label_set_color (ChamplainLabel *label
,const ClutterColor *color
); void champlain_label_set_text_color (ChamplainLabel *label
,const ClutterColor *color
); void champlain_label_set_font_name (ChamplainLabel *label
,const gchar *font_name
); void champlain_label_set_wrap (ChamplainLabel *label
,gboolean wrap
); void champlain_label_set_wrap_mode (ChamplainLabel *label
,PangoWrapMode wrap_mode
); void champlain_label_set_attributes (ChamplainLabel *label
,PangoAttrList *list
); void champlain_label_set_single_line_mode (ChamplainLabel *label
,gboolean mode
); void champlain_label_set_ellipsize (ChamplainLabel *label
,PangoEllipsizeMode mode
); void champlain_label_set_draw_background (ChamplainLabel *label
,gboolean background
); gboolean champlain_label_get_use_markup (ChamplainLabel *label
); const gchar * champlain_label_get_text (ChamplainLabel *label
); ClutterActor * champlain_label_get_image (ChamplainLabel *label
); PangoAlignment champlain_label_get_alignment (ChamplainLabel *label
); ClutterColor * champlain_label_get_color (ChamplainLabel *label
); ClutterColor * champlain_label_get_text_color (ChamplainLabel *label
); const gchar * champlain_label_get_font_name (ChamplainLabel *label
); gboolean champlain_label_get_wrap (ChamplainLabel *label
); PangoWrapMode champlain_label_get_wrap_mode (ChamplainLabel *label
); PangoEllipsizeMode champlain_label_get_ellipsize (ChamplainLabel *label
); gboolean champlain_label_get_single_line_mode (ChamplainLabel *label
); gboolean champlain_label_get_draw_background (ChamplainLabel *label
); PangoAttrList * champlain_label_get_attributes (ChamplainLabel *label
);
GObject +----GInitiallyUnowned +----ClutterActor +----ChamplainMarker +----ChamplainLabel
ChamplainLabel implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainLocation.
"alignment" PangoAlignment : Read / Write "color" ClutterColor* : Read / Write "draw-background" gboolean : Read / Write "ellipsize" PangoEllipsizeMode : Read / Write "font-name" gchar* : Read / Write "image" ClutterActor* : Read / Write "single-line-mode" gboolean : Read / Write "text" gchar* : Read / Write "text-color" ClutterColor* : Read / Write "use-markup" gboolean : Read / Write "wrap" gboolean : Read / Write "wrap-mode" PangoWrapMode : Read / Write
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.
struct ChamplainLabel;
The ChamplainLabel structure contains only private data and should be accessed using the provided API
Since 0.10
ClutterActor * champlain_label_new (void
);
Creates a new instance of ChamplainLabel.
Returns : |
a new ChamplainLabel ready to be used as a ClutterActor. |
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.
|
the text of the text |
|
the font to use to draw the text, for example "Courrier Bold 11", can be NULL. [allow-none] |
|
a ClutterColor, the color of the text, can be NULL. [allow-none] |
|
a ClutterColor, the color of the label, can be NULL. [allow-none] |
Returns : |
a new ChamplainLabel with a drawn label containing the given text. |
Since 0.10
ClutterActor * champlain_label_new_with_image (ClutterActor *actor
);
Creates a new instance of ChamplainLabel with image.
|
The actor of the image. |
Returns : |
a new ChamplainLabel with a drawn label containing the given 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.
|
The filename of the image. |
|
Return location for an error. |
Returns : |
a new ChamplainLabel with a drawn label containing the given image. |
Since 0.10
ClutterActor * champlain_label_new_full (const gchar *text
,ClutterActor *actor
);
Creates a new instance of ChamplainLabel consisting of a custom ClutterActor.
|
The text |
|
The image |
Returns : |
a new ChamplainLabel with a drawn label containing the given image. |
Since 0.10
void champlain_label_set_text (ChamplainLabel *label
,const gchar *text
);
Sets the label's text.
|
The label |
|
The text |
Since 0.10
void champlain_label_set_image (ChamplainLabel *label
,ClutterActor *image
);
Sets the label's image.
|
The label. |
|
The image as a ClutterActor or NULL to remove the current image. [allow-none]
|
Since 0.10
void champlain_label_set_use_markup (ChamplainLabel *label
,gboolean use_markup
);
Sets if the label's text uses markup.
|
The label |
|
The value |
Since 0.10
void champlain_label_set_alignment (ChamplainLabel *label
,PangoAlignment alignment
);
Set the label's text alignment.
|
The label |
|
The label's alignment |
Since 0.10
void champlain_label_set_color (ChamplainLabel *label
,const ClutterColor *color
);
Set the label's background color.
|
The label |
|
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
);
Set the label's text color.
|
The label |
|
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
);
Set the label's font name such as "Sans 12".
|
The label |
|
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
);
Set if the label's text wrap.
|
The label |
|
The label's wrap. |
Since 0.10
void champlain_label_set_wrap_mode (ChamplainLabel *label
,PangoWrapMode wrap_mode
);
Set the label's text color.
|
The label |
|
The label's wrap. |
Since 0.10
void champlain_label_set_attributes (ChamplainLabel *label
,PangoAttrList *list
);
Set the label's text attribute.
|
The label |
|
The label's text attributes. |
Since 0.10
void champlain_label_set_single_line_mode (ChamplainLabel *label
,gboolean mode
);
Set if the label's text is on a single line.
|
The label |
|
The label's single line mode |
Since 0.10
void champlain_label_set_ellipsize (ChamplainLabel *label
,PangoEllipsizeMode mode
);
Set the label's text ellipsize mode.
|
The label |
|
The label's ellipsize mode. |
Since 0.10
void champlain_label_set_draw_background (ChamplainLabel *label
,gboolean background
);
Set if the label has a background.
|
The label |
|
value. |
Since 0.10
gboolean champlain_label_get_use_markup (ChamplainLabel *label
);
Check whether the label uses markup.
|
The label |
Returns : |
if the label's text contains markup. |
Since 0.10
const gchar * champlain_label_get_text (ChamplainLabel *label
);
Get the label's text.
|
The label |
Returns : |
the label's text. |
Since 0.10
ClutterActor * champlain_label_get_image (ChamplainLabel *label
);
Get the label's image.
|
The label |
Returns : |
the label's image. [transfer none] |
Since 0.10
PangoAlignment champlain_label_get_alignment (ChamplainLabel *label
);
Get the label's text alignment.
|
The label |
Returns : |
the label's text alignment. |
Since 0.10
ClutterColor * champlain_label_get_color (ChamplainLabel *label
);
Gets the label's color.
|
The label |
Returns : |
the label's color. |
Since 0.10
ClutterColor * champlain_label_get_text_color (ChamplainLabel *label
);
Gets the label's text color.
|
The label |
Returns : |
the label's text color. |
Since 0.10
const gchar * champlain_label_get_font_name (ChamplainLabel *label
);
Gets the label's font name.
|
The label |
Returns : |
the label's font name. |
Since 0.10
gboolean champlain_label_get_wrap (ChamplainLabel *label
);
Check whether the label text wraps.
|
The label |
Returns : |
if the label's text wraps. |
Since 0.10
PangoWrapMode champlain_label_get_wrap_mode (ChamplainLabel *label
);
Get the label's text wrap mode.
|
The label |
Returns : |
the label's text wrap mode. |
Since 0.10
PangoEllipsizeMode champlain_label_get_ellipsize (ChamplainLabel *label
);
Get the label's text ellipsize mode.
|
The label |
Returns : |
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.
|
The label |
Returns : |
the label's text single line mode. |
Since 0.10
gboolean champlain_label_get_draw_background (ChamplainLabel *label
);
Checks whether the label has a background.
|
The label |
Returns : |
if the label's has a background. |
Since 0.10
PangoAttrList * champlain_label_get_attributes (ChamplainLabel *label
);
Gets the label's text attributes.
|
The label |
Returns : |
the label's text attributes. |
Since 0.10
"alignment"
property"alignment" PangoAlignment : Read / Write
The label's alignment
Default value: PANGO_ALIGN_LEFT
Since 0.10
"draw-background"
property"draw-background" gboolean : Read / Write
If the label has a background
Default value: TRUE
Since 0.10
"ellipsize"
property"ellipsize" PangoEllipsizeMode : Read / Write
The label's ellipsize mode
Default value: PANGO_ELLIPSIZE_NONE
Since 0.10
"font-name"
property"font-name" gchar* : Read / Write
The label's text font name
Default value: "Sans 11"
Since 0.10
"single-line-mode"
property"single-line-mode" gboolean : Read / Write
If the label is in single line mode
Default value: TRUE
Since 0.10
"text-color"
property"text-color" ClutterColor* : Read / Write
The label's text color
Since 0.10
"use-markup"
property"use-markup" gboolean : Read / Write
If the label's text uses markup
Default value: FALSE
Since 0.10
"wrap"
property"wrap" gboolean : Read / Write
If the label's text wrap is set
Default value: FALSE
Since 0.10
"wrap-mode"
property"wrap-mode" PangoWrapMode : Read / Write
The label's text wrap mode
Default value: PANGO_WRAP_WORD
Since 0.10