Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
vtkInteractorStyleUser Class Reference
#include <vtkInteractorStyleUser.h>
Inheritance diagram for vtkInteractorStyleUser:
[legend]Collaboration diagram for vtkInteractorStyleUser:
[legend]List of all members.
Detailed Description
provides customizable interaction routines
- Date:
-
2002/11/22 16:27:05
- Revision:
-
1.30
The most common way to customize user interaction is to write a subclass of vtkInteractorStyle: vtkInteractorStyleUser allows you to customize the interaction to without subclassing vtkInteractorStyle. This is particularly useful for setting up custom interaction modes in scripting languages such as Tcl and Python. This class allows you to hook into the MouseMove, ButtonPress/Release, KeyPress/Release, etc. events. If you want to hook into just a single mouse button, but leave the interaction modes for the others unchanged, you must use e.g. SetMiddleButtonPressMethod() instead of the more general SetButtonPressMethod().
- Events:
-
vtkCommand::RightButtonPressEvent vtkCommand::UserEvent vtkCommand::MiddleButtonReleaseEvent vtkCommand::ExposeEvent vtkCommand::EnterEvent vtkCommand::ConfigureEvent vtkCommand::KeyPressEvent vtkCommand::RightButtonReleaseEvent vtkCommand::CharEvent vtkCommand::LeaveEvent vtkCommand::LeftButtonPressEvent vtkCommand::KeyReleaseEvent vtkCommand::LeftButtonReleaseEvent vtkCommand::MouseMoveEvent vtkCommand::TimerEvent vtkCommand::MiddleButtonPressEvent
- Created by:
-
- CVS contributions (if > 5%):
-
- Gobbi, David (55%)
- King, Brad (18%)
- Barre, Sebastien (12%)
- Martin, Ken (11%)
- CVS logs (CVSweb):
-
- .
cxx
(/Rendering/vtkInteractorStyleUser.cxx)
- .
h
(/Rendering/vtkInteractorStyleUser.h)
- Examples:
-
vtkInteractorStyleUser (Examples)
Definition at line 63 of file vtkInteractorStyleUser.h.
|
Public Types |
typedef vtkInteractorStyle | Superclass |
Public Methods |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | OnTimer () |
|
void | SetMouseMoveMethod (void(*f)(void *), void *arg) |
void | SetMouseMoveMethodArgDelete (void(*f)(void *)) |
void | SetButtonPressMethod (void(*f)(void *), void *arg) |
void | SetButtonPressMethodArgDelete (void(*f)(void *)) |
void | SetButtonReleaseMethod (void(*f)(void *), void *arg) |
void | SetButtonReleaseMethodArgDelete (void(*f)(void *)) |
void | SetKeyPressMethod (void(*f)(void *), void *arg) |
void | SetKeyPressMethodArgDelete (void(*f)(void *)) |
void | SetKeyReleaseMethod (void(*f)(void *), void *arg) |
void | SetKeyReleaseMethodArgDelete (void(*f)(void *)) |
void | SetCharMethod (void(*f)(void *), void *arg) |
void | SetCharMethodArgDelete (void(*f)(void *)) |
void | SetConfigureMethod (void(*f)(void *), void *arg) |
void | SetConfigureMethodArgDelete (void(*f)(void *)) |
void | SetExposeMethod (void(*f)(void *), void *arg) |
void | SetExposeMethodArgDelete (void(*f)(void *)) |
void | SetEnterMethod (void(*f)(void *), void *arg) |
void | SetEnterMethodArgDelete (void(*f)(void *)) |
void | SetLeaveMethod (void(*f)(void *), void *arg) |
void | SetLeaveMethodArgDelete (void(*f)(void *)) |
void | SetTimerMethod (void(*f)(void *), void *arg) |
void | SetTimerMethodArgDelete (void(*f)(void *)) |
void | SetUserInteractionMethod (void(*f)(void *), void *arg) |
void | SetUserInteractionMethodArgDelete (void(*f)(void *)) |
void | StartUserInteraction () |
void | EndUserInteraction () |
|
virtual int * | GetLastPos () |
virtual void | GetLastPos (int &, int &) |
virtual void | GetLastPos (int[2]) |
|
virtual int * | GetOldPos () |
virtual void | GetOldPos (int &, int &) |
virtual void | GetOldPos (int[2]) |
|
virtual int | GetShiftKey () |
virtual int | GetCtrlKey () |
|
virtual int | GetChar () |
|
virtual char * | GetKeySym () |
|
virtual int | GetButton () |
|
virtual void | OnMouseMove () |
virtual void | OnLeftButtonDown () |
virtual void | OnLeftButtonUp () |
virtual void | OnMiddleButtonDown () |
virtual void | OnMiddleButtonUp () |
virtual void | OnRightButtonDown () |
virtual void | OnRightButtonUp () |
|
virtual void | OnChar () |
virtual void | OnKeyPress () |
virtual void | OnKeyRelease () |
|
virtual void | OnExpose () |
virtual void | OnConfigure () |
virtual void | OnEnter () |
virtual void | OnLeave () |
Static Public Methods |
vtkInteractorStyleUser * | New () |
int | IsTypeOf (const char *type) |
vtkInteractorStyleUser * | SafeDownCast (vtkObject *o) |
Protected Methods |
| vtkInteractorStyleUser () |
| ~vtkInteractorStyleUser () |
void | vtkSetOldCallback (unsigned long &tag, unsigned long event, void(*f)(void *), void *arg) |
void | vtkSetOldDelete (unsigned long tag, void(*f)(void *)) |
Protected Attributes |
int | LastPos [2] |
int | OldPos [2] |
int | ShiftKey |
int | CtrlKey |
int | Char |
char * | KeySym |
int | Button |
unsigned long | MouseMoveTag |
unsigned long | KeyPressTag |
unsigned long | KeyReleaseTag |
unsigned long | CharTag |
unsigned long | EnterTag |
unsigned long | LeaveTag |
unsigned long | ExposeTag |
unsigned long | ConfigureTag |
unsigned long | TimerTag |
unsigned long | UserTag |
Member Typedef Documentation
Constructor & Destructor Documentation
vtkInteractorStyleUser::vtkInteractorStyleUser |
( |
|
) |
[protected] |
|
vtkInteractorStyleUser::~vtkInteractorStyleUser |
( |
|
) |
[protected] |
|
Member Function Documentation
vtkInteractorStyleUser* vtkInteractorStyleUser::New |
( |
|
) |
[static] |
|
virtual const char* vtkInteractorStyleUser::GetClassName |
( |
|
) |
[virtual] |
|
int vtkInteractorStyleUser::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkInteractorStyle. |
virtual int vtkInteractorStyleUser::IsA |
( |
const char * |
type |
) |
[virtual] |
|
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkInteractorStyle. |
vtkInteractorStyleUser* vtkInteractorStyleUser::SafeDownCast |
( |
vtkObject * |
o |
) |
[static] |
|
void vtkInteractorStyleUser::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[virtual] |
|
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkInteractorStyle. |
void vtkInteractorStyleUser::SetMouseMoveMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetMouseMoveMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetButtonPressMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetButtonPressMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetButtonReleaseMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetButtonReleaseMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetKeyPressMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetKeyPressMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetKeyReleaseMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetKeyReleaseMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetCharMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetCharMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetConfigureMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetConfigureMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetExposeMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetExposeMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetEnterMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetEnterMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetLeaveMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetLeaveMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetTimerMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetTimerMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetUserInteractionMethod |
( |
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::SetUserInteractionMethodArgDelete |
( |
void(* |
f)(void *) |
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::StartUserInteraction |
( |
|
) |
|
|
|
For legacy compatibility. Do not use. |
void vtkInteractorStyleUser::EndUserInteraction |
( |
|
) |
|
|
|
For legacy compatibility. Do not use. |
virtual int* vtkInteractorStyleUser::GetLastPos |
( |
|
) |
[virtual] |
|
|
Get the most recent mouse position during mouse motion. In your user interaction method, you must use this to track the mouse movement. Do not use GetEventPosition(), which records the last position where a mouse button was pressed. |
virtual void vtkInteractorStyleUser::GetLastPos |
( |
int & |
, |
|
|
int & |
|
|
) |
[virtual] |
|
|
Get the most recent mouse position during mouse motion. In your user interaction method, you must use this to track the mouse movement. Do not use GetEventPosition(), which records the last position where a mouse button was pressed. |
virtual void vtkInteractorStyleUser::GetLastPos |
( |
int |
[2] |
) |
[virtual] |
|
|
Get the most recent mouse position during mouse motion. In your user interaction method, you must use this to track the mouse movement. Do not use GetEventPosition(), which records the last position where a mouse button was pressed. |
virtual int* vtkInteractorStyleUser::GetOldPos |
( |
|
) |
[virtual] |
|
|
Get the previous mouse position during mouse motion, or after a key press. This can be used to calculate the relative displacement of the mouse. |
virtual void vtkInteractorStyleUser::GetOldPos |
( |
int & |
, |
|
|
int & |
|
|
) |
[virtual] |
|
|
Get the previous mouse position during mouse motion, or after a key press. This can be used to calculate the relative displacement of the mouse. |
virtual void vtkInteractorStyleUser::GetOldPos |
( |
int |
[2] |
) |
[virtual] |
|
|
Get the previous mouse position during mouse motion, or after a key press. This can be used to calculate the relative displacement of the mouse. |
virtual int vtkInteractorStyleUser::GetShiftKey |
( |
|
) |
[virtual] |
|
|
Test whether modifiers were held down when mouse button or key was pressed |
virtual int vtkInteractorStyleUser::GetCtrlKey |
( |
|
) |
[virtual] |
|
|
Test whether modifiers were held down when mouse button or key was pressed |
virtual int vtkInteractorStyleUser::GetChar |
( |
|
) |
[virtual] |
|
|
Get the character for a Char event. |
virtual char* vtkInteractorStyleUser::GetKeySym |
( |
|
) |
[virtual] |
|
|
Get the KeySym (in the same format as Tk KeySyms) for a KeyPress or KeyRelease method. |
virtual int vtkInteractorStyleUser::GetButton |
( |
|
) |
[virtual] |
|
|
Get the mouse button that was last pressed inside the window (returns zero when the button is released). |
virtual void vtkInteractorStyleUser::OnMouseMove |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnLeftButtonDown |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnLeftButtonUp |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnMiddleButtonDown |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnMiddleButtonUp |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnRightButtonDown |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnRightButtonUp |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnChar |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnKeyPress |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnKeyRelease |
( |
|
) |
[virtual] |
|
virtual void vtkInteractorStyleUser::OnExpose |
( |
|
) |
[virtual] |
|
|
These are more esoteric events, but are useful in some cases.
Reimplemented from vtkInteractorStyle. |
virtual void vtkInteractorStyleUser::OnConfigure |
( |
|
) |
[virtual] |
|
|
These are more esoteric events, but are useful in some cases.
Reimplemented from vtkInteractorStyle. |
virtual void vtkInteractorStyleUser::OnEnter |
( |
|
) |
[virtual] |
|
|
These are more esoteric events, but are useful in some cases.
Reimplemented from vtkInteractorStyle. |
virtual void vtkInteractorStyleUser::OnLeave |
( |
|
) |
[virtual] |
|
|
These are more esoteric events, but are useful in some cases.
Reimplemented from vtkInteractorStyle. |
virtual void vtkInteractorStyleUser::OnTimer |
( |
|
) |
[virtual] |
|
|
OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses.
Reimplemented from vtkInteractorStyle. |
void vtkInteractorStyleUser::vtkSetOldCallback |
( |
unsigned long & |
tag, |
|
|
unsigned long |
event, |
|
|
void(* |
f)(void *), |
|
|
void * |
arg |
|
) |
[protected] |
|
void vtkInteractorStyleUser::vtkSetOldDelete |
( |
unsigned long |
tag, |
|
|
void(* |
f)(void *) |
|
) |
[protected] |
|
Member Data Documentation
int vtkInteractorStyleUser::LastPos[2] [protected]
|
|
int vtkInteractorStyleUser::OldPos[2] [protected]
|
|
int vtkInteractorStyleUser::ShiftKey [protected]
|
|
int vtkInteractorStyleUser::CtrlKey [protected]
|
|
int vtkInteractorStyleUser::Char [protected]
|
|
char* vtkInteractorStyleUser::KeySym [protected]
|
|
int vtkInteractorStyleUser::Button [protected]
|
|
unsigned long vtkInteractorStyleUser::MouseMoveTag [protected]
|
|
unsigned long vtkInteractorStyleUser::KeyPressTag [protected]
|
|
unsigned long vtkInteractorStyleUser::KeyReleaseTag [protected]
|
|
unsigned long vtkInteractorStyleUser::CharTag [protected]
|
|
unsigned long vtkInteractorStyleUser::EnterTag [protected]
|
|
unsigned long vtkInteractorStyleUser::LeaveTag [protected]
|
|
unsigned long vtkInteractorStyleUser::ExposeTag [protected]
|
|
unsigned long vtkInteractorStyleUser::ConfigureTag [protected]
|
|
unsigned long vtkInteractorStyleUser::TimerTag [protected]
|
|
unsigned long vtkInteractorStyleUser::UserTag [protected]
|
|
The documentation for this class was generated from the following file: