Base class for all Visual Tool Objects.
Inheritance Hierarchy
Stemmer.Cvb.Forms.OverlaysOverlayBase
Stemmer.Cvb.Forms.OverlaysUserOverlay
Stemmer.Cvb.Forms.VisualToolsVisualToolBaseTResult
Stemmer.Cvb.Forms.VisualToolsVisualArea2DClassicToolBaseTResult
Stemmer.Cvb.Forms.VisualToolsVisualLineToolBaseTResult
Stemmer.Cvb.Forms.VisualToolsVisualRectToolBaseTResult
Namespace: Stemmer.Cvb.Forms.VisualTools
Assembly: Stemmer.Cvb.Forms (in Stemmer.Cvb.Forms.dll) Version: 14.0.0.0
Syntax
Type Parameters
- TResult
- type of results returned by this tool object
The VisualToolBaseTResult type exposes the following members.
Constructors
Name | Description | |
---|---|---|
VisualToolBaseTResult |
Ctor.
|
Properties
Name | Description | |
---|---|---|
Color |
Color of the overlay.
(Inherited from UserOverlay.) | |
DisplayID |
The ID under which the unmanaged display "knows" the label
(Inherited from OverlayBase.) | |
DragHandleSize |
Size to be used for painting visible drag handles. Note that changes
to this property will not be reflected in the tool's visualization
until it has been repainted.
| |
DragHandleStyle |
Style to be used for painting visible drag handles. Note that changes
to this property will not be reflected in the tool's visualization
until it has been repainted.
| |
InvokeRequired |
tell whether actions on the display object require an invoke action
or not (being user interface objects, display objects should not be
modified asynchronously)
(Inherited from OverlayBase.) | |
IsDragable |
Label dragable?
(Inherited from OverlayBase.) | |
Parent |
The display on which the label lives (if any...). Note that a label
may only be associated with one display at a time
(Inherited from OverlayBase.) | |
Result |
Untyped get accessor for the last calculation result. Untyped results
are - although access is a bit more complicated - sometimes more
convenient for example in this case when building generic result
views.
| |
ResultType |
Get the type of the result returned by this VisualToolBase.
| |
Tag |
Field for user-definable data to be associated with the overlay
object.
(Inherited from OverlayBase.) | |
Text |
Text being displayed on the label and/or in the status line
(Inherited from OverlayBase.) | |
TypedResult |
Get the typed version of the calculation result (sometimes easier to
access than the untyped version).
| |
Vertices |
Pixel positions to paint the user object with. Modifying the Vertex
positions will not change the appearance of the overlay and the
changes will in fact be overwritten in the next Paint event.
Positions are in image coordinates, NOT in client coordinates.
(Inherited from UserOverlay.) | |
XORPaint |
Use or don't use XOR mode for painting.
(Inherited from UserOverlay.) |
Methods
Name | Description | |
---|---|---|
DestroyAndCreatePropertyChanged |
Method to be called whenever a property value changed that
necessitates a destroy + create in order to reflect the property
change on the actual display.
(Inherited from OverlayBase.) | |
Equals | (Inherited from Object.) | |
Execute |
Execute the tool with its current settings. Execution will raise the
ResultUpdated event, unless
OnResultUpdated(VisualToolEventArgs) has been overridden and modified to not
do this. In case you override this method, be aware that this is the
method executed every time the VisualToolBase's Result
needs to be updated - for example when the tool has been moved.
In case an error occurs during calculation, the
ExecutionError event will be raised.
Execution will happen automatically every time something happens to
the VisualToolBase object. If something happens to the image (new
image content or new image) execution must be triggered by calling
this Execute method.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnClick |
Overrideable version of the OnClick event.
| |
OnConnectToDisplay |
Establish connection with a new display.
(Inherited from OverlayBase.) | |
OnDisconnectFromDisplay |
About to sever the connection between this object and a display...
(Overrides OverlayBaseOnDisconnectFromDisplay.) | |
OnDrag |
Overrideable version of the OnDrag event.
| |
OnDragged |
Overrideable version of the OnDragged event.
| |
OnExecute |
Override this function to provide the tool's implementation here. If
something goes wrong during execution, simply throw an exception in
the implementation of this function. This exception will be caught and
passed on by means of the ExecutionError event.
| |
OnExecutionError |
Routing function that invokes the ExecutionError event.
Override this function to react directly to this event in a child
class (but don't forget to call base.OnExecutionError | |
OnPaint |
Inheritors may override this method to change behavior.
(Inherited from UserOverlay.) | |
OnResultUpdated |
Routing function that invokes the ResultUpdated event.
Override this function to react directly to this even in a child class
(but don't forget to call base.OnResultUpdated | |
Overlay_ConnectedToDisplay |
Established a connection with a new display.
(Overrides UserOverlayOverlay_ConnectedToDisplay.) | |
Overlay_DisconnectedFromDisplay |
Remove a label from its display
(Inherited from UserOverlay.) | |
PaintDragHandle(Point, Color, UnmanagedGraphics) |
Member version of the PaintDragHandle method that defaults to the
currently set drag handle size and style.
| |
PaintDragHandle(Point, Color, Int32, HandleStyle, UnmanagedGraphics) |
Paint the drag handle of a visual tool object.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Events
Name | Description | |
---|---|---|
Click |
Event that is raised after this VisualTool object has been clicked.
| |
Drag |
Event that is raised while this visual tool object is being dragged.
| |
Dragged |
Event that is raised after this visual tool object has been dragged.
| |
ExecutionError |
Event that informs about execution errors. If an error occurs during
execution of this VisualToolBase object, the ExecutionError
event will raised instead of the ResultUpdated event.
| |
Paint |
Paint event that will be raised if the object needs to be painted.
(Inherited from UserOverlay.) | |
ResultUpdated |
Event that informs about updated results (either because the object
has been moved or parameters changed, or because the
Execute method has been called.
|
Fields
Name | Description | |
---|---|---|
color_ |
Internally stored color.
(Inherited from OverlayBase.) | |
DragHandleSizeDefault |
Default size to use for painting visible drag handles.
| |
DragHandleSnapInRadius |
Default size for drag handles (in DC pixels). This is the value that
is used by the Display DLL to determine the snap-in radius of the
drag handles belonging to a user object (and a VisualTool object is
nothing but a user object from the Display DLL's point of view).
| |
DragHandleStyleDefault |
Default style to use for painting visible drag handles.
| |
lastResult_ |
Field memorizing the result from the last tool run.
|
See Also