Let’s consider the hierarchy of classes, used during the instrument creation.
The base class for all elements in the SharpShooter Gauges is the Element class; it is inherited from the System.Object and implements the PerpetuumSoft.Framework.Model.IElement, PerpetuumSoft.Framework.Model.Runtime.IActiveElement, PerpetuumSoft.Framework.Expressions.IExpressionSite and System.IDisposable interfaces.
The PerpetuumSoft.Framework.Model.IElement interface indicates that the Element object is the element of some document object model.
The PerpetuumSoft.Framework.Model.Runtime.IActiveElement interface indicates that the element can handle the mouse events.
The PerpetuumSoft.Framework.Expressions.IExpressionSite interface indicates that the element is the function and object source for expressions.
The Element class has the Name property, that assigns a name to the element, and properties used for drawing the element, such as Style, Fill and Stroke.
The Element class is the parent for the following classes:
- The Circle class represents the figure in the form of the disk.
- The CircularShape class represents the base class for all the figures containing center and radius.
- The LineElement class is the base class for all the figures that have start and end points.
- The RectangleElement class is the base class for all the figures containing center, width and height.
- The ScaleElement class represents the base class for all objects placed on the scale.
- The Composite class is the base class for all container-elements, i.e. elements capable of involving other elements.
Let’s consider Composite class in details.
The Composite class realizes the ICompositeElement interface, indicating that this class is a container for the other elements and provides the access to these elements. Next classes are inherited from the Composite class:
- The object of the Instrument class represents the root element for all elements hierarchy and realizes the IRootElement interface indicating that it is the root element.
- The object of the Group class is a non-visual element intended for grouping the other elements.
- The object of the Scale class is a non-visual element assigning the scale range.
- The SliderBase class represents the base class for sliders. A slider has the current value that can be changed with the help of a mouse. It is possible to define the point corresponding to the current Slider value located at some distance from the trajectory in which the Slider is included. The Slider class, the which object is a non-visual element representing the current value, is inherited from the SliderBase class.
- The Guide and Joint classes realize the ITrajectory interface indicating that classes represent trajectories. Guide is the trajectory having the form of the line. Joint is the trajectory having the form of the arc.
- The abstract DockableTrajectory class realizes the ITrajectory interface indicating that the class represents Trjectories. Cuide is a linear trajectory. Joint is a circular trajectory.
Let’s consider the ScaleElement class in details.
The descendants of the ScaleElement class are classes intended for scale visualization.
The ScaleMarksBase class represents marks on the scale. It is a base class for the Ticks and ScaleMarks classes. Objects of the Ticks class are the ticks on the scale. Objects of the ScaleMarks class are the marks on the scale.
The abstract ScaleLabelsBase class represents text labels on the scale. It is a base class for the ScaleLabels, CustomLabels, and ScaleTitleclasses. The ScaleLabels class represents numeric labels within the scale range. The CustomLabels class represents a collection of scale text labels. The ScaleTitle represents a scale title.
Descendants of the abstract ValuePresenterScaleElement are intended for displaying sacale values. The Tank class represents linear scale value as tank level. The abstract LevelBase class is a base class for the LinearLevel and RangedLevel classes. LinearLevel visualizes linear scale value as a level. RangedLevel is intended for displaying scale value as level with variable width.
Let’s consider the CircularShape class.
Following classes are inherited from the CircularShape class.
- The object of the CircularNotches class creates the notch effect. It is used for the slider appearance design.
- The Polygon class represents a polyhedron and has the Sides property that indicates the quantity of faces.
- The Star class, which represents a star, is inherited from it.
- The Gear class represents gear.
- The Highlight class is intended for highlight emulation.
Let’s consider the LineElement class.
The LineElement class is the base class for:
- The Line class represents a line.
- The Needle class represents a pointer, the form of which is assigned with the help of the NeedlePoints property. It is used for slider visualization.
- The Spring class represents a spring.
- The object of the LinearNotches class creates the effect of linear notches. It is used for the slider appearance design.
Let’s consider the RectangleElement class.
The following classes are inherited from the RectangleElement class.
- The Ellipse class represents a figure in the form of ellipse.
- The Rectangle class represents a figure in the form of rectangle.
- The RoundedRectangle class represents a figure in the form of rectangle with the rounded angles.
- The Frame class represents a rectangular frame.
- The ArcBase class is the base of the Arc, Pie and RingSector classes that accordingly represent an ellipse arc, an ellipse sector and an elliptical ring sector.
- The objects of the Picture class are intended for displaying the picture, assigned in the Image property.
- The objects of the PictureSet class are intended for displaying one picture from the assigned pictures collection.
- The objects of the Label class are intended for inscription displaying.
- The objects of the Digits class are intended for digital indicator emulation.
- The objects of the Odometer class are intended for mechanical meter emulation.