![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct ChamplainMarker; 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
); void champlain_marker_set_highlight_text_color (ClutterColor *color
); const ClutterColor * champlain_marker_get_highlight_text_color (void
); void champlain_marker_set_highlight_color (ClutterColor *color
); const ClutterColor * champlain_marker_get_highlight_color (void
); void champlain_marker_queue_redraw (ChamplainMarker *marker
);
GObject +----GInitiallyUnowned +----ClutterActor +----ClutterGroup +----ChamplainBaseMarker +----ChamplainMarker
ChamplainMarker implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ClutterContainer.
"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.
ClutterActor * champlain_marker_new (void
);
Creates a new instance of ChamplainMarker.
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
);
Creates a new instance of ChamplainMarker 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 marker, can be NULL. [allow-none] |
Returns : |
a new ChamplainMarker with a drawn marker containing the given text. |
Since 0.2
ClutterActor * champlain_marker_new_with_image (ClutterActor *actor
);
Creates a new instance of ChamplainMarker with image.
|
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
);
Creates a new instance of ChamplainMarker consisting of a custom ClutterActor.
|
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
);
Creates a new instance of ChamplainMarker with image loaded from file.
|
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
);
Get the marker's text.
|
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. [allow-none]
|
Since 0.4
ClutterActor * champlain_marker_get_image (ChamplainMarker *marker
);
Get the marker's image.
|
The marker |
Returns : |
the marker's image. [transfer none] |
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
);
Check whether the marker uses markup.
|
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
);
Get the marker's text alignment.
|
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. [allow-none] |
Since 0.4
ClutterColor * champlain_marker_get_color (ChamplainMarker *marker
);
Gets the marker's color.
|
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. [allow-none] |
Since 0.4
ClutterColor * champlain_marker_get_text_color (ChamplainMarker *marker
);
Gets the marker's text color.
|
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. [allow-none] |
Since 0.4
const gchar * champlain_marker_get_font_name (ChamplainMarker *marker
);
Gets the marker's font name.
|
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
);
Check whether the marker text wraps.
|
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
);
Get the marker's text wrap mode.
|
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
);
Checks the marker's single line mode.
|
The marker |
Returns : |
the marker's text single line 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
);
Get the marker's text ellipsize mode.
|
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
);
Checks whether the marker has a background.
|
The marker |
Returns : |
if the marker's has a background. |
Since 0.4
void champlain_marker_set_highlight_text_color
(ClutterColor *color
);
Changes the highlight text color, this is to ensure a better integration with the desktop, this is automatically done by GtkChamplainEmbed.
|
a ClutterColor |
Since 0.4
const ClutterColor * champlain_marker_get_highlight_text_color
(void
);
Gets the highlight text color.
Returns : |
the highlight text color. Should not be freed. |
Since 0.4.1
void champlain_marker_set_highlight_color
(ClutterColor *color
);
Changes the highlight color, this is to ensure a better integration with the desktop, this is automatically done by GtkChamplainEmbed.
|
a ClutterColor |
Since 0.4
const ClutterColor * champlain_marker_get_highlight_color
(void
);
Gets the highlight color.
Returns : |
the highlight color. Should not be freed. |
Since 0.4.1
void champlain_marker_queue_redraw (ChamplainMarker *marker
);
Queue a redraw of the marker as soon as possible. This function should not be used unless you are subclassing ChamplainMarker and adding new properties that affect the aspect of the marker. When they change, call this function to update the marker.
|
a ChamplainMarker |
Since 0.4.3
"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