31 #ifndef vtkControlPointsItem_h 
   32 #define vtkControlPointsItem_h 
   34 #include "vtkChartsCoreModule.h"  
   57     CurrentPointChangedEvent = vtkCommand::UserEvent,
 
   73   vtkSetVector4Macro(UserBounds, 
double);
 
   74   vtkGetVector4Macro(UserBounds, 
double);
 
   83   vtkSetVector4Macro(ValidBounds, 
double);
 
   84   vtkGetVector4Macro(ValidBounds, 
double);
 
   92   vtkGetMacro(ScreenPointRadius, 
float);
 
  113   void SelectPoint(
double* currentPoint);
 
  118   void SelectAllPoints();
 
  130   void DeselectPoint(
double* currentPoint);
 
  135   void DeselectAllPoints();
 
  141   void ToggleSelectPoint(
vtkIdType pointId);
 
  148   void ToggleSelectPoint(
double* currentPoint);
 
  158   vtkIdType GetNumberOfSelectedPoints()
const;
 
  171   bool IsOverPoint(
double* pos, 
vtkIdType pointId);
 
  176   vtkIdType GetControlPointId(
double* pos);
 
  184                            bool excludeFirstAndLast = 
false)
const;
 
  192   vtkGetMacro(StrokeMode, 
bool);
 
  203   vtkGetMacro(SwitchPointsMode, 
bool);
 
  212   vtkGetMacro(EndPointsXMovable, 
bool);
 
  214   vtkGetMacro(EndPointsYMovable, 
bool);
 
  215   virtual bool GetEndPointsMovable();
 
  224   vtkGetMacro(EndPointsRemovable, 
bool);
 
  233   vtkGetMacro(ShowLabels, 
bool);
 
  240   vtkSetStringMacro(LabelFormat);
 
  249   virtual vtkIdType AddPoint(
double* newPos) = 0;
 
  256   virtual vtkIdType RemovePoint(
double* pos) = 0;
 
  267   inline void RemoveCurrentPoint();
 
  272   virtual vtkIdType GetNumberOfPoints()
const = 0;
 
  319   void SpreadPoints(
float factor, 
bool dontSpreadFirstAndLast = 
false);
 
  336   vtkGetObjectMacro(SelectedPointPen, 
vtkPen);
 
  344   vtkGetObjectMacro(SelectedPointBrush, 
vtkBrush);
 
  375   void StartInteraction();
 
  376   void StartInteractionIfNotStarted();
 
  378   void EndInteraction();
 
  379   int GetInteractionsCount()
const;
 
  380   virtual void emitEvent(
unsigned long event, 
void* params = 0) = 0;
 
  382   static void CallComputePoints(
vtkObject* sender, 
unsigned long event, 
void* receiver, 
void* params);
 
  389   virtual void ComputePoints();
 
  412   virtual bool ClampPos(
double pos[2], 
double bounds[4]);
 
  413   bool ClampValidPos(
double pos[2]);
 
  426   void SetCurrentPointPos(
const vtkVector2f& newPos);
 
  431   inline vtkVector2f GetSelectionCenterOfMass()
const;
 
  435   virtual void EditPoint(
float vtkNotUsed(tX), 
float vtkNotUsed(tY));
 
  452   bool IsEndPointPicked();
 
  457   bool IsPointRemovable(
vtkIdType pointId);
 
  465   virtual void ComputeBounds(
double* bounds);
 
  483   double              UserBounds[4];
 
  484   double              ValidBounds[4];
 
  507   void      ComputeBounds();
 
  515   this->RemovePoint(this->GetCurrentPoint());
 
  521   return this->GetCenterOfMass(this->Selection);
 
Wrapper around std::string to keep symbols short. 
 
data structure to represent key events. 
 
abstract base class for most VTK objects 
 
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
 
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn. 
 
bool PointAboutToBeToggled
 
virtual bool KeyReleaseEvent(const vtkContextKeyEvent &key)
Key release event. 
 
vtkVector2f GetSelectionCenterOfMass() const 
 
Abstract class for control points items. 
 
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). 
 
dynamic, self-adjusting array of vtkIdType 
 
vtkPen * SelectedPointPen
 
vtkTypeUInt64 vtkMTimeType
 
virtual bool UsingLogScale()
Returns true if control points are to be rendered in log-space. 
 
vtkBrush * SelectedPointBrush
 
Class for drawing 2D primitives to a graphical context. 
 
supports function callbacks 
 
provides a brush that fills shapes drawn by vtkContext2D. 
 
data structure to represent mouse events. 
 
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
Select all points in the specified rectangle. 
 
vtkTransform2D * Transform
 
a simple class to control print indentation 
 
represent and manipulate 2D points 
 
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event. 
 
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions. 
 
provides a pen that draws the outlines of shapes drawn by vtkContext2D. 
 
Abstract class for 2D plots. 
 
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
Key press event. 
 
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection. 
 
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses. 
 
bool EnforceValidFunction
 
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event. 
 
bool PointAboutToBeDeleted
 
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item. 
 
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
Mouse button double click event. 
 
vtkCallbackCommand * Callback