MarkerLayer#
Superclasses: Layer, Widget, InitiallyUnowned, Object
Implemented Interfaces: Accessible, Buildable, ConstraintTarget
Displays markers on the map. It is responsible for positioning markers correctly, marker selections and group marker operations.
Constructors#
- class MarkerLayer
- classmethod new(viewport: Viewport) MarkerLayer#
Creates a new instance of
MarkerLayer.- Parameters:
viewport – the
ShumateViewport
- classmethod new_full(viewport: Viewport, mode: SelectionMode) MarkerLayer#
Creates a new instance of
MarkerLayerwith the specified selection mode.- Parameters:
viewport – the
ShumateViewportmode – Selection mode
Methods#
- class MarkerLayer
-
- get_markers() list[Marker]#
Gets a copy of the list of all markers inserted into the layer. You should free the list but not its contents.
- get_selection_mode() SelectionMode#
Gets the selection mode of the layer.
- remove_marker(marker: Marker) None#
Removes the marker from the layer.
- Parameters:
marker – a
Marker
- select_marker(marker: Marker) bool#
Selects a marker in this layer.
If
MarkerLayer:selection-mode is %GTK_SELECTION_SINGLE or %GTK_SELECTION_BROWSE, all other markers will be unselected. If the mode is %GTK_SELECTION_NONE ormarkeris not selectable, nothing will happen.- Parameters:
marker – a
Markerthat is a child ofself
- set_selection_mode(mode: SelectionMode) None#
Sets the selection mode of the layer.
NOTE: changing selection mode to %GTK_SELECTION_NONE, %GTK_SELECTION_SINGLE or %GTK_SELECTION_BROWSE will clear all previously selected markers.
- Parameters:
mode – a
SelectionModevalue
- unselect_marker(marker: Marker) None#
Unselects a marker in this layer.
This works even if
MarkerLayer:selection-mode is %GTK_SELECTION_BROWSE. Browse mode only prevents user interaction, not the program, from unselecting a marker.- Parameters:
marker – a
Markerthat is a child ofself
Properties#
- class MarkerLayer
- props.selection_mode: SelectionMode#
The type of the None singleton.