![]() |
CNiAnnotation | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiAnnotation.h |
Overview
CNiAnnotation encapsulates the interface to a single annotation on a graph control, which allows you to modify the annotation's appearance and behavior.
You obtain individual annotations using the Annotations property on a CNiGraph object.
Note that you must initialize a CNiAnnotation object from an existing object. If you do not initialize a CNiAnnotation object from an existing object, a CNiObjectNotInUsableState exception will be thrown when you attempt to manipulate the instance of the CNiAnnotation.
Base Classes
Data Items
![]() |
CNiArrow | Arrow | Returns the annotation arrow, which is a CNiArrow object. |
![]() |
CNiCaption | Caption | Returns the annotation caption, which is a CNiCaption object. |
![]() |
CoordinateTypes | CoordinateType | Specifies the coordinate system the annotation uses. |
![]() |
bool | Enabled | Specifies if the annotation generates mouse events or if you can drag the annotation in annotation tracking mode. |
![]() |
CString | Name | Specifies the annotation name. |
![]() |
CNiPlot | Plot | Specifies the plot associated with the annotation. |
![]() |
long | PointIndex | Specifies the point associated with the annotation on the plot. |
![]() |
CNiShape | Shape | Returns the annotation shape, which is a CNiShape object. |
![]() |
SnapModes | SnapMode | Specifies the snap mode of the annotation shape. |
![]() |
bool | Visible | Specifies if the annotation is visible or hidden. |
Constructors
![]() |
Default constructor. | ||
![]() |
CNiAnnotation( CWAnnotation_CI* pCustom, CNiInterface::ThreadAccess option ) |
Constructor that attaches to the specified CWAnnotation_CI pointer. | |
![]() |
CNiAnnotation( const CNiAnnotation& source ) |
Copy constructor. |
Destructors
Functions
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
const CNiAnnotation & | Assignment operator. | |
![]() |
void | SetBuiltinStyle( AnnotationStyles Style ) |
Sets the annotation properties to represent the style specified. |
Example
// Change the visibility of the first annotation on the graph.
CNiGraph graph; CNiAnnotation annotation = graph.Annotations.Item(1); annotation.Visible = false;