:right-sidebar: True Marker =================================================================== .. currentmodule:: gi.repository.Shumate .. class:: Marker(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Subclasses: :class:`~gi.repository.Shumate.Point` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Shumate.Location` Markers represent points of interest on a map. Markers need to be placed on a layer (a :obj:`~gi.repository.Shumate.MarkerLayer`\). Layers have to be added to a :obj:`~gi.repository.Shumate.Map` for the markers to show on the map. A marker is nothing more than a regular :obj:`~gi.repository.Gtk.Widget`\. You can draw on it what ever you want. Set the marker's position on the map using :obj:`~gi.repository.Location.set_location`\. This is a base class of all markers. A typical usage of a marker is for instance to add a :obj:`~gi.repository.Gtk.Image` with a pin image and add the :obj:`~gi.repository.Gtk.GestureClick` controller to listen to click events and show a :obj:`~gi.repository.Gtk.Popover` with the description of the marker. Constructors ------------ .. rst-class:: interim-class .. class:: Marker :no-index: .. classmethod:: new() -> ~gi.repository.Shumate.Marker Creates an instance of :obj:`~gi.repository.Shumate.Marker`\. Methods ------- .. rst-class:: interim-class .. class:: Marker :no-index: .. method:: animate_in() -> None .. method:: animate_in_with_delay(delay: int) -> None :param delay: .. method:: animate_out() -> None .. method:: animate_out_with_delay(delay: int) -> None :param delay: .. method:: get_child() -> ~gi.repository.Gtk.Widget | None Retrieves the current child of ``marker``\. .. method:: get_draggable() -> bool .. method:: get_selectable() -> bool Checks whether the marker is selectable. .. method:: is_selected() -> bool Checks whether the marker is selected. .. method:: set_child(child: ~gi.repository.Gtk.Widget | None = None) -> None Sets the child widget of ``marker``\. :param child: a :obj:`~gi.repository.Gtk.Widget` .. method:: set_draggable(value: bool) -> None :param value: .. method:: set_selectable(value: bool) -> None Sets the marker as selectable or not. :param value: the selectable state Properties ---------- .. rst-class:: interim-class .. class:: Marker :no-index: .. attribute:: props.child :type: ~gi.repository.Gtk.Widget The type of the None singleton. .. attribute:: props.selectable :type: bool The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: Marker :no-index: .. attribute:: parent_instance