![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
ChamplainSelectionLayerChamplainSelectionLayer — A container for ChamplainMarker supporting selection |
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);
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.
typedef enum { CHAMPLAIN_SELECTION_NONE, CHAMPLAIN_SELECTION_SINGLE, CHAMPLAIN_SELECTION_MULTIPLE } ChamplainSelectionMode;
Selection mode
typedef struct { ChamplainLayer parent; ChamplainSelectionLayerPrivate *priv; } ChamplainSelectionLayer;
ChamplainLayer * champlain_selection_layer_new (void);
Returns : |
a new ChamplainSelectionLayer ready to be used as a ClutterContainer for the markers. |
Since 0.4
ChamplainBaseMarker * champlain_selection_layer_get_selected (ChamplainSelectionLayer *layer);
|
|
Returns : |
const GList * champlain_selection_layer_get_selected_markers (ChamplainSelectionLayer *layer);
|
|
Returns : |
guint champlain_selection_layer_count_selected_markers (ChamplainSelectionLayer *layer);
|
|
Returns : |
the number of selected ChamplainBaseMarker |
Since 0.4
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);
|
|
|
|
Returns : |
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.
|
Since 0.4
void champlain_selection_layer_unselect_all (ChamplainSelectionLayer *layer);
|