Compass

class Compass(**properties: Any)

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Buildable, ConstraintTarget

A widget displaying a compass.

CSS nodes

map-compass
├── revealer
├──── image

ShumateCompass uses a single CSS node with name map-compass. It also uses an image named “map-compass”.

Constructors

class Compass
classmethod new(viewport: Viewport | None = None) Compass

Creates an instance of Compass.

Parameters:

viewport – a Viewport

Methods

class Compass
get_viewport() Viewport | None

Gets the viewport used by the compass.

set_viewport(viewport: Viewport | None = None) None

Sets the compass viewport.

Parameters:

viewport – a Viewport

Properties

class Compass
props.viewport: Viewport

The viewport to use.