ChamplainMarker

## ChamplainMarker ChamplainMarker — Base class of libchamplain markers |

## Synopsis

    struct              ChamplainMarker;
    void                champlain_marker_set_selectable     (ChamplainMarker *marker,
                                                             gboolean value);
    gboolean            champlain_marker_get_selectable     (ChamplainMarker *marker);
    void                champlain_marker_set_draggable      (ChamplainMarker *marker,
                                                             gboolean value);
    gboolean            champlain_marker_get_draggable      (ChamplainMarker *marker);
    void                champlain_marker_set_selected       (ChamplainMarker *marker,
                                                             gboolean value);
    gboolean            champlain_marker_get_selected       (ChamplainMarker *marker);
    void                champlain_marker_animate_in         (ChamplainMarker *marker);
    void                champlain_marker_animate_in_with_delay
                                                            (ChamplainMarker *marker,
                                                             guint delay);
    void                champlain_marker_animate_out        (ChamplainMarker *marker);
    void                champlain_marker_animate_out_with_delay
                                                            (ChamplainMarker *marker,
                                                             guint delay);
    const ClutterColor * champlain_marker_get_selection_color
                                                            (void);
    const ClutterColor * champlain_marker_get_selection_text_color
                                                            (void);
    void                champlain_marker_set_selection_color
                                                            (ClutterColor *color);
    void                champlain_marker_set_selection_text_color
                                                            (ClutterColor *color);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----ChamplainMarker
                         +----ChamplainCustomMarker
                         +----ChamplainLabel
                         +----ChamplainPoint

## Implemented Interfaces

ChamplainMarker implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainLocation.

## Properties

      "draggable"                gboolean              : Read / Write
      "selectable"               gboolean              : Read / Write
      "selected"                 gboolean              : Read / Write

## Signals

      "button-press"                                   : Run Last
      "button-release"                                 : Run Last
      "drag-finish"                                    : Run Last
      "drag-motion"                                    : Run Last

## Description

Markers represent 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.

This is a base abstract class of all markers. libchamplain has a more evoluted type of markers with text and image support. See ChamplainLabel for more details.

## Details

### struct ChamplainMarker

    struct ChamplainMarker;

The ChamplainMarker structure contains only private data and should be accessed using the provided API

Since 0.10

### champlain_marker_set_selectable ()

    void                champlain_marker_set_selectable     (ChamplainMarker *marker,
                                                             gboolean value);

Sets the marker as selectable or not.

`marker` : | a ChamplainMarker
`value` : | the selectable state

Since 0.10

### champlain_marker_get_selectable ()

    gboolean            champlain_marker_get_selectable     (ChamplainMarker *marker);

Checks whether the marker is selectable.

`marker` : | a ChamplainMarker
Returns : | the selectable or not state of the marker.

Since 0.10

### champlain_marker_set_draggable ()

    void                champlain_marker_set_draggable      (ChamplainMarker *marker,
                                                             gboolean value);

Sets the marker as draggable or not.

`marker` : | a ChamplainMarker
`value` : | the draggable state

Since 0.10

### champlain_marker_get_draggable ()

    gboolean            champlain_marker_get_draggable      (ChamplainMarker *marker);

Checks whether the marker is draggable.

`marker` : | a ChamplainMarker
Returns : | the draggable or not state of the marker.

Since 0.10

### champlain_marker_set_selected ()

    void                champlain_marker_set_selected       (ChamplainMarker *marker,
                                                             gboolean value);

Sets the marker as selected or not. This will affect the "Selected" look of the marker.

`marker` : | a ChamplainMarker
`value` : | the selected state

Since 0.10

### champlain_marker_get_selected ()

    gboolean            champlain_marker_get_selected       (ChamplainMarker *marker);

Checks whether the marker is selected.

`marker` : | a ChamplainMarker
Returns : | the selected or not state of the marker.

Since 0.10

### champlain_marker_animate_in ()

    void                champlain_marker_animate_in         (ChamplainMarker *marker);

Animates the marker as if it were falling from the sky onto the map.

`marker` : | a ChamplainMarker

Since 0.10

### champlain_marker_animate_in_with_delay ()

    void                champlain_marker_animate_in_with_delay
                                                            (ChamplainMarker *marker,
                                                             guint delay);

Animates the marker as if it were falling from the sky onto the map after delay.

`marker` : | a ChamplainMarker
`delay` : | The delay in milliseconds

Since 0.10

### champlain_marker_animate_out ()

    void                champlain_marker_animate_out        (ChamplainMarker *marker);

Animates the marker as if it were drawn through the sky.

`marker` : | a ChamplainMarker

Since 0.10

### champlain_marker_animate_out_with_delay ()

    void                champlain_marker_animate_out_with_delay
                                                            (ChamplainMarker *marker,
                                                             guint delay);

Animates the marker as if it were drawn through the sky after delay.

`marker` : | a ChamplainMarker
`delay` : | The delay in milliseconds

Since 0.10

### champlain_marker_get_selection_color ()

    const ClutterColor * champlain_marker_get_selection_color
                                                            (void);

Gets the selection color.

Returns : | the selection color. Should not be freed.

Since 0.10

### champlain_marker_get_selection_text_color ()

    const ClutterColor * champlain_marker_get_selection_text_color
                                                            (void);

Gets the selection text color.

Returns : | the selection text color. Should not be freed.

Since 0.10

### champlain_marker_set_selection_color ()

    void                champlain_marker_set_selection_color
                                                            (ClutterColor *color);

Changes the selection color, this is to ensure a better integration with the desktop, this is automatically done by GtkChamplainEmbed.

`color` : | a ClutterColor

Since 0.10

### champlain_marker_set_selection_text_color ()

    void                champlain_marker_set_selection_text_color
                                                            (ClutterColor *color);

Changes the selection text color, this is to ensure a better integration with the desktop, this is automatically done by GtkChamplainEmbed.

`color` : | a ClutterColor

Since 0.10

## Property Details

### The `"draggable"` property

      "draggable"                gboolean              : Read / Write

The draggable state of the marker

Default value: FALSE

Since 0.10

### The `"selectable"` property

      "selectable"               gboolean              : Read / Write

The selectable state of the marker

Default value: FALSE

Since 0.10

### The `"selected"` property

      "selected"                 gboolean              : Read / Write

The selected state of the marker

Default value: FALSE

Since 0.10

## Signal Details

### The `"button-press"` signal

    void                user_function                      (ChamplainMarker *event,
                                                            ClutterEvent    *arg1,
                                                            gpointer         user_data)      : Run Last

Emitted when button is pressed.

`event` : | the underlying ClutterEvent
`user_data` : | user data set when the signal handler was connected.

Since 0.10

### The `"button-release"` signal

    void                user_function                      (ChamplainMarker *event,
                                                            ClutterEvent    *arg1,
                                                            gpointer         user_data)      : Run Last

Emitted when button is released. This signal is not emmitted at the end of dragging.

`event` : | the underlying ClutterEvent
`user_data` : | user data set when the signal handler was connected.

Since 0.10

### The `"drag-finish"` signal

    void                user_function                      (ChamplainMarker *event,
                                                            ClutterEvent    *arg1,
                                                            gpointer         user_data)      : Run Last

Emitted when marker dragging ends (i.e. the button is released at the end of dragging).

`event` : | the underlying ClutterEvent
`user_data` : | user data set when the signal handler was connected.

Since 0.10

### The `"drag-motion"` signal

    void                user_function                      (ChamplainMarker *dx,
                                                            gdouble          dy,
                                                            gdouble          event,
                                                            ClutterEvent    *arg3,
                                                            gpointer         user_data)      : Run Last

Emmitted when the marker is dragged by mouse. dx and dy specify by how much the marker has been dragged since last time.

`dx` : | by how much the marker has been moved in the x direction
`dy` : | by how much the marker has been moved in the y direction
`event` : | the underlying ClutterEvent
`user_data` : | user data set when the signal handler was connected.

Since 0.10