Class LengthHotSpot
- Namespace
- CADability.UserInterface
- Assembly
- CADability.dll
Implements a hotspot IHotSpot to manipulate a length via a length property
public class LengthHotSpot : IHotSpot, ICommandHandler
- Inheritance
-
LengthHotSpot
- Implements
- Inherited Members
Constructors
LengthHotSpot(LengthProperty)
Constructs a hotspot to manipulate a length property
public LengthHotSpot(LengthProperty lengthProperty)
Parameters
lengthPropertyLengthPropertythe property to be manipulated
Fields
Position
The position of the hotspot in world coordinates, returned by GetHotspotPosition(). The owner of the hotspot keeps it up to date, typically a point at the distance of the length from a reference point, e.g. a point on a circle for its radius.
public GeoPoint Position
Field Value
Properties
Hidden
True when the associated property is read-only; the hotspot is then not displayed.
public bool Hidden { get; }
Property Value
IsSelected
The selection state of the hotspot, which is the selection state of the associated LengthProperty on its property page: selecting the hotspot selects the property entry in the control center and vice versa.
public bool IsSelected { get; set; }
Property Value
ResourceId
The resource id of the associated LengthProperty, which identifies its label text.
public string ResourceId { get; }
Property Value
Methods
GetHotspotPosition()
Gets the position of the HotSpot
public GeoPoint GetHotspotPosition()
Returns
- GeoPoint
The position in the world coordinate system
GetInfoText(InfoLevelMode)
Returns the tooltip text of the hotspot, which is the label of the associated LengthProperty.
public string GetInfoText(InfoLevelMode Level)
Parameters
LevelInfoLevelModeRequested info level; ignored, the label is returned for every level
Returns
- string
The label text of the associated property
OnCommand(string)
Forwards the menu command to the associated LengthProperty, which processes the commands of its context menu (modify with mouse, measure a distance, double or halve the value, format settings).
public virtual bool OnCommand(string MenuId)
Parameters
MenuIdstringId of the menu command
Returns
- bool
true if the property handled the command, false otherwise
OnUpdateCommand(string, CommandState)
Forwards the request for the state of a menu item to the associated LengthProperty.
public virtual bool OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
MenuIdstringId of the menu command
CommandStateCommandStateState object to modify (enabled, checked)
Returns
- bool
true if the property handled the request, false otherwise
StartDrag(IFrame)
Called when the user starts dragging a hotspot, i.e. the left mouse button is pushed while the mouse position leaves the hotspot square.
public void StartDrag(IFrame frame)
Parameters
frameIFrame