53 #ifndef __vtkRenderWindowInteractor_h
54 #define __vtkRenderWindowInteractor_h
62 #define VTKI_TIMER_FIRST 0
63 #define VTKI_TIMER_UPDATE 1
88 virtual void Initialize();
131 virtual void UpdateSize(
int x,
int y);
149 virtual int CreateTimer(
int timerType);
150 virtual int DestroyTimer();
155 int CreateRepeatingTimer(
unsigned long duration);
159 int CreateOneShotTimer(
unsigned long duration);
163 int IsOneShotTimer(
int timerId);
166 unsigned long GetTimerDuration(
int timerId);
169 int ResetTimer(
int timerId);
173 int DestroyTimer(
int timerId);
176 virtual int GetVTKTimerId(
int platformTimerId);
181 enum {OneShotTimer=1,RepeatingTimer};
284 virtual void ExitCallback();
285 virtual void UserCallback();
286 virtual void StartPickCallback();
287 virtual void EndPickCallback();
302 virtual void Render();
310 {this->FlyTo(ren, x[0], x[1], x[2]);}
313 {this->FlyToImage(ren, x[0], x[1]);}
341 <<
"): setting EventPosition to (" << x <<
"," << y <<
")");
342 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
343 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
345 this->LastEventPosition[0] = this->EventPosition[0];
346 this->LastEventPosition[1] = this->EventPosition[1];
347 this->EventPosition[0] =
x;
348 this->EventPosition[1] =
y;
354 this->SetEventPosition(pos[0], pos[1]);
358 this->SetEventPosition(x, this->Size[1] - y - 1);
362 this->SetEventPositionFlipY(pos[0], pos[1]);
415 const char* keysym=0)
417 this->LastEventPosition[0] = this->EventPosition[0];
418 this->LastEventPosition[1] = this->EventPosition[1];
419 this->EventPosition[0] =
x;
420 this->EventPosition[1] =
y;
421 this->ControlKey = ctrl;
422 this->ShiftKey = shift;
423 this->KeyCode = keycode;
424 this->RepeatCount = repeatcount;
427 this->SetKeySym(keysym);
442 const char* keysym=0)
444 this->SetEventInformation(x,
445 this->Size[1] - y - 1,
460 const char* keysym=0)
462 this->ControlKey = ctrl;
463 this->ShiftKey = shift;
464 this->KeyCode = keycode;
465 this->RepeatCount = repeatcount;
468 this->SetKeySym(keysym);
515 virtual void MouseMoveEvent();
516 virtual void RightButtonPressEvent();
517 virtual void RightButtonReleaseEvent();
518 virtual void LeftButtonPressEvent();
519 virtual void LeftButtonReleaseEvent();
520 virtual void MiddleButtonPressEvent();
521 virtual void MiddleButtonReleaseEvent();
522 virtual void MouseWheelForwardEvent();
523 virtual void MouseWheelBackwardEvent();
524 virtual void ExposeEvent();
525 virtual void ConfigureEvent();
526 virtual void EnterEvent();
527 virtual void LeaveEvent();
528 virtual void KeyPressEvent();
529 virtual void KeyReleaseEvent();
530 virtual void CharEvent();
531 virtual void ExitEvent();
565 int EventPosition[2];
566 int LastEventPosition[2];
601 friend struct vtkTimerStruct;
609 virtual int InternalCreateTimer(
int timerId,
int timerType,
unsigned long duration);
610 virtual int InternalDestroyTimer(
int platformTimerId);
611 int GetCurrentTimerId();
virtual void SetEventPositionFlipY(int pos[2])
virtual void GetMousePosition(int *x, int *y)
abstract base class for most VTK objects
unsigned long TimerDuration
void SetEventInformation(int x, int y, int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=0)
void SetEventInformationFlipY(int x, int y, int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=0)
#define vtkGetMacro(name, type)
virtual void SetRenderWindow(vtkRenderWindow *renwin)
vtkInteractorObserver * InteractorStyle
abstract specification for renderers
vtkRenderWindow * RenderWindow
void SetKeyEventInformation(int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=0)
#define vtkSetClampMacro(name, type, min, max)
#define vtkSetStringMacro(name)
GLint GLint GLint GLint GLint GLint y
#define vtkTypeMacro(thisClass, superclass)
virtual void SetEventPosition(int pos[2])
void GrabFocus(vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor ...
void FlyTo(vtkRenderer *ren, double *x)
platform-independent render window interaction including picking and frame rate control.
GLint GLint GLint GLint GLint x
void InternalReleaseFocus()
void InternalGrabFocus(vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
superclass for callback/observer methods
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void UnRegister(vtkObjectBase *o)
a list of nodes that form an assembly path
vtkObserverMediator * ObserverMediator
a simple class to control print indentation
const char * GetClassName() const
virtual void TerminateApp(void)
record and play VTK events passing through a vtkRenderWindowInteractor
abstract base class for most VTK objects
#define vtkGetStringMacro(name)
virtual void SetEventPosition(int x, int y)
#define vtkGetObjectMacro(name, type)
vtkWeakPointer< vtkRenderWindow > RenderWindow
abstract API for pickers that can pick an instance of vtkProp
#define vtkGetVector2Macro(name, type)
create a window for renderers to draw into
#define VTKRENDERINGCORE_EXPORT
vtkAbstractPicker * Picker
define API for picking subclasses
#define vtkBooleanMacro(name, type)
vtkPickingManager * PickingManager
void FlyToImage(vtkRenderer *ren, double *x)
#define vtkSetVector2Macro(name, type)
#define vtkSetMacro(name, type)
virtual void SetEventPositionFlipY(int x, int y)