CNiAnnotation

CNi

Class CNiAnnotation Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: SetBuiltinStyleNext page: Arrow    
Class Declared in:
NiAnnotation.h

'Overview' icon -- Shortcut to top of page. 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.

Hierarchy Chart Hierarchy Chart

'Base Classes' icon -- Shortcut to top of page. Base Classes

'Data Items' icon -- Shortcut to top of page. Data Items

Public data CNiArrow Arrow Returns the annotation arrow, which is a CNiArrow object.
Public data CNiCaption Caption Returns the annotation caption, which is a CNiCaption object.
Public data CoordinateTypes CoordinateType Specifies the coordinate system the annotation uses.
Public data bool Enabled Specifies if the annotation generates mouse events or if you can drag the annotation in annotation tracking mode.
Public data CString Name Specifies the annotation name.
Public data CNiPlot Plot Specifies the plot associated with the annotation.
Public data long PointIndex Specifies the point associated with the annotation on the plot.
Public data CNiShape Shape Returns the annotation shape, which is a CNiShape object.
Public data SnapModes SnapMode Specifies the snap mode of the annotation shape.
Public data bool Visible Specifies if the annotation is visible or hidden.

'Constructors' icon -- Shortcut to top of page. Constructors

Public constructor

CNiAnnotation()

Default constructor.
Public constructor

CNiAnnotation( CWAnnotation_CI* pCustom, CNiInterface::ThreadAccess option )

Constructor that attaches to the specified CWAnnotation_CI pointer.
Public constructor

CNiAnnotation( const CNiAnnotation& source )

Copy constructor.

'Destructors' icon -- Shortcut to top of page. Destructors

Public destructor

~CNiAnnotation()

Destructor.

'Functions' icon -- Shortcut to top of page. Functions

Public function static const IID &

GetIid()

Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects.
Public function const CNiAnnotation &

operator =( const CNiAnnotation& source )

Assignment operator.
Public function void

SetBuiltinStyle( AnnotationStyles Style )

Sets the annotation properties to represent the style specified.

Shortcut to top of page. Example

    // Change the visibility of the first annotation on the graph.
    CNiGraph graph;
    CNiAnnotation annotation = graph.Annotations.Item(1);
    annotation.Visible = false;