Shumate.Marker¶
- Subclasses:
Methods¶
- Inherited:
Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1), Shumate.Location (4)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
The child widget of the marker |
||
r/w |
The draggable state of the marker |
||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Shumate.Marker(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Markers represent points of interest on a map. Markers need to be placed on a layer (a [class`MarkerLayer`]). Layers have to be added to a [class`Map`] for the markers to show on the map.
A marker is nothing more than a regular [class`Gtk`.Widget]. You can draw on it what ever you want. Set the marker’s position on the map using [method`Location`.set_location].
This is a base class of all markers. A typical usage of a marker is for instance to add a [class`Gtk`.Image] with a pin image and add the [class`Gtk`.GestureClick] controller to listen to click events and show a [class`Gtk`.Popover] with the description of the marker.
- CSS nodes
ShumateMarkerhas a single CSS node with the name “map-marker”.- classmethod new()¶
- Returns:
a new
Shumate.Marker.- Return type:
Creates an instance of
Shumate.Marker.
- animate_in()¶
- animate_out()¶
- get_child()¶
- Returns:
a
Gtk.Widget.- Return type:
Gtk.WidgetorNone
Retrieves the current child of self.
- get_hotspot()¶
- Returns:
- x_hotspot:
return value for the x hotspot
- y_hotspot:
return value for the y hotspot
- Return type:
Get the hotspot point for the given marker. The value is in pixel relative to the top-left corner. Any negative value means that the hotspot get computed with the [property`Gtk`.Widget:halign] or [property`Gtk`.Widget:valign] properties.
New in version 1.5.
- get_selectable()¶
- Returns:
the selectable or not state of the marker.
- Return type:
Checks whether the marker is selectable.
- is_selected()¶
-
Checks whether the marker is selected.
- set_child(child)¶
- Parameters:
child (
Gtk.WidgetorNone) – aGtk.Widget
Sets the child widget of self.
- set_hotspot(x_hotspot, y_hotspot)¶
-
Set the hotspot point for the given marker. The value is in pixel relative to the top-left corner. Use any negative value to fallback to the [property`Gtk`.Widget:halign] or [property`Gtk`.Widget:valign] properties.
New in version 1.5.
Property Details¶
- Shumate.Marker.props.child¶
- Name:
child- Type:
- Default Value:
- Flags:
The child widget of the marker
- Shumate.Marker.props.selectable¶
-
The selectable state of the marker
- Shumate.Marker.props.x_hotspot¶
- Name:
x-hotspot- Type:
- Default Value:
-1.0- Flags:
The x hotspot of the marker, a negative value means that the actual x hotspot is calculated with the [property`Gtk`.Widget:halign] property. The x hotspot should not be more than the width of the widget.
New in version 1.5.
- Shumate.Marker.props.y_hotspot¶
- Name:
y-hotspot- Type:
- Default Value:
-1.0- Flags:
The y hotspot of the marker, a negative value means that the actual y hotspot is calculated with the [property`Gtk`.Widget:valign] property. The y hotspot should not be more than the height of the widget.
New in version 1.5.