![]() |
CNiPointers | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiPointers.h |
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.
Base Classes
Data Items
![]() |
short | Count | Returns the number of pointers in the collection. |
Constructors
![]() |
Default constructor. | ||
![]() |
CNiPointers( CWPointers_CI* pCustom, CNiInterface::ThreadAccess option ) |
Constructor that attaches to the specified CWPointers_CI pointer. | |
![]() |
CNiPointers( const CNiPointers& source ) |
Copy constructor. |
Destructors
Functions
![]() |
CNiPointer | Add() |
Adds a pointer to the collection and returns the new pointer. |
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
CNiPointer | Item( long pointerIndex ) |
Returns the specified pointer from the collection. |
![]() |
CNiPointer | Returns the specified pointer from the collection. | |
![]() |
const CNiPointers & | Assignment operator. | |
![]() |
void | Remove( long pointerIndex ) |
Removes the specified pointer from the collection. |
![]() |
void | Removes the specified pointer from the collection. | |
![]() |
void | Removes all pointers from the collection. |
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;