ChamplainSelectionLayer

ChamplainSelectionLayer — A container for ChamplainMarker supporting selection

Synopsis

enum                ChamplainSelectionMode;
                    ChamplainSelectionLayer;
ChamplainLayer *    champlain_selection_layer_new       (void);
ChamplainBaseMarker * champlain_selection_layer_get_selected
                                                        (ChamplainSelectionLayer *layer);
const GList *       champlain_selection_layer_get_selected_markers
                                                        (ChamplainSelectionLayer *layer);
guint               champlain_selection_layer_count_selected_markers
                                                        (ChamplainSelectionLayer *layer);
void                champlain_selection_layer_select    (ChamplainSelectionLayer *layer,
                                                         ChamplainBaseMarker *marker);
void                champlain_selection_layer_unselect  (ChamplainSelectionLayer *layer,
                                                         ChamplainBaseMarker *marker);
gboolean            champlain_selection_layer_marker_is_selected
                                                        (ChamplainSelectionLayer *layer,
                                                         ChamplainBaseMarker *marker);
void                champlain_selection_layer_select_all
                                                        (ChamplainSelectionLayer *layer);
void                champlain_selection_layer_unselect_all
                                                        (ChamplainSelectionLayer *layer);
ChamplainSelectionMode  champlain_selection_layer_get_selection_mode
                                                        (ChamplainSelectionLayer *layer);
void                champlain_selection_layer_set_selection_mode
                                                        (ChamplainSelectionLayer *layer,
                                                         ChamplainSelectionMode mode);
GType               champlain_selection_mode_get_type   (void);

Description

A ChamplainSelectionLayer is little more than a ChamplainLayer. The markers can be selected.

Use clutter_container_add to add markers to the layer and clutter_container_remove to remove them.

Details

enum ChamplainSelectionMode

typedef enum {
  CHAMPLAIN_SELECTION_NONE,
  CHAMPLAIN_SELECTION_SINGLE,
  CHAMPLAIN_SELECTION_MULTIPLE
} ChamplainSelectionMode;

Selection mode

CHAMPLAIN_SELECTION_NONE

No marker can be selected.

CHAMPLAIN_SELECTION_SINGLE

Only one marker can be selected.

CHAMPLAIN_SELECTION_MULTIPLE

Multiple marker can be selected.

ChamplainSelectionLayer

typedef struct {
  ChamplainLayer parent;

  ChamplainSelectionLayerPrivate *priv;
} ChamplainSelectionLayer;


champlain_selection_layer_new ()

ChamplainLayer *    champlain_selection_layer_new       (void);

Returns :

a new ChamplainSelectionLayer ready to be used as a ClutterContainer for the markers.

Since 0.4


champlain_selection_layer_get_selected ()

ChamplainBaseMarker * champlain_selection_layer_get_selected
                                                        (ChamplainSelectionLayer *layer);

layer :

Returns :


champlain_selection_layer_get_selected_markers ()

const GList *       champlain_selection_layer_get_selected_markers
                                                        (ChamplainSelectionLayer *layer);

layer :

Returns :


champlain_selection_layer_count_selected_markers ()

guint               champlain_selection_layer_count_selected_markers
                                                        (ChamplainSelectionLayer *layer);

layer :

Returns :

the number of selected ChamplainBaseMarker

Since 0.4


champlain_selection_layer_select ()

void                champlain_selection_layer_select    (ChamplainSelectionLayer *layer,
                                                         ChamplainBaseMarker *marker);

layer :

marker :


champlain_selection_layer_unselect ()

void                champlain_selection_layer_unselect  (ChamplainSelectionLayer *layer,
                                                         ChamplainBaseMarker *marker);

layer :

marker :


champlain_selection_layer_marker_is_selected ()

gboolean            champlain_selection_layer_marker_is_selected
                                                        (ChamplainSelectionLayer *layer,
                                                         ChamplainBaseMarker *marker);

layer :

marker :

Returns :


champlain_selection_layer_select_all ()

void                champlain_selection_layer_select_all
                                                        (ChamplainSelectionLayer *layer);

Selects all markers in the layer. This call will only work if the selection mode is set CHAMPLAIN_SELETION_MULTIPLE.

layer :

Since 0.4


champlain_selection_layer_unselect_all ()

void                champlain_selection_layer_unselect_all
                                                        (ChamplainSelectionLayer *layer);

layer :


champlain_selection_layer_get_selection_mode ()

ChamplainSelectionMode  champlain_selection_layer_get_selection_mode
                                                        (ChamplainSelectionLayer *layer);

layer :

a ChamplainSelectionLayer

Returns :

the selection mode of the layer.

Since 0.4


champlain_selection_layer_set_selection_mode ()

void                champlain_selection_layer_set_selection_mode
                                                        (ChamplainSelectionLayer *layer,
                                                         ChamplainSelectionMode mode);

Sets the selection mode of the layer. NOTE: changing selection mode to CHAMPLAIN_SELECTION_SINGLE will clear all previously selected markers.

layer :

a ChamplainSelectionLayer

mode :

a ChamplainSelectionMode value

Since 0.4


champlain_selection_mode_get_type ()

GType               champlain_selection_mode_get_type   (void);

Returns :