![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
ChamplainMarker; void champlain_marker_set_highlight_color (ClutterColor *color
); ClutterActor * champlain_marker_new (void
); ClutterActor * champlain_marker_new_with_text (const gchar *text
,const gchar *font
,ClutterColor *text_color
,ClutterColor *marker_color
); ClutterActor * champlain_marker_new_with_image (ClutterActor *actor
); ClutterActor * champlain_marker_new_full (const gchar *text
,ClutterActor *actor
); ClutterActor * champlain_marker_new_from_file (const gchar *filename
,GError **error
); void champlain_marker_set_text (ChamplainMarker *marker
,const gchar *text
); const gchar * champlain_marker_get_text (ChamplainMarker *marker
); void champlain_marker_set_image (ChamplainMarker *marker
,ClutterActor *image
); ClutterActor * champlain_marker_get_image (ChamplainMarker *marker
); void champlain_marker_set_use_markup (ChamplainMarker *marker
,gboolean use_markup
); gboolean champlain_marker_get_use_markup (ChamplainMarker *marker
); void champlain_marker_set_alignment (ChamplainMarker *marker
,PangoAlignment alignment
); PangoAlignment champlain_marker_get_alignment (ChamplainMarker *marker
); void champlain_marker_set_color (ChamplainMarker *marker
,const ClutterColor *color
); ClutterColor * champlain_marker_get_color (ChamplainMarker *marker
); void champlain_marker_set_text_color (ChamplainMarker *marker
,const ClutterColor *color
); ClutterColor * champlain_marker_get_text_color (ChamplainMarker *marker
); void champlain_marker_set_font_name (ChamplainMarker *marker
,const gchar *font_name
); const gchar * champlain_marker_get_font_name (ChamplainMarker *marker
); void champlain_marker_set_wrap (ChamplainMarker *marker
,gboolean wrap
); gboolean champlain_marker_get_wrap (ChamplainMarker *marker
); void champlain_marker_set_wrap_mode (ChamplainMarker *marker
,PangoWrapMode wrap_mode
); PangoWrapMode champlain_marker_get_wrap_mode (ChamplainMarker *marker
); void champlain_marker_set_attributes (ChamplainMarker *marker
,PangoAttrList *list
); void champlain_marker_set_single_line_mode (ChamplainMarker *marker
,gboolean mode
); gboolean champlain_marker_get_single_line_mode (ChamplainMarker *marker
); void champlain_marker_set_ellipsize (ChamplainMarker *marker
,PangoEllipsizeMode mode
); PangoEllipsizeMode champlain_marker_get_ellipsize (ChamplainMarker *marker
); void champlain_marker_set_draw_background (ChamplainMarker *marker
,gboolean background
); gboolean champlain_marker_get_draw_background (ChamplainMarker *marker
);
GObject +----GInitiallyUnowned +----ClutterActor +----ClutterGroup +----ChamplainBaseMarker +----ChamplainMarker
"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 ChamplainLayer). 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_marker_set_position.
Champlain has a default type of markers with text. To create one, use champlain_marker_new_with_text.
void champlain_marker_set_highlight_color
(ClutterColor *color
);
|
ClutterActor * champlain_marker_new (void
);
Returns : |
a new ChamplainMarker ready to be used as a ClutterActor. |
Since 0.2
ClutterActor * champlain_marker_new_with_text (const gchar *text
,const gchar *font
,ClutterColor *text_color
,ClutterColor *marker_color
);
|
the text of the text |
|
the font to use to draw the text, for example "Courrier Bold 11", can be NULL |
|
a ClutterColor, the color of the text, can be NULL |
|
a ClutterColor, the color of the marker, can be NULL |
Returns : |
a new ChamplainMarker with a drawn marker containing the given text. |
Since 0.2
ClutterActor * champlain_marker_new_with_image (ClutterActor *actor
);
|
The actor of the image. |
Returns : |
a new ChamplainMarker with a drawn marker containing the given image. |
Since 0.4
ClutterActor * champlain_marker_new_full (const gchar *text
,ClutterActor *actor
);
|
The text |
|
The image |
Returns : |
a new ChamplainMarker with a drawn marker containing the given image. |
Since 0.4
ClutterActor * champlain_marker_new_from_file (const gchar *filename
,GError **error
);
|
The filename of the image. |
|
Return location for an error. |
Returns : |
a new ChamplainMarker with a drawn marker containing the given image. |
Since 0.4
void champlain_marker_set_text (ChamplainMarker *marker
,const gchar *text
);
Sets the marker's text.
|
The marker |
|
The text |
Since 0.4
const gchar * champlain_marker_get_text (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's text. |
Since 0.4
void champlain_marker_set_image (ChamplainMarker *marker
,ClutterActor *image
);
Sets the marker's image.
|
The marker. |
|
The image as a ClutterActor or NULL to remove the current image.
|
Since 0.4
ClutterActor * champlain_marker_get_image (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's image. |
Since 0.4
void champlain_marker_set_use_markup (ChamplainMarker *marker
,gboolean use_markup
);
Sets if the marker's text uses markup.
|
The marker |
|
The value |
Since 0.4
gboolean champlain_marker_get_use_markup (ChamplainMarker *marker
);
|
The marker |
Returns : |
if the marker's text contains markup. |
Since 0.4
void champlain_marker_set_alignment (ChamplainMarker *marker
,PangoAlignment alignment
);
Set the marker's text alignment.
|
The marker |
|
The marker's alignment |
Since 0.4
PangoAlignment champlain_marker_get_alignment (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's text alignment. |
Since 0.4
void champlain_marker_set_color (ChamplainMarker *marker
,const ClutterColor *color
);
Set the marker's background color.
|
The marker |
|
The marker's background color or NULL to reset the background to the default color. The color parameter is copied. |
Since 0.4
ClutterColor * champlain_marker_get_color (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's color. |
Since 0.4
void champlain_marker_set_text_color (ChamplainMarker *marker
,const ClutterColor *color
);
Set the marker's text color.
|
The marker |
|
The marker's text color or NULL to reset the text to the default color. The color parameter is copied. |
Since 0.4
ClutterColor * champlain_marker_get_text_color (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's text color. |
Since 0.4
void champlain_marker_set_font_name (ChamplainMarker *marker
,const gchar *font_name
);
Set the marker's font name such as "Sans 12".
|
The marker |
|
The marker's font name or NULL to reset the font to the default value. |
Since 0.4
const gchar * champlain_marker_get_font_name (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's font name. |
Since 0.4
void champlain_marker_set_wrap (ChamplainMarker *marker
,gboolean wrap
);
Set if the marker's text wrap.
|
The marker |
|
The marker's wrap. |
Since 0.4
gboolean champlain_marker_get_wrap (ChamplainMarker *marker
);
|
The marker |
Returns : |
if the marker's text wraps. |
Since 0.4
void champlain_marker_set_wrap_mode (ChamplainMarker *marker
,PangoWrapMode wrap_mode
);
Set the marker's text color.
|
The marker |
|
The marker's wrap. |
Since 0.4
PangoWrapMode champlain_marker_get_wrap_mode (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's text wrap mode. |
Since 0.4
void champlain_marker_set_attributes (ChamplainMarker *marker
,PangoAttrList *list
);
Set the marker's text attribute.
|
The marker |
|
The marker's text attributes. |
Since 0.4
void champlain_marker_set_single_line_mode (ChamplainMarker *marker
,gboolean mode
);
Set if the marker's text is on a single line.
|
The marker |
|
The marker's single line mode |
Since 0.4
gboolean champlain_marker_get_single_line_mode
(ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's text single side mode. |
Since 0.4
void champlain_marker_set_ellipsize (ChamplainMarker *marker
,PangoEllipsizeMode mode
);
Set the marker's text ellipsize mode.
|
The marker |
|
The marker's ellipsize mode. |
Since 0.4
PangoEllipsizeMode champlain_marker_get_ellipsize (ChamplainMarker *marker
);
|
The marker |
Returns : |
the marker's text ellipsize mode. |
Since 0.4
void champlain_marker_set_draw_background (ChamplainMarker *marker
,gboolean background
);
Set if the marker has a background.
|
The marker |
|
value. |
Since 0.4
gboolean champlain_marker_get_draw_background
(ChamplainMarker *marker
);
|
The marker |
Returns : |
if the marker's has a background. |
Since 0.4
"alignment"
property"alignment" PangoAlignment : Read / Write
The marker's alignment
Default value: PANGO_ALIGN_LEFT
Since 0.4
"draw-background"
property"draw-background" gboolean : Read / Write
If the marker has a background
Default value: TRUE
Since 0.4
"ellipsize"
property"ellipsize" PangoEllipsizeMode : Read / Write
The marker's ellipsize mode
Default value: PANGO_ELLIPSIZE_NONE
Since 0.4
"font-name"
property"font-name" gchar* : Read / Write
The marker's text font name
Default value: "Sans 11"
Since 0.4
"single-line-mode"
property"single-line-mode" gboolean : Read / Write
If the marker is in single line mode
Default value: TRUE
Since 0.4
"text-color"
property "text-color" ClutterColor* : Read / Write
The marker's text color
Since 0.4
"use-markup"
property"use-markup" gboolean : Read / Write
If the marker's text uses markup
Default value: FALSE
Since 0.4
"wrap"
property"wrap" gboolean : Read / Write
If the marker's text wrap is set
Default value: FALSE
Since 0.4
"wrap-mode"
property"wrap-mode" PangoWrapMode : Read / Write
The marker's text wrap mode
Default value: PANGO_WRAP_WORD
Since 0.4