Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkFLTKRenderWindowInteractor Class Reference

#include <vtkFLTKRenderWindowInteractor.h>

Inheritance diagram for vtkFLTKRenderWindowInteractor:

Inheritance graph
[legend]
Collaboration diagram for vtkFLTKRenderWindowInteractor:

Collaboration graph
[legend]
List of all members.

Detailed Description

FLTK event driven interface for a RenderWindow.

vtkFLTKRenderWindowInteractor is a convenience object that provides event bindings to common graphics functions. For example, camera and actor functions such as zoom-in/zoom-out, azimuth, roll, and pan. IT is one of the window system specific subclasses of vtkRenderWindowInteractor. Please see vtkRenderWindowInteractor documentation for event bindings.

Author:
Sean McInerney
Version:
Revision
1.21
Date:
Date
2004/06/18 22:28:06
See also:
vtkRenderWindowInteractor vtkRenderWindow Fl_VTK_Window Fl_Window

Definition at line 46 of file vtkFLTKRenderWindowInteractor.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkFLTKRenderWindowInteractor, vtkRenderWindowInteractor)
void PrintSelf (ostream &, vtkIndent)
virtual void Initialize (void)
 Initializes the event handlers.

int CreateTimer (int timerType)
 Add a timeout to the event loop for this instance.

int DestroyTimer (void)
 Returns 1 without ant other effects.

void OnTimer (void)
 Invoke a timer event for this instance.

virtual void Start (void)
 Start the FLTK event loop.

virtual void GetMousePosition (int *x, int *y)
 Get the mouse position by querying the window server.

void SetExitObserver (vtkCommand *command)
 Set the command executed on receiving an ExitEvent event.

void SetExitObserverToDefault (void)
 Reset the exit command to the default.

virtual void SetWidget (Fl_VTK_Window *window)
 Specify Fl_VTK_Window (FLTK "peer" class widget) to use for interaction.

Fl_VTK_WindowGetWidget (void) const
 Specify Fl_VTK_Window (FLTK "peer" class widget) to use for interaction.

virtual void SetTopLevelShell (Fl_Window *parent)
 This method will store top level shell (parent) widget for the interactor.

Fl_Window * GetTopLevelShell (void) const
 This method will store top level shell (parent) widget for the interactor.


Static Public Member Functions

vtkFLTKRenderWindowInteractorNew (void)

Protected Member Functions

 vtkFLTKRenderWindowInteractor (void)
 ~vtkFLTKRenderWindowInteractor ()
void Timer (void *)

Static Protected Member Functions

void TimerCallback (void *)

Protected Attributes

Fl_VTK_WindowTop
Fl_Window * TopLevelShell
int OwnTop
vtkCommandExitObserver


Constructor & Destructor Documentation

vtkFLTKRenderWindowInteractor::vtkFLTKRenderWindowInteractor void   )  [protected]
 

vtkFLTKRenderWindowInteractor::~vtkFLTKRenderWindowInteractor  )  [protected]
 


Member Function Documentation

int vtkFLTKRenderWindowInteractor::CreateTimer int  timerType  )  [virtual]
 

Add a timeout to the event loop for this instance.

Parameters:
timerType Indicate if this is first timer set or an update as Win32 uses repeating timers, whereas X uses One shot more timer. if timerType is VTKXI_TIMER_FIRST Win32 and X should create timer otherwise Win32 should exit and X should perform AddTimeOut()

Reimplemented from vtkRenderWindowInteractor.

int vtkFLTKRenderWindowInteractor::DestroyTimer void   )  [virtual]
 

Returns 1 without ant other effects.

Note:
Timers automatically expire in X windows.

Reimplemented from vtkRenderWindowInteractor.

virtual void vtkFLTKRenderWindowInteractor::GetMousePosition int *  x,
int *  y
[virtual]
 

Get the mouse position by querying the window server.

Reimplemented from vtkRenderWindowInteractor.

Fl_Window* vtkFLTKRenderWindowInteractor::GetTopLevelShell void   )  const [inline]
 

This method will store top level shell (parent) widget for the interactor.

This method and the method invocation sequence applies for: 1 vtkRenderWindow-Interactor pair in a nested widget hierarchy multiple vtkRenderWindow-Interactor pairs in the same top level shell It is not needed for 1 vtkRenderWindow-Interactor pair as direct child of a top level shell multiple vtkRenderWindow-Interactor pairs, each in its own top level shell

The method, along with EnterNotify event, changes the keyboard focus among the widgets/vtkRenderWindow(s) so the Interactor(s) can receive the proper keyboard events. The following calls need to be made: vtkRenderWindow's display ID need to be set to the top level shell's display ID. vtkFLTKRenderWindowInteractor's Widget has to be set to the vtkRenderWindow's container widget vtkFLTKRenderWindowInteractor's TopLevel has to be set to the top level shell widget note that the procedure for setting up render window in a widget needs to be followed. See vtkRenderWindowInteractor's SetWidget method.

If multiple vtkRenderWindow-Interactor pairs in SEPARATE windows are desired, do not set the display ID (Interactor will create them as needed. Alternatively, create and set distinct DisplayID for each vtkRenderWindow. Using the same display ID without setting the parent widgets will cause the display to be reinitialized every time an interactor is initialized), do not set the widgets (so the render windows would be in their own windows), and do not set TopLevelShell (each has its own top level shell already).

Definition at line 134 of file vtkFLTKRenderWindowInteractor.h.

Fl_VTK_Window* vtkFLTKRenderWindowInteractor::GetWidget void   )  const [inline]
 

Specify Fl_VTK_Window (FLTK "peer" class widget) to use for interaction.

This method is one of a couple steps that are required for setting up a vtkRenderWindowInteractor as a widget inside of another user interface. You do not need to use this method if the render window will be a stand-alone window. This is only used when you want the render window to be a subwindow within a larger user interface. In that case, you must tell the render window what X display id to use (should probably be fl_display), and then ask the render window what depth, visual and colormap it wants (should probably use Fl::gl_visual(), Fl_Gl_Window::mode(), and/or Fl_Gl_Window::can_do()). Then, you must create an FLTK top level window with those settings. Then you can create the rest of your user interface as a child of the top level window you created. Eventually, you will create a Fl_VTK_Window to serve as the rendering window. You must use the SetWidget method to tell this Interactor about that widget.

Definition at line 99 of file vtkFLTKRenderWindowInteractor.h.

virtual void vtkFLTKRenderWindowInteractor::Initialize void   )  [virtual]
 

Initializes the event handlers.

Reimplemented from vtkRenderWindowInteractor.

vtkFLTKRenderWindowInteractor* vtkFLTKRenderWindowInteractor::New void   )  [static]
 

Reimplemented from vtkRenderWindowInteractor.

void vtkFLTKRenderWindowInteractor::OnTimer void   ) 
 

Invoke a timer event for this instance.

void vtkFLTKRenderWindowInteractor::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkRenderWindowInteractor.

void vtkFLTKRenderWindowInteractor::SetExitObserver vtkCommand command  ) 
 

Set the command executed on receiving an ExitEvent event.

void vtkFLTKRenderWindowInteractor::SetExitObserverToDefault void   ) 
 

Reset the exit command to the default.

virtual void vtkFLTKRenderWindowInteractor::SetTopLevelShell Fl_Window *  parent  )  [virtual]
 

This method will store top level shell (parent) widget for the interactor.

This method and the method invocation sequence applies for: 1 vtkRenderWindow-Interactor pair in a nested widget hierarchy multiple vtkRenderWindow-Interactor pairs in the same top level shell It is not needed for 1 vtkRenderWindow-Interactor pair as direct child of a top level shell multiple vtkRenderWindow-Interactor pairs, each in its own top level shell

The method, along with EnterNotify event, changes the keyboard focus among the widgets/vtkRenderWindow(s) so the Interactor(s) can receive the proper keyboard events. The following calls need to be made: vtkRenderWindow's display ID need to be set to the top level shell's display ID. vtkFLTKRenderWindowInteractor's Widget has to be set to the vtkRenderWindow's container widget vtkFLTKRenderWindowInteractor's TopLevel has to be set to the top level shell widget note that the procedure for setting up render window in a widget needs to be followed. See vtkRenderWindowInteractor's SetWidget method.

If multiple vtkRenderWindow-Interactor pairs in SEPARATE windows are desired, do not set the display ID (Interactor will create them as needed. Alternatively, create and set distinct DisplayID for each vtkRenderWindow. Using the same display ID without setting the parent widgets will cause the display to be reinitialized every time an interactor is initialized), do not set the widgets (so the render windows would be in their own windows), and do not set TopLevelShell (each has its own top level shell already).

virtual void vtkFLTKRenderWindowInteractor::SetWidget Fl_VTK_Window window  )  [virtual]
 

Specify Fl_VTK_Window (FLTK "peer" class widget) to use for interaction.

This method is one of a couple steps that are required for setting up a vtkRenderWindowInteractor as a widget inside of another user interface. You do not need to use this method if the render window will be a stand-alone window. This is only used when you want the render window to be a subwindow within a larger user interface. In that case, you must tell the render window what X display id to use (should probably be fl_display), and then ask the render window what depth, visual and colormap it wants (should probably use Fl::gl_visual(), Fl_Gl_Window::mode(), and/or Fl_Gl_Window::can_do()). Then, you must create an FLTK top level window with those settings. Then you can create the rest of your user interface as a child of the top level window you created. Eventually, you will create a Fl_VTK_Window to serve as the rendering window. You must use the SetWidget method to tell this Interactor about that widget.

virtual void vtkFLTKRenderWindowInteractor::Start void   )  [virtual]
 

Start the FLTK event loop.

Reimplemented from vtkRenderWindowInteractor.

void vtkFLTKRenderWindowInteractor::Timer void *   )  [protected]
 

void vtkFLTKRenderWindowInteractor::TimerCallback void *   )  [static, protected]
 

vtkFLTKRenderWindowInteractor::vtkTypeRevisionMacro vtkFLTKRenderWindowInteractor  ,
vtkRenderWindowInteractor 
 


Member Data Documentation

vtkCommand* vtkFLTKRenderWindowInteractor::ExitObserver [protected]
 

Definition at line 157 of file vtkFLTKRenderWindowInteractor.h.

int vtkFLTKRenderWindowInteractor::OwnTop [protected]
 

Definition at line 155 of file vtkFLTKRenderWindowInteractor.h.

Fl_VTK_Window* vtkFLTKRenderWindowInteractor::Top [protected]
 

Definition at line 152 of file vtkFLTKRenderWindowInteractor.h.

Fl_Window* vtkFLTKRenderWindowInteractor::TopLevelShell [protected]
 

Definition at line 153 of file vtkFLTKRenderWindowInteractor.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 04:24:41 2004 for vtkFLTK by doxygen 1.3.7