|  |  |  | libchamplain Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
struct ChamplainScale; enum ChamplainUnit; ClutterActor * champlain_scale_new (void); void champlain_scale_set_max_width (ChamplainScale *scale,guint value); void champlain_scale_set_unit (ChamplainScale *scale,ChamplainUnit unit); guint champlain_scale_get_max_width (ChamplainScale *scale); ChamplainUnit champlain_scale_get_unit (ChamplainScale *scale); void champlain_scale_connect_view (ChamplainScale *scale,ChamplainView *view); void champlain_scale_disconnect_view (ChamplainScale *scale);
ChamplainScale implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.
struct ChamplainScale;
The ChamplainScale structure contains only private data and should be accessed using the provided API
Since 0.10
typedef enum {
  CHAMPLAIN_UNIT_KM,
  CHAMPLAIN_UNIT_MILES,
} ChamplainUnit;
Units used by the scale.
ClutterActor *      champlain_scale_new                 (void);
Creates an instance of ChamplainScale.
| Returns : | a new ChamplainScale. | 
Since 0.10
void champlain_scale_set_max_width (ChamplainScale *scale,guint value);
Sets the maximum width of the scale on the screen in pixels
| 
 | a ChamplainScale | 
| 
 | the number of pixels | 
Since 0.10
void champlain_scale_set_unit (ChamplainScale *scale,ChamplainUnit unit);
Sets the scale unit.
| 
 | a ChamplainScale | 
| 
 | a ChamplainUnit | 
Since 0.10
guint               champlain_scale_get_max_width       (ChamplainScale *scale);
Gets the maximum scale width.
| 
 | a ChamplainScale | 
| Returns : | The maximum scale width in pixels. | 
Since 0.10
ChamplainUnit       champlain_scale_get_unit            (ChamplainScale *scale);
Gets the unit used by the scale.
| 
 | a ChamplainScale | 
| Returns : | The unit used by the scale | 
Since 0.10
void champlain_scale_connect_view (ChamplainScale *scale,ChamplainView *view);
This method connects to the necessary signals of ChamplainView to make the scale adapt to the current latitude and longitude.
| 
 | a ChamplainScale | 
| 
 | a ChamplainView | 
Since 0.10
void                champlain_scale_disconnect_view     (ChamplainScale *scale);
This method disconnects from the signals previously connected by champlain_scale_connect_view().
| 
 | a ChamplainScale | 
Since 0.10
"max-width" property  "max-width"                guint                 : Read / Write
The size of the map scale on screen in pixels.
Allowed values: [1,2000]
Default value: 100
Since 0.10
"unit" property"unit" ChamplainUnit : Read / Write
The scale's units.
Default value: CHAMPLAIN_UNIT_KM
Since 0.10