![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
ChamplainSelectionLayerChamplainSelectionLayer — A container for ChamplainMarker supporting selection |
enum ChamplainSelectionMode; ChamplainSelectionLayer; ChamplainLayer * champlain_selection_layer_new (void); void champlain_selection_layer_set_selection_mode (ChamplainSelectionLayer *layer, ChamplainSelectionMode mode); ChamplainSelectionMode champlain_selection_layer_get_selection_mode (ChamplainSelectionLayer *layer); void champlain_selection_layer_select (ChamplainSelectionLayer *layer, ChamplainBaseMarker *marker); void champlain_selection_layer_unselect (ChamplainSelectionLayer *layer, ChamplainBaseMarker *marker); void champlain_selection_layer_select_all (ChamplainSelectionLayer *layer); void champlain_selection_layer_unselect_all (ChamplainSelectionLayer *layer); gboolean champlain_selection_layer_marker_is_selected (ChamplainSelectionLayer *layer, ChamplainBaseMarker *marker); 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);
GObject +----GInitiallyUnowned +----ClutterActor +----ClutterGroup +----ChamplainLayer +----ChamplainSelectionLayer
A ChamplainSelectionLayer is little more than a ChamplainLayer. The markers can be selected.
typedef enum { CHAMPLAIN_SELECTION_NONE, CHAMPLAIN_SELECTION_SINGLE, CHAMPLAIN_SELECTION_MULTIPLE } ChamplainSelectionMode;
Selection mode
ChamplainLayer * champlain_selection_layer_new (void);
Returns : |
a new ChamplainSelectionLayer ready to be used as a ClutterContainer for the markers. |
Since 0.4
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_NONE or CHAMPLAIN_SELECTION_SINGLE will clear all previously selected markers.
|
a ChamplainSelectionLayer |
|
a ChamplainSelectionMode value |
Since 0.4
ChamplainSelectionMode champlain_selection_layer_get_selection_mode (ChamplainSelectionLayer *layer);
|
a ChamplainSelectionLayer |
Returns : |
the selection mode of the layer. |
Since 0.4
void champlain_selection_layer_select (ChamplainSelectionLayer *layer, ChamplainBaseMarker *marker);
Selects the marker.
|
a ChamplainSelectionLayer |
|
a ChamplainBaseMarker |
Since 0.4
void champlain_selection_layer_unselect (ChamplainSelectionLayer *layer, ChamplainBaseMarker *marker);
Unselect the marker.
|
a ChamplainSelectionLayer |
|
a ChamplainBaseMarker |
Since 0.4
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.
|
a ChamplainSelectionLayer |
Since 0.4
void champlain_selection_layer_unselect_all (ChamplainSelectionLayer *layer);
Unselects all markers.
|
a ChamplainSelectionLayer |
Since 0.4
gboolean champlain_selection_layer_marker_is_selected (ChamplainSelectionLayer *layer, ChamplainBaseMarker *marker);
|
a ChamplainSelectionLayer |
|
a ChamplainBaseMarker |
Returns : |
whether the marker is selected or not. |
Since 0.4
ChamplainBaseMarker * champlain_selection_layer_get_selected (ChamplainSelectionLayer *layer);
This function will return NULL if in CHAMPLAIN_SELETION_MULTIPLE.
|
a ChamplainSelectionLayer |
Returns : |
the selected ChamplainBaseMarker or NULL if none is selected. |
Since 0.4
const GList * champlain_selection_layer_get_selected_markers (ChamplainSelectionLayer *layer);
|
a ChamplainSelectionLayer |
Returns : |
the list of selected ChamplainBaseMarker or NULL if none is selected. You shouldn't free that list. |
Since 0.4
guint champlain_selection_layer_count_selected_markers (ChamplainSelectionLayer *layer);
|
a ChamplainSelectionLayer |
Returns : |
the number of selected ChamplainBaseMarker |
Since 0.4
"selection-mode"
property"selection-mode" ChamplainSelectionMode : Read / Write
Determines the type of selection that will be performed.
Default value: CHAMPLAIN_SELECTION_SINGLE
"changed"
signalvoid user_function (ChamplainSelectionLayer *arg0, gpointer user_data) : Run Last
The changed signal is emitted when the selected marker(s) change.
|
user data set when the signal handler was connected. |
Since 0.4.1