52 #ifndef __vtkRenderWindowInteractor_h
53 #define __vtkRenderWindowInteractor_h
61 #define VTKI_TIMER_FIRST 0
62 #define VTKI_TIMER_UPDATE 1
85 virtual void Initialize();
115 vtkBooleanMacro(EnableRender,
bool);
116 vtkSetMacro(EnableRender,
bool);
117 vtkGetMacro(EnableRender,
bool);
128 virtual void UpdateSize(
int x,
int y);
146 virtual int CreateTimer(
int timerType);
147 virtual int DestroyTimer();
148 int CreateRepeatingTimer(
unsigned long duration);
149 int CreateOneShotTimer(
unsigned long duration);
150 int IsOneShotTimer(
int timerId);
151 unsigned long GetTimerDuration(
int timerId);
152 int ResetTimer(
int timerId);
153 int DestroyTimer(
int timerId);
154 virtual int GetVTKTimerId(
int platformTimerId);
160 enum {OneShotTimer=1,RepeatingTimer};
171 vtkSetClampMacro(TimerDuration,
unsigned long,1,100000);
172 vtkGetMacro(TimerDuration,
unsigned long);
186 vtkSetMacro(TimerEventId,
int);
187 vtkGetMacro(TimerEventId,
int);
188 vtkSetMacro(TimerEventType,
int);
189 vtkGetMacro(TimerEventType,
int);
190 vtkSetMacro(TimerEventDuration,
int);
191 vtkGetMacro(TimerEventDuration,
int);
192 vtkSetMacro(TimerEventPlatformId,
int);
193 vtkGetMacro(TimerEventPlatformId,
int);
211 vtkSetMacro(LightFollowCamera,
int);
212 vtkGetMacro(LightFollowCamera,
int);
213 vtkBooleanMacro(LightFollowCamera,
int);
223 vtkGetMacro(DesiredUpdateRate,
double);
231 vtkGetMacro(StillUpdateRate,
double);
236 vtkGetMacro(Initialized,
int);
255 virtual void ExitCallback();
256 virtual void UserCallback();
257 virtual void StartPickCallback();
258 virtual void EndPickCallback();
273 virtual void Render();
279 void FlyTo(
vtkRenderer *ren,
double x,
double y,
double z);
281 {this->FlyTo(ren, x[0], x[1], x[2]);}
282 void FlyToImage(
vtkRenderer *ren,
double x,
double y);
284 {this->FlyToImage(ren, x[0], x[1]);}
290 vtkGetMacro(NumberOfFlyFrames,
int);
296 vtkSetMacro(Dolly,
double);
297 vtkGetMacro(Dolly,
double);
306 vtkGetVector2Macro(EventPosition,
int);
307 vtkGetVector2Macro(LastEventPosition,
int);
308 vtkSetVector2Macro(LastEventPosition,
int);
312 <<
"): setting EventPosition to (" << x <<
"," << y <<
")");
313 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
314 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
316 this->LastEventPosition[0] = this->EventPosition[0];
317 this->LastEventPosition[1] = this->EventPosition[1];
318 this->EventPosition[0] = x;
319 this->EventPosition[1] = y;
325 this->SetEventPosition(pos[0], pos[1]);
329 this->SetEventPosition(x, this->Size[1] - y - 1);
333 this->SetEventPositionFlipY(pos[0], pos[1]);
335 vtkSetMacro(AltKey,
int);
336 vtkGetMacro(AltKey,
int);
337 vtkSetMacro(ControlKey,
int);
338 vtkGetMacro(ControlKey,
int);
339 vtkSetMacro(ShiftKey,
int);
340 vtkGetMacro(ShiftKey,
int);
341 vtkSetMacro(KeyCode,
char);
342 vtkGetMacro(KeyCode,
char);
343 vtkSetMacro(RepeatCount,
int);
344 vtkGetMacro(RepeatCount,
int);
345 vtkSetStringMacro(KeySym);
346 vtkGetStringMacro(KeySym);
357 const char* keysym=0)
359 this->LastEventPosition[0] = this->EventPosition[0];
360 this->LastEventPosition[1] = this->EventPosition[1];
361 this->EventPosition[0] = x;
362 this->EventPosition[1] = y;
363 this->ControlKey = ctrl;
364 this->ShiftKey = shift;
365 this->KeyCode = keycode;
366 this->RepeatCount = repeatcount;
369 this->SetKeySym(keysym);
384 const char* keysym=0)
386 this->SetEventInformation(x,
387 this->Size[1] - y - 1,
402 const char* keysym=0)
404 this->ControlKey = ctrl;
405 this->ShiftKey = shift;
406 this->KeyCode = keycode;
407 this->RepeatCount = repeatcount;
410 this->SetKeySym(keysym);
424 vtkSetVector2Macro(Size,
int);
425 vtkGetVector2Macro(Size,
int);
426 vtkSetVector2Macro(EventSize,
int);
427 vtkGetVector2Macro(EventSize,
int);
449 vtkSetMacro(UseTDx,
bool);
450 vtkGetMacro(UseTDx,
bool);
457 virtual void MouseMoveEvent();
458 virtual void RightButtonPressEvent();
459 virtual void RightButtonReleaseEvent();
460 virtual void LeftButtonPressEvent();
461 virtual void LeftButtonReleaseEvent();
462 virtual void MiddleButtonPressEvent();
463 virtual void MiddleButtonReleaseEvent();
464 virtual void MouseWheelForwardEvent();
465 virtual void MouseWheelBackwardEvent();
466 virtual void ExposeEvent();
467 virtual void ConfigureEvent();
468 virtual void EnterEvent();
469 virtual void LeaveEvent();
470 virtual void KeyPressEvent();
471 virtual void KeyReleaseEvent();
472 virtual void CharEvent();
473 virtual void ExitEvent();
502 int EventPosition[2];
503 int LastEventPosition[2];
538 friend struct vtkTimerStruct;
546 virtual int InternalCreateTimer(
int timerId,
int timerType,
unsigned long duration);
547 virtual int InternalDestroyTimer(
int platformTimerId);
548 int GetCurrentTimerId();