Shumate.Marker

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Shumate.Location Shumate.Location GObject.GInterface->Shumate.Location GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Shumate.Marker Shumate.Marker Gtk.Widget->Shumate.Marker Shumate.Location->Shumate.Marker

Subclasses:

Shumate.Point

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Shumate.Location (4)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

animate_in ()

animate_in_with_delay (delay)

animate_out ()

animate_out_with_delay (delay)

get_child ()

get_draggable ()

get_selectable ()

is_selected ()

set_child (child)

set_draggable (value)

set_selectable (value)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Shumate.Location (3)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1), Shumate.Location (2)

Name

Type

Flags

Short Description

child

Gtk.Widget

r/w

The child widget of the marker

selectable

bool

r/w

The draggable state of the marker

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class Shumate.Marker(**kwargs)
Bases:

Gtk.Widget, Shumate.Location

Abstract:

No

Structure:

Shumate.MarkerClass

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.

classmethod new()
Returns:

a new Shumate.Marker.

Return type:

Shumate.Marker

Creates an instance of Shumate.Marker.

animate_in()
animate_in_with_delay(delay)
Parameters:

delay (int) –

animate_out()
animate_out_with_delay(delay)
Parameters:

delay (int) –

get_child()
Returns:

a Gtk.Widget.

Return type:

Gtk.Widget or None

Retrieves the current child of self.

get_draggable()
Return type:

bool

get_selectable()
Returns:

the selectable or not state of the marker.

Return type:

bool

Checks whether the marker is selectable.

is_selected()
Returns:

True if the marker is selected, otherwise False

Return type:

bool

Checks whether the marker is selected.

set_child(child)
Parameters:

child (Gtk.Widget or None) – a Gtk.Widget

Sets the child widget of self.

set_draggable(value)
Parameters:

value (bool) –

set_selectable(value)
Parameters:

value (bool) – the selectable state

Sets the marker as selectable or not.

Property Details

Shumate.Marker.props.child
Name:

child

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE

The child widget of the marker

Shumate.Marker.props.selectable
Name:

selectable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

The selectable state of the marker