RULER
This widget displays the scale of an axis (formatted text values) for a graph or parameter corresponding to the associated parameter information.
Attributes brief detailed show all inherited
Name | Description | Default | |||
---|---|---|---|---|---|
color | Color of the displayed text | current... | |||
orientation | Orientation of the ruler | vertical | |||
text_h_align | Horizontal alignment of the text | center | |||
text_v_align | Vertical alignment of the text | center | |||
Common with PARAM_TEXT | |||||
content | Content to display | '{value... | |||
value_format | Format of the 'value' field | ' .1' | |||
value_suffix | If the value is too small or too big, the system will use a suffix for the value, such as 'k' for kilo, 'M' for Mega, or 'm' for 'milli' | 'false' | |||
significant_digits | Number of significant digits to display, forcing the system to perform rounding | 0 | |||
Inherited from param_info_viewers | |||||
param_info_id | Identifier of the parameter information to display | empty | |||
reverse | Parameter information widgets display the parameter values the other way round | false | |||
positions_count | Number of states of the param information widget | Depends... | |||
response_curve | The response curve of the widget: this is the function used to transform the position of the viewer to the parameter value | 'linear' | |||
scale | Parameter pre-scaling | 'linear' | |||
zoom | Zoom on the parameter range | 1 | |||
offset | offset on the parameter range | 0 | |||
max_zoom | Maximum value allowed for the exposed zoom parameter | 1 | |||
Inherited from widgets | |||||
opacity | Opacity of the widget | 100% | |||
visible | Show/hide the widget, does not impact the layout, as opposed to the cell's display attribute | true | |||
enabled | Enable/disable the widget. When disabled, the widget does not react to mouse or keyboard events. it is displayed but inactive. | true | |||
cursor | Cursor to display when the mouse is over the active part of the widget | System... | |||
mouse_sensitive | Enables or disables mouse control on widgets | Dependi... | |||
auto_focus | Enables or disables auto focus | Dependi... | |||
handled_keys | List of keys handled by the widget, which will trigger key_pressed and key_released events | empty | |||
default_keys_enabled | Enable or disable the default keys handled natively by the widget. | true | |||
buffered | Enable or disable buffering of the widget. | false | |||
transparent | Enable or disable transparency for the widget. | false | |||
Drag and Drop Attributes | |||||
drag_source_ids | List of objects to use as drag sources for drag and drop operations (each one may have a different applicative type) | empty | |||
drag_applicative_types | List of applicative types to use for each drag source defined by the drag_source_ids list | empty | |||
drag_operations | List of drag operations allowed. 'copy' or 'move' operations are currently supported | empty | |||
drag_context | Optional string to define the serialization context used for the drag operation | empty | |||
drag_enabled | Enable drag operations on the widget | true | |||
drop_target_ids | List of objects to use as drop targets for drag and drop operations (each one may have a different applicative type) | empty | |||
drop_applicative_types | List of applicative types to use for each drop target defined by the drop_target_ids list. | empty | |||
drop_file_types | List of supported file types to use for each drop target defined by the drop_target_ids list. Each wild card may contain several extensions, separated by ','. For example, with "*.*;*.doc,*.txt", the first drop target will accept all files, and the second one will accept only .doc and .txt files | empty | |||
dropped_file_path_string_ids | List of string objects than can receive the path of a file that was dropped, for each drop target defined by the drop_target_ids list | empty | |||
drop_context | Optional string to define the deserialization context used for the drop operation | empty | |||
drop_enabled | Enable drop operations on the widget | true | |||
Exposed Attributes And Events (read-only) | |||||
mouse_over | Set to true when the mouse is over the active area of the widget | false | |||
mouse_down | Bit field containing the state of mouse buttons: first bit is left button, second is right and third is mid button. When no button is pushed, the value of mouse_down is zero | 0 | |||
mouse_position.x | Horizontal position of the mouse in the widget (relative to the upper left corner of the widget) | ||||
mouse_position.y | Vertical position of the mouse in the widget (relative to the upper left corner of the widget) | ||||
mouse_screen_position.x | Absolute horizontal position of the mouse on the screen | ||||
mouse_screen_position.y | Absolute vertical position of the mouse on the screen | ||||
mouse_wheel_up | Event fired when a mouse wheel is turned up | ||||
mouse_wheel_down | Event fired when a mouse wheel is turned up | ||||
focus | Set to true when the widget has keyboard focus and receives keyboard events | false | |||
key_pressed | Event fired when a key (filtered by the handled_key list) is pressed | ||||
key_pressed.key | last virtual key that was pressed | ||||
key_pressed.characters | Character(s) corresponding to the last pressed key, if it was a character key (key_pressed.key=0) | ||||
key_released | Event fired when a key (filtered by the handled_key list) is released | ||||
key_released.key | last virtual key that was released | ||||
key_released.characters | Character(s) corresponding to the last released key, if it was a character key (key_released.key=0) | ||||
dragging | Set to true when a dragging operation is in progress for this widget | false | |||
drag_operation | type of the current drag operation (None, Copy, Move) | enumera... | |||
dropping | Set to true when a dropping operation is in progress for this widget | false | |||
drop_operation | type of the current drop operation (None, Copy, Move) | enumera... | |||
Inherited from cell | |||||
Properties Relative to Parent Cell | |||||
v_align | Vertical alignment of the cell in its parent cell | center | |||
h_align | Horizontal alignment of the cell in its parent cell | center | |||
h_position | Horizontal position of the cell in its parent cell | ||||
v_position | Vertical position of the cell in its parent cell | ||||
h_offset | horizontal offset of the cell from the position computed by the layout engine | 0 | |||
v_offset | vertical offset of the cell from the position computed by the layout engine | 0 | |||
flex | flexibility of the cell | 0 | |||
display | include/exclude the cell from the layout | true | |||
Cell Properties | |||||
layout_type | Selects a layout type: row, column or layer_stack | column | |||
width | Forced width of the cell | ||||
min_width | minimum width allowed for the cell | ||||
max_width | maximum width allowed for the cell | ||||
height | Forced height of the cell | ||||
min_height | minimum height allowed for the cell | ||||
max_height | maximum height allowed for the cell | ||||
margin | margin of the cell | 0 | |||
h_margin | Horizontal margin of the cell | 0 | |||
v_margin | Vertical margin of the cell | 0 | |||
spacing | Space between children cells | 0 | |||
spacing_flex | Flex value to allocate extra space between children cells | 0 | |||
internal_v_align | Vertical alignment of children cells group inside the cell | center | |||
internal_h_align | Horizontal alignment of children cells group inside the cell | center | |||
reflow | when set to true, the layout engine will treat chidren cell as reflowable elements. For a fixed height column, the width is computed accordingly, and for a fixed width row, the height is computed accordingly | false | |||
flip | display children cells in reverse order (right to left or bottom to top) | false | |||
Inheritable properties: these text properties are inherited by children cells (and can be overridden) | |||||
font_face | Name of the font for text contained in the cell and sub cells | empty | |||
font_size | Size of the font for any text contained in the cell | System... | |||
font_size_mode | Defines how font size is computed to select the right font. | cell | |||
font_weight | Weight of the font for any text contained in the cell | System... | |||
font_style | Style of the font for any text contained in the cell | System... | |||
font_quality | Quality of the font | System... | |||
font_escapement | Escapement (angle in degrees) of the font | 0 | |||
text_decoration | Decoration of the text for any text contained in the cell | System... | |||
text_color | Color of any text contained in the cell | System... | |||
Common attributes | |||||
id | Identifier of the element | empty |
Examples
- <ROW width="500" height="250" spacing="10">
- <!-- Y-Ruler -->
- <RULER id="ruler_y" orientation="vertical" width="35" height="200" param_info_id="formula_curve_1.y_info" color="#AAAAAA" value_format=".1" content="{value}" positions_count="5" v_offset="-20" h_offset="0" />
- <COLUMN width="450" height="200" spacing="10">
- <LAYER_STACK width="100%" height="100%">
- <!-- Create a formula curve -->
- <FORMULA_CURVE id="formula_curve_1" x_default="0" x_max="7" x_min="-7" y_default="0" y_max="1" y_min="-1" formula="sin(x)" />
- <!-- Grid -->
- <GRID id="grid_1" width="100%" height="100%" x_positions_count="15" y_positions_count="3" x_subdiv_count="0" y_subdiv_count="1" y_origin_color="#BBBBBB" subdiv_color="#BBBBBB" x_param_info_id="formula_curve_1.x_info" y_param_info_id="formula_curve_1.y_info" x_offset="0.5" line_width="1" />
- <!-- Curve graph -->
- <CURVE_GRAPH id="curve_graph_1" curve_id="formula_curve_1" width="100%" height="100%" anti_alias="true" color="#009900" line_width="3" sample_rate="5" x_offset="0.5" />
- </LAYER_STACK>
- <!-- X-Ruler -->
- <RULER id="ruler_x" orientation="horizontal" width="100%" value_suffix="false" param_info_id="formula_curve_1.x_info" color="#AAAAAA" value_format=".0" content="{value}" positions_count="15" font_escapement="90" text_h_align="right" v_offset="0" h_offset="-9" v_align="center" offset="0.5" />
- </COLUMN>
- </ROW>