Component: Scale Linear (Controls)

From Flowcode Help
Revision as of 14:20, 9 August 2013 by JonnyW (talk | contribs) (XML import of component documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix Ltd
Version 1.1
Category Controls


Image Scale_Linear component

Create linear scales with marked values. Can be linked to a pointer object to create linear meters or slider controls.

This component can be used as a base to create child components

The following components all inherit the traits of Scale_Linear:

-
Image Dash Scale Vertical A vertical scale that can be used either as a value display or a slider control.

NB) This is simulation only component - no connection to chip pins.

Image Dash Scale Horizontal A Horizontal scale that can be used either as a value display or as a slider for

entering values. Simulation only - does not connect to chip pins!

Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

GetValue

Get the current value from the scale.

Will be either the most recent value set by "SetValue", or, if set to "Control" mode, the latest mouse clicked value.

Parameters

This macro has no parameters


Return value

FLOAT


SetValue

Set the value for the scale. If a pointer object is defined, it will move to point at the new value.

Parameters

FLOAT Value
Value to set - will be constrained to the minumum-maximum range.


Return value

This call does not return a value


SetLabel

Set the text of the component's label.

Parameters

STRING Text
New text to set.


Return value

This call does not return a value


SetRange

Set new maximum and minimum values for the scale.

Parameters

FLOAT Minimum
FLOAT Maximum


Return value

This call does not return a value



Property reference

Pointer

This property is of type Panel object and can be referenced with the variable name target_object.

Sets an object to act as the pointer for the scale.

If in 'Display' mode, the pointer will move to show the incoming "SetValue" numbers.

In "Control" mode, it will act as an object for setting the value using mouse clicks/drags.

Track

This property is of type Panel object and can be referenced with the variable name track_object.

An object to represent a 'track' upon which the moving part travels.

Will be automatically resized and positioned along with the main component.

Orientation

This property is of type Fixed list of ints and can be referenced with the variable name orientation.

Whether the scale and/or motion should be along the X-axis (horizontal) or Y-axis (vertical)

Mouse Function

This property is of type Fixed list of ints and can be referenced with the variable name mouse_mode.

Sets whether the control will react to mouse clicking. Choose from...

None - the scale will be a readout only. Move the pointer using the 'setValue' macro.

Scale - click anywhere on the scale to set a value.

Slider - Move the linked 'Pointer' object to set the value.

Scale + Slider - both elements will react to mouse movements.

Resolution

This property is of type Signed integer and can be referenced with the variable name resolution.

Determines the amount of detail in the scale graphics - larger values will require more memory

and/or loading time etc.

BG Color

This property is of type Color picker with transparency and can be referenced with the variable name bg_color.

Colour of the background object.

Positive Color

This property is of type Color picker and can be referenced with the variable name ink_color.

Markings colour for positive scale values.

Negative Color

This property is of type Color picker and can be referenced with the variable name neg_color.

Markings colour for negative values.

Label Color

This property is of type Color picker and can be referenced with the variable name label_color.

Color for the text label.

Offset %

This property is of type Signed integer and can be referenced with the variable name line_offset.

Distance of the main line from the left or bottom of the component. % of component size.

Start %

This property is of type Signed integer and can be referenced with the variable name line_start.

Start position of the scale from the left/bottom of the component. % of component size.

End %

This property is of type Signed integer and can be referenced with the variable name line_end.

End position of the scale from the left/bottom of the component. % of component size.

Thickness

This property is of type Floating point and can be referenced with the variable name line_thick.

Thickness of the main scale line.

Show

This property is of type True or false and can be referenced with the variable name show_line.

Whether to show or hide the main scale line.

Divisions

This property is of type Signed integer and can be referenced with the variable name marks_count.

Main divisions of the scale - these can be numbered.

Offset %

This property is of type Signed integer and can be referenced with the variable name marks_offset.

Position of the division lines across the scale - % of component size,.

Thickness

This property is of type Floating point and can be referenced with the variable name divs_thick.

Thickness of the division lines.

Subdivisions

This property is of type Signed integer and can be referenced with the variable name marks_subdiv.

Number of smaller divsions between the numbered ones. Set to zero if not required.

Subs Offset

This property is of type Signed integer and can be referenced with the variable name subdiv_offset.

Position of the sub-division line ends. % of width across the component.

Subs Thickness

This property is of type Floating point and can be referenced with the variable name subs_thick.

Thickness of the sub-division lines..

Show

This property is of type True or false and can be referenced with the variable name show_marks.

Whether to show or hide the divisions and sub-divisions.

Maximum

This property is of type Floating point and can be referenced with the variable name val_max.

Maximum number to show on the scale.

Minimum

This property is of type Floating point and can be referenced with the variable name val_min.

Minimum number to show on the scale.

Decimals

This property is of type Signed integer and can be referenced with the variable name dec_places.

Number of decimal places to show on the numbers.

Offset %

This property is of type Signed integer and can be referenced with the variable name num_offset.

Distance acrross the scale width to show the numbers. % of component size.

Text Size %

This property is of type Signed integer and can be referenced with the variable name num_size.

Text height of the scale numbers. % of component size.

Font

This property is of type Font picker and can be referenced with the variable name num_font.

Font for the scale numbers.

Show

This property is of type True or false and can be referenced with the variable name show_numbers.

Whether to show or hide the scale numbers.

Text

This property is of type Line of text and can be referenced with the variable name label_text.

Text label for the component to aid identification.

Offset X %

This property is of type Signed integer and can be referenced with the variable name label_X.

X - position of the label. % of Width.

Offset Y %

This property is of type Signed integer and can be referenced with the variable name label_Y.

Y position of label. % of height.

Text Size %

This property is of type Signed integer and can be referenced with the variable name label_size.

Text size of label. % of component size.

Font

This property is of type Font picker and can be referenced with the variable name label_font.

Font for the component label.

Show

This property is of type True or false and can be referenced with the variable name show_label.

Whether to show or hide the text label.