Shumate.Scale¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The max width of the scale on screen |
||
r/w |
The map scale’s unit |
||
r/w |
The viewport |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Shumate.Scale(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A widget displaying a scale.
- CSS nodes
`` map-scale ├── label[.metric][.imperial] ``
ShumateScale
uses a single CSS node with name map-scale, it has up to two childs different labels.- classmethod new(viewport)¶
- Parameters:
viewport (
Shumate.Viewport
orNone
) – aShumate.Viewport
- Returns:
a new
Shumate.Scale
.- Return type:
Creates an instance of
Shumate.Scale
.
- get_max_width()¶
- Returns:
The maximum scale width in pixels.
- Return type:
Gets the maximum scale width.
- get_unit()¶
- Returns:
The unit used by the scale
- Return type:
Gets the unit used by the scale.
- get_viewport()¶
- Returns:
The
Shumate.Viewport
used by the scale- Return type:
Gets the viewport used by the scale.
- set_max_width(value)¶
- Parameters:
value (
int
) – the number of pixels
Sets the maximum width of the scale on the screen in pixels
- set_unit(unit)¶
- Parameters:
unit (
Shumate.Unit
) – aShumate.Unit
Sets the scale unit.
- set_viewport(viewport)¶
- Parameters:
viewport (
Shumate.Viewport
orNone
) – aShumate.Viewport
Sets the scale viewport.
Property Details¶
- Shumate.Scale.props.max_width¶
-
The size of the map scale on screen in pixels.
- Shumate.Scale.props.unit¶
- Name:
unit
- Type:
- Default Value:
- Flags:
The scale’s units.
- Shumate.Scale.props.viewport¶
- Name:
viewport
- Type:
- Default Value:
- Flags:
The viewport to use.