Difference between revisions of "Component: Component Labels (Simulation)"
(XML import) |
(XML import BR) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | |||
{| width="50%" | {| width="50%" | ||
|- | |- | ||
Line 5: | Line 7: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1. | + | | 1.2 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 14: | Line 16: | ||
==[[File:Component Icon 446d753f_a6dc_489d_b624_f4f191783aa0.png|Image]] Component Labels component== | ==[[File:Component Icon 446d753f_a6dc_489d_b624_f4f191783aa0.png|Image]] Component Labels component== | ||
− | Automatically generates labels for all panel objects and components. | + | Automatically generates labels for all panel objects and components in a given context. |
− | + | Labels will always face the camera, and can show the name of each object, or any chosen | |
− | + | property. Nesting can be used so that components within components are labelled, and so on. | |
==Examples== | ==Examples== | ||
− | + | Example showing how to use the Auto Labels component to display the connections, channels and any other property value of all components on the panel. | |
+ | |||
+ | auto_labels1 is setup to show any property with the name "channel" this includes ADC and Comms components. | ||
+ | auto_labels2 is setup to show any property with the name "pin" this includes LED and Switch components. | ||
+ | {{Fcfile|ComponentLabels.fcfx|ComponentLabels}} | ||
+ | [[File:Label2.jpg]] | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 69: | Line 76: | ||
===<span style="font-weight: normal;"><u><tt>SetTarget</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>SetTarget</tt></u></span>=== | ||
− | Set the target object. All items within the scope of this object will be given labels | + | Set the target object. All items within the scope of this object will be given labels, not the taget object itself. If the target is set to zero or 'this', all objects in the |
+ | |||
+ | current scope will be labelled. | ||
'''Parameters''' | '''Parameters''' | ||
Line 175: | Line 184: | ||
Attempt to automatically move the label to the side of the object. Choose a positive or negative offset in | Attempt to automatically move the label to the side of the object. Choose a positive or negative offset in | ||
− | any of the three axes. | + | any of the three axes. When 'off' is chosen, you will be able to enter manual offsets along each axis. |
<span style="font-weight: normal;"><u>Nesting</u></span> | <span style="font-weight: normal;"><u>Nesting</u></span> | ||
Line 188: | Line 197: | ||
Show Leaves - does not label groups, but labels all individual items, no matter how far nested. | Show Leaves - does not label groups, but labels all individual items, no matter how far nested. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 15:45, 16 February 2017
Author | Matrix Ltd. |
Version | 1.2 (Release) |
Category | Simulation |
Contents
Component Labels component
Automatically generates labels for all panel objects and components in a given context. Labels will always face the camera, and can show the name of each object, or any chosen property. Nesting can be used so that components within components are labelled, and so on.
Examples
Example showing how to use the Auto Labels component to display the connections, channels and any other property value of all components on the panel.
auto_labels1 is setup to show any property with the name "channel" this includes ADC and Comms components.
auto_labels2 is setup to show any property with the name "pin" this includes LED and Switch components.
ComponentLabels
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
ShowProperty
Sets the labels to show a named property of each object.
Parameters
- STRING Property
- Name of the property to show.
Return value
- This call does not return a value
ShowNames
Sets the labels to show the names of objects.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Hide
Hides all labels.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SetTarget
Set the target object. All items within the scope of this object will be given labels, not the taget object itself. If the target is set to zero or 'this', all objects in the
current scope will be labelled.
Parameters
- HANDLE target
Return value
- This call does not return a value
SetColor
Sets the color of the labels. Note that this affects all nesting levels, so any nesting
level specific colors set in the properties panel will be overridden.
Parameters
- ULONG Color
- Color to set the labels to.
Return value
- This call does not return a value
Update
Refresh the labels after a change.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Property reference
Show
This property is of type Fixed list of ints and can be referenced with the variable name show.
Decide what labels to show...
None - no labels are displayed
Name - shows each component's name
Property - shows a particular property of each component (see 'property' below.
Auto Update
This property is of type True or false and can be referenced with the variable name auto_update.
Automatically update the labels whenever panel items are added, deleted or re-named.
Auto Target
This property is of type True or false and can be referenced with the variable name auto_target.
When auto target is on, the auto labeller will label every item in its own context.
When off, the "SetTarget" macro must be used to set the scope of the labeller.
Color
This property is of type Color picker and can be referenced with the variable name color.
Color of the labels text.
Background
This property is of type Color picker with transparency and can be referenced with the variable name bg_color.
Color for label backgroiunds - may be transparent.
Always On Top
This property is of type True or false and can be referenced with the variable name on_top.
Whether labels should always be draw on top of other objects.
Scale
This property is of type Floating point and can be referenced with the variable name scale.
Sets the basic size (text height) of the labels.
Follow Zoom
This property is of type True or false and can be referenced with the variable name auto_scale.
Whether labels get bigger and smaller when the panel is zoomed in and out.
Auto
This property is of type Fixed list of ints and can be referenced with the variable name auto_offset.
Attempt to automatically move the label to the side of the object. Choose a positive or negative offset in
any of the three axes. When 'off' is chosen, you will be able to enter manual offsets along each axis.
Nesting
This property is of type Fixed list of ints and can be referenced with the variable name nesting.
Whether to label child items of groups, groups within groups etc.
Off - only items at the same level as the labeller get labelled.
Nest levels - how many 'generations' to iterate into groups.
Show Leaves - does not label groups, but labels all individual items, no matter how far nested.