ChamplainMarker

ChamplainMarker — A marker to identify points of interest on a map

Synopsis

                    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);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----ClutterGroup
                     +----ChamplainBaseMarker
                           +----ChamplainMarker

Implemented Interfaces

ChamplainMarker implements ClutterScriptable and ClutterContainer.

Properties

  "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

Description

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.

Details

ChamplainMarker

typedef struct _ChamplainMarker ChamplainMarker;


champlain_marker_set_highlight_color ()

void                champlain_marker_set_highlight_color
                                                        (ClutterColor *color);

color :


champlain_marker_new ()

ClutterActor *      champlain_marker_new                (void);

Returns :

a new ChamplainMarker ready to be used as a ClutterActor.

Since 0.2


champlain_marker_new_with_text ()

ClutterActor *      champlain_marker_new_with_text      (const gchar *text,
                                                         const gchar *font,
                                                         ClutterColor *text_color,
                                                         ClutterColor *marker_color);

text :

the text of the text

font :

the font to use to draw the text, for example "Courrier Bold 11", can be NULL

text_color :

a ClutterColor, the color of the text, can be NULL

marker_color :

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


champlain_marker_new_with_image ()

ClutterActor *      champlain_marker_new_with_image     (ClutterActor *actor);

actor :

The actor of the image.

Returns :

a new ChamplainMarker with a drawn marker containing the given image.

Since 0.4


champlain_marker_new_full ()

ClutterActor *      champlain_marker_new_full           (const gchar *text,
                                                         ClutterActor *actor);

text :

The text

actor :

The image

Returns :

a new ChamplainMarker with a drawn marker containing the given image.

Since 0.4


champlain_marker_new_from_file ()

ClutterActor *      champlain_marker_new_from_file      (const gchar *filename,
                                                         GError **error);

filename :

The filename of the image.

error :

Return location for an error.

Returns :

a new ChamplainMarker with a drawn marker containing the given image.

Since 0.4


champlain_marker_set_text ()

void                champlain_marker_set_text           (ChamplainMarker *marker,
                                                         const gchar *text);

Sets the marker's text.

marker :

The marker

text :

The text

Since 0.4


champlain_marker_get_text ()

const gchar *       champlain_marker_get_text           (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's text.

Since 0.4


champlain_marker_set_image ()

void                champlain_marker_set_image          (ChamplainMarker *marker,
                                                         ClutterActor *image);

Sets the marker's image.

marker :

The marker.

image :

The image as a ClutterActor or NULL to remove the current image.

Since 0.4


champlain_marker_get_image ()

ClutterActor *      champlain_marker_get_image          (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's image.

Since 0.4


champlain_marker_set_use_markup ()

void                champlain_marker_set_use_markup     (ChamplainMarker *marker,
                                                         gboolean use_markup);

Sets if the marker's text uses markup.

marker :

The marker

use_markup :

The value

Since 0.4


champlain_marker_get_use_markup ()

gboolean            champlain_marker_get_use_markup     (ChamplainMarker *marker);

marker :

The marker

Returns :

if the marker's text contains markup.

Since 0.4


champlain_marker_set_alignment ()

void                champlain_marker_set_alignment      (ChamplainMarker *marker,
                                                         PangoAlignment alignment);

Set the marker's text alignment.

marker :

The marker

alignment :

The marker's alignment

Since 0.4


champlain_marker_get_alignment ()

PangoAlignment      champlain_marker_get_alignment      (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's text alignment.

Since 0.4


champlain_marker_set_color ()

void                champlain_marker_set_color          (ChamplainMarker *marker,
                                                         const ClutterColor *color);

Set the marker's background color.

marker :

The marker

color :

The marker's background color or NULL to reset the background to the default color. The color parameter is copied.

Since 0.4


champlain_marker_get_color ()

ClutterColor *      champlain_marker_get_color          (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's color.

Since 0.4


champlain_marker_set_text_color ()

void                champlain_marker_set_text_color     (ChamplainMarker *marker,
                                                         const ClutterColor *color);

Set the marker's text color.

marker :

The marker

color :

The marker's text color or NULL to reset the text to the default color. The color parameter is copied.

Since 0.4


champlain_marker_get_text_color ()

ClutterColor *      champlain_marker_get_text_color     (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's text color.

Since 0.4


champlain_marker_set_font_name ()

void                champlain_marker_set_font_name      (ChamplainMarker *marker,
                                                         const gchar *font_name);

Set the marker's font name such as "Sans 12".

marker :

The marker

font_name :

The marker's font name or NULL to reset the font to the default value.

Since 0.4


champlain_marker_get_font_name ()

const gchar *       champlain_marker_get_font_name      (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's font name.

Since 0.4


champlain_marker_set_wrap ()

void                champlain_marker_set_wrap           (ChamplainMarker *marker,
                                                         gboolean wrap);

Set if the marker's text wrap.

marker :

The marker

wrap :

The marker's wrap.

Since 0.4


champlain_marker_get_wrap ()

gboolean            champlain_marker_get_wrap           (ChamplainMarker *marker);

marker :

The marker

Returns :

if the marker's text wraps.

Since 0.4


champlain_marker_set_wrap_mode ()

void                champlain_marker_set_wrap_mode      (ChamplainMarker *marker,
                                                         PangoWrapMode wrap_mode);

Set the marker's text color.

marker :

The marker

wrap_mode :

The marker's wrap.

Since 0.4


champlain_marker_get_wrap_mode ()

PangoWrapMode       champlain_marker_get_wrap_mode      (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's text wrap mode.

Since 0.4


champlain_marker_set_attributes ()

void                champlain_marker_set_attributes     (ChamplainMarker *marker,
                                                         PangoAttrList *list);

Set the marker's text attribute.

marker :

The marker

list :

The marker's text attributes.

Since 0.4


champlain_marker_set_single_line_mode ()

void                champlain_marker_set_single_line_mode
                                                        (ChamplainMarker *marker,
                                                         gboolean mode);

Set if the marker's text is on a single line.

marker :

The marker

mode :

The marker's single line mode

Since 0.4


champlain_marker_get_single_line_mode ()

gboolean            champlain_marker_get_single_line_mode
                                                        (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's text single side mode.

Since 0.4


champlain_marker_set_ellipsize ()

void                champlain_marker_set_ellipsize      (ChamplainMarker *marker,
                                                         PangoEllipsizeMode mode);

Set the marker's text ellipsize mode.

marker :

The marker

mode :

The marker's ellipsize mode.

Since 0.4


champlain_marker_get_ellipsize ()

PangoEllipsizeMode  champlain_marker_get_ellipsize      (ChamplainMarker *marker);

marker :

The marker

Returns :

the marker's text ellipsize mode.

Since 0.4


champlain_marker_set_draw_background ()

void                champlain_marker_set_draw_background
                                                        (ChamplainMarker *marker,
                                                         gboolean background);

Set if the marker has a background.

marker :

The marker

background :

value.

Since 0.4


champlain_marker_get_draw_background ()

gboolean            champlain_marker_get_draw_background
                                                        (ChamplainMarker *marker);

marker :

The marker

Returns :

if the marker's has a background.

Since 0.4

Property Details

The "alignment" property

  "alignment"                PangoAlignment        : Read / Write

The marker's alignment

Default value: PANGO_ALIGN_LEFT

Since 0.4


The "color" property

  "color"                    ClutterColor*         : Read / Write

The marker's color

Since 0.4


The "draw-background" property

  "draw-background"          gboolean              : Read / Write

If the marker has a background

Default value: TRUE

Since 0.4


The "ellipsize" property

  "ellipsize"                PangoEllipsizeMode    : Read / Write

The marker's ellipsize mode

Default value: PANGO_ELLIPSIZE_NONE

Since 0.4


The "font-name" property

  "font-name"                gchar*                : Read / Write

The marker's text font name

Default value: "Sans 11"

Since 0.4


The "image" property

  "image"                    ClutterActor*         : Read / Write

The image of the marker

Since 0.4


The "single-line-mode" property

  "single-line-mode"         gboolean              : Read / Write

If the marker is in single line mode

Default value: TRUE

Since 0.4


The "text" property

  "text"                     gchar*                : Read / Write

The text of the marker

Default value: ""

Since 0.4


The "text-color" property

  "text-color"               ClutterColor*         : Read / Write

The marker's text color

Since 0.4


The "use-markup" property

  "use-markup"               gboolean              : Read / Write

If the marker's text uses markup

Default value: FALSE

Since 0.4


The "wrap" property

  "wrap"                     gboolean              : Read / Write

If the marker's text wrap is set

Default value: FALSE

Since 0.4


The "wrap-mode" property

  "wrap-mode"                PangoWrapMode         : Read / Write

The marker's text wrap mode

Default value: PANGO_WRAP_WORD

Since 0.4