27 #ifndef vtkChartSelectionHelper_h 
   28 #define vtkChartSelectionHelper_h 
   55   assert(link != NULL && selectionIds != NULL);
 
   67       if (selectionPlot == plot)
 
  104   std::vector<vtkIdType> output;
 
  115   while (i < size && iOld < oldSize)
 
  117     if (ptrSelection[i] > ptrOldSelection[iOld]) 
 
  119       output.push_back(ptrOldSelection[iOld++]);
 
  121     else if (ptrSelection[i] == ptrOldSelection[iOld]) 
 
  126     else if (ptrSelection[i] < ptrOldSelection[iOld]) 
 
  131   while (iOld < oldSize)
 
  133     output.push_back(ptrOldSelection[iOld++]);
 
  137   for (std::vector<vtkIdType>::iterator it = output.begin();
 
  138        it != output.end(); ++it, ++ptrSelection)
 
  157   std::vector<vtkIdType>::iterator it;
 
  158   it = std::set_union(ptrSelection,
 
  163   int newSize = 
int(it - output.begin());
 
  166   for (std::vector<vtkIdType>::iterator i = output.begin(); i != it;
 
  181   std::vector<vtkIdType> output;
 
  190   while (i < size && iOld < oldSize)
 
  192     if (ptrSelection[i] > ptrOldSelection[iOld]) 
 
  194       output.push_back(ptrOldSelection[iOld++]);
 
  196     else if (ptrSelection[i] == ptrOldSelection[iOld]) 
 
  201     else if (ptrSelection[i] < ptrOldSelection[iOld]) 
 
  203       output.push_back(ptrSelection[i++]);
 
  208     output.push_back(ptrSelection[i++]);
 
  210   while (iOld < oldSize)
 
  212     output.push_back(ptrOldSelection[iOld++]);
 
  216   for (std::vector<vtkIdType>::iterator it = output.begin();
 
  217        it != output.end(); ++it, ++ptrSelection)
 
  233   if (!plotSelection || !oldSelection)
 
  239   switch(selectionMode)
 
  283   return selectionMode;
 
  289 #endif // vtkChartSelectionHelper_h 
A node in a selection tree. 
virtual vtkSelection * GetCurrentSelection()
Set or get the current selection in the annotation layers. 
unsigned int GetNumberOfNodes()
Returns the number of nodes in this selection. 
virtual void SetFieldType(int type)
Get or set the field type of the selection. 
static void AddSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection)
Add the supplied selection from the oldSelection. 
virtual void * GetVoidPointer(vtkIdType valueIdx)=0
Return a void pointer. 
vtkIdType GetNumberOfTuples()
Get the number of complete tuples (a component group) in the array. 
virtual void AddNode(vtkSelectionNode *)
Adds a selection node. 
static void MinusSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection)
Subtract the supplied selection from the oldSelection. 
A node in a selection tree. 
static void MakeSelection(vtkAnnotationLink *link, vtkIdTypeArray *selectionIds, vtkPlot *plot)
Populate the annotation link with the supplied selectionIds array, and set the appropriate node prope...
dynamic, self-adjusting array of vtkIdType 
Hold a reference to a vtkObjectBase instance. 
virtual vtkInformation * GetProperties()
Returns the property map. 
static vtkSmartPointer< T > New()
Create an instance of a VTK object. 
static vtkPlot * SafeDownCast(vtkObjectBase *o)
data structure to represent mouse events. 
static vtkInformationObjectBaseKey * PROP()
Pointer to the prop the selection belongs to. 
virtual vtkSelectionNode * GetNode(unsigned int idx)
Returns a node given it's index. 
virtual void SetContentType(int type)
Get or set the content type of the selection. 
Abstract class for 2D plots. 
virtual vtkTable * GetInput()
Get the input table used by the plot. 
int GetModifiers() const 
Return the modifier keys, if any, ORed together. 
static void BuildSelection(vtkAnnotationLink *link, int selectionMode, vtkIdTypeArray *plotSelection, vtkIdTypeArray *oldSelection, vtkPlot *plot)
Build a selection based on the supplied selectionMode using the new plotSelection and combining it wi...
static int GetMouseSelectionMode(const vtkContextMouseEvent &mouse, int selectionMode)
Combine the SelectionMode with any mouse modifiers to get an effective selection mode for this click ...
T * GetPointer() const 
Get a raw pointer to the contained object. 
Allocate and hold a VTK object. 
T * GetPointer() const 
Get the contained pointer. 
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array. 
static vtkInformationObjectBaseKey * SOURCE()
Pointer to the data or algorithm the selection belongs to. 
virtual void SetSelectionList(vtkAbstractArray *)
Sets the selection list. 
static void ToggleSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection)
Toggle the supplied selection from the oldSelection. 
virtual void SetCurrentSelection(vtkSelection *sel)
Set or get the current selection in the annotation layers. 
An algorithm for linking annotations among objects.