CNiPointers

CNi

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

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

A CNiPointers object is a collection of pointers on a knob or slide control.

  • Use CNiKnob::Pointers to obtain the pointers collection for a knob.
  • Use CNiSlide::Pointers to obtain the pointers collection for a slide.
  • Use the Add function to create additional pointers. Add returns a CNiPointer object, which represents the new pointer.
  • Use the Item function to access existing pointers in the collection. This function can access pointers by either name or index.
  • Use the Remove function to remove existing pointers from the collection. This function can access pointers by either name or index.
  • Use the RemoveAll function to remove all pointers from the collection.

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 pointers in the collection.

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

Public constructor

CNiPointers()

Default constructor.
Public constructor

CNiPointers( CWPointers_CI* pCustom, CNiInterface::ThreadAccess option )

Constructor that attaches to the specified CWPointers_CI pointer.
Public constructor

CNiPointers( const CNiPointers& source )

Copy constructor.

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

Public destructor

~CNiPointers()

Destructor.

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

Public function CNiPointer

Add()

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

GetIid()

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

Item( long pointerIndex )

Returns the specified pointer from the collection.
Public function CNiPointer

Item( const CString& pointerName )

Returns the specified pointer from the collection.
Public function const CNiPointers &

operator =( const CNiPointers& source )

Assignment operator.
Public function void

Remove( long pointerIndex )

Removes the specified pointer from the collection.
Public function void

Remove( const CString& pointerName )

Removes the specified pointer from the collection.
Public function void

RemoveAll()

Removes all pointers from the collection.

Shortcut to top of page. Examples

1. Set the style of the first pointer in the knob control.

    CNiKnob knob;
    CNiPointer pointer = knob.Pointers.Item(1);
    pointer.Style = CNiPointer::Pointer3D
    xAxis.Visible = true;

2. Set the current value of the pointer to 30.

    CNiKnob knob;
    knob.Pointers.Item(1).Value = 30;

3. Add an additional pointer named "Power" to the slide control.

    CNiSlide slide;
    slide.Pointers.Add("Power");

4. Remove all pointers from the slide control.

    CNiSlide slide;
    slide.Pointers.RemoveAll();

5. Change the name of the first pointer to "Time".

    CNiGraph slide;
    slide.Pointers.Item(1).Name = "Time";

Subsequent accesses to this pointer must now use "Time" as the item name. For example,

    slide.Pointers.Item("Time").Visible = true;