CNiCursors3D

3D Graph

Class CNiCursors3D Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: RemoveAllNext page: Count    
Class Declared in:
NiCursors3D.h

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

CNiCursors3D encapsulates the interface to the Cursors property of a CNiGraph3D object, which allows you to access and remove cursors associated with the graph control. You use cursors to enable your users to identify specific points on your 3D graph plots.

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 short Count Returns the number of cursors in the collection.

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

Public constructor

CNiCursors3D()

Default constructor.
Public constructor

CNiCursors3D( CWCursors3D_CI* pCustom, CNiInterface::ThreadAccess option )

Constructor that attaches to the specified CWCursors3D_CI pointer.
Public constructor

CNiCursors3D( const CNiCursors3D& source )

Copy constructor.

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

Public destructor

~CNiCursors3D()

Destructor.

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

Public function CNiCursor3D

Add()

Adds a cursor to the collection and returns the new cursor.
Public function static const IID &

GetIid()

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

Item( long cursorIndex )

Returns the specified cursor from the collection.
Public function CNiCursor3D

Item( const CString& cursorName )

Returns the specified cursor from the collection.
Public function const CNiCursors3D &

operator =( const CNiCursors3D& source )

Assignment operator.
Public function void

Remove( long cursorIndex )

Removes the specified cursor from the collection.
Public function void

Remove( const CString& cursorName )

Removes the specified cursor from the collection.
Public function void

RemoveAll()

Removes all cursors from the collection.

Shortcut to top of page. Examples

1. Set the snap mode and visibility of the first cursor on the graph.

    CNiGraph graph;
    CNiCursor3D cursor = graph.Cursors.Item(1);
    cursor.SnapMode  = CNiCursor3D::SnapNearestPlot;
    cursor.Visible   = true;

2. Set the point style.

    CNiGraph graph;
    graph.Cursors.Item(1).PointStyle = CNiCursor3D::WireframeCube;

3. Add an additional cursor to the graph and hide it.

    CNiGraph graph;
    CNiCursor3D cursor = graph.Cursors.Add();
    cursor.Visible = false;

4. Remove all cursors from the graph.

    CNiGraph graph;
    graph.Cursors.RemoveAll();

5. Change the name of the first cursor.

    CNiGraph graph;
    graph.Cursors.Item(1).Name = "Time";

Subsequent accesses to this cursor must now use "Time" for its name. For example,

    graph.Cursors.Item("Time").Visible = true;