00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBarMark.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00030 #ifndef __vtkBarMark_h 00031 #define __vtkBarMark_h 00032 00033 #include "vtkMark.h" 00034 00035 class vtkBrush; 00036 class vtkDataObject; 00037 class vtkPen; 00038 class vtkAbstractContextBufferId; 00039 00040 class VTK_CHARTS_EXPORT vtkBarMark : public vtkMark 00041 { 00042 public: 00043 vtkTypeMacro(vtkBarMark, vtkMark); 00044 virtual void PrintSelf(ostream &os, vtkIndent indent); 00045 static vtkBarMark* New(); 00046 00048 virtual bool Paint(vtkContext2D *painter); 00049 00050 //BTX 00053 void PaintIds(); 00054 00056 void UpdateBufferId(); 00057 00059 vtkIdType GetPickedItem(int x, int y); 00060 00064 virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse); 00065 00069 virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); 00070 00074 virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse); 00075 00077 void MouseEnterEventOnItem(int item); 00078 00080 void MouseLeaveEventOnItem(int item); 00081 00083 virtual bool Hit(const vtkContextMouseEvent &mouse); 00084 //ETX 00085 00086 virtual int GetType() { return BAR; } 00087 00089 virtual void ReleaseGraphicsResources(); 00090 00091 //BTX 00092 protected: 00093 vtkBarMark(); 00094 ~vtkBarMark(); 00095 00096 bool MouseOver; // tell if the mouse cursor entered the bar 00097 00098 vtkAbstractContextBufferId *BufferId; 00099 00100 int ActiveItem; 00101 // bool PaintIdMode; 00102 00103 private: 00104 vtkBarMark(const vtkBarMark &); // Not implemented. 00105 void operator=(const vtkBarMark &); // Not implemented. 00106 //ETX 00107 }; 00108 00109 #endif //__vtkBarMark_h
1.7.1