Let’s consider the Instrument class properties, peculiar to all descendants’ elements in details.
The Name property assigns the unique name within the entire instrument.
The Fill property assigns the fill, which will be used for element drawing.
Line tracing style, which will be used for element drawing, is assigned in the Stroke property.
The Style property assigns the style name of the element, used for element drawing. Available styles are assigned in the Styles property of the instrument, the element belongs to. If the element has no Fill and/or Stroke properties assigned, the style with the name assigned in the Style property will be applied.
The Smooth property assigns the quality of output graphic.
The Visible property assigns element’s visibility.
The Active property indicates whether an element will perceive the events from the mouse.
The BreakEventBubbling property indicates whether the events from the mouse will be passed to the parent element for the further processing.
The RecalculateAll property indicates for what elements the expressions will be recalculated, if the element state was changed. If RecalculateAll is set to false, the expressions will be recalculated only for the selected element and all the elements included in it, otherwise the expressions of all instrument elements will be recalculated.
The process of receiving events from a mouse and their handling is produced in the following way:
The visual element receives events from the mouse when its pointer is over the element. The element handles these events and, if the BreakEventBubbling property is set to false, passes the event to the parent for handling. Thus, the events received from the mouse are spread from the visual element up the instrument tree. Non-visual elements can receive the event from the mouse only from the included visual elements.
The Size property is the size of the instrument work area.
The Enabled property indicates whether the instrument will react on the user actions.
The Focused property indicates whether the instrument is in the focus.
During the instrument development these values can be set arbitrarily. When the instrument is displayed in Widget, these properties are set according to Enabled and Focused Widget properties. These properties are intended to implement the instrument appearance and behavior depending on the state of the Widget, in which the instrument is displayed.
The following properties are used only in the instrument design mode and saved with the instrument: SnapToGrid – snap to grid, the ShowGrid property - the grid visibility, the GridStep property – the step of the grid, the MeasureUnit property – the measurement units used.