VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Common
vtkCommand.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCommand.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
204
#ifndef __vtkCommand_h
205
#define __vtkCommand_h
206
207
#include "
vtkObjectBase.h
"
208
#include "
vtkObject.h
"
// Need vtkTypeMacro
209
210
// The superclass that all commands should be subclasses of
211
class
VTK_COMMON_EXPORT
vtkCommand
:
public
vtkObjectBase
212
{
213
public
:
214
vtkTypeMacro(
vtkCommand
,
vtkObjectBase
);
215
217
220
void
UnRegister
();
221
virtual
void
UnRegister
(
vtkObjectBase
*)
222
{ this->
UnRegister
(); }
224
226
235
virtual
void
Execute(
vtkObject
*caller,
unsigned
long
eventId,
236
void
*callData) = 0;
238
240
242
static
const
char
*GetStringFromEventId(
unsigned
long
event);
243
static
unsigned
long
GetEventIdFromString(
const
char
*event);
245
247
249
void
SetAbortFlag(
int
f)
250
{ this->AbortFlag = f; }
251
int
GetAbortFlag()
252
{
return
this->AbortFlag; }
253
void
AbortFlagOn()
254
{ this->SetAbortFlag(1); }
255
void
AbortFlagOff()
256
{ this->SetAbortFlag(0); }
258
260
264
void
SetPassiveObserver(
int
f)
265
{ this->PassiveObserver = f; }
266
int
GetPassiveObserver()
267
{
return
this->PassiveObserver; }
268
void
PassiveObserverOn()
269
{ this->SetPassiveObserver(1); }
270
void
PassiveObserverOff()
271
{ this->SetPassiveObserver(0); }
273
274
//BTX
276
280
enum
EventIds
{
281
NoEvent = 0,
282
AnyEvent
,
283
DeleteEvent
,
284
StartEvent
,
285
EndEvent
,
286
RenderEvent
,
287
ProgressEvent
,
288
PickEvent
,
289
StartPickEvent
,
290
EndPickEvent
,
291
AbortCheckEvent
,
292
ExitEvent
,
293
LeftButtonPressEvent
,
294
LeftButtonReleaseEvent
,
295
MiddleButtonPressEvent
,
296
MiddleButtonReleaseEvent
,
297
RightButtonPressEvent
,
298
RightButtonReleaseEvent
,
299
EnterEvent
,
300
LeaveEvent
,
301
KeyPressEvent
,
302
KeyReleaseEvent
,
303
CharEvent
,
304
ExposeEvent
,
305
ConfigureEvent
,
306
TimerEvent
,
307
MouseMoveEvent
,
308
MouseWheelForwardEvent
,
309
MouseWheelBackwardEvent
,
310
ActiveCameraEvent
,
311
CreateCameraEvent
,
312
ResetCameraEvent
,
313
ResetCameraClippingRangeEvent
,
314
ModifiedEvent
,
315
WindowLevelEvent
,
316
StartWindowLevelEvent
,
317
EndWindowLevelEvent
,
318
ResetWindowLevelEvent
,
319
SetOutputEvent
,
320
ErrorEvent
,
321
WarningEvent
,
322
StartInteractionEvent
,
//mainly used by vtkInteractorObservers
323
InteractionEvent
,
324
EndInteractionEvent
,
325
EnableEvent
,
326
DisableEvent
,
327
CreateTimerEvent
,
328
DestroyTimerEvent
,
329
PlacePointEvent
,
330
PlaceWidgetEvent
,
331
CursorChangedEvent
,
332
ExecuteInformationEvent
,
333
RenderWindowMessageEvent
,
334
WrongTagEvent
,
335
StartAnimationCueEvent
,
// used by vtkAnimationCue
336
AnimationCueTickEvent
,
337
EndAnimationCueEvent
,
338
VolumeMapperRenderEndEvent
,
339
VolumeMapperRenderProgressEvent
,
340
VolumeMapperRenderStartEvent
,
341
VolumeMapperComputeGradientsEndEvent
,
342
VolumeMapperComputeGradientsProgressEvent
,
343
VolumeMapperComputeGradientsStartEvent
,
344
WidgetModifiedEvent
,
345
WidgetValueChangedEvent
,
346
WidgetActivateEvent
,
347
ConnectionCreatedEvent
,
348
ConnectionClosedEvent
,
349
DomainModifiedEvent
,
350
PropertyModifiedEvent
,
351
UpdateEvent
,
352
RegisterEvent
,
353
UnRegisterEvent
,
354
UpdateInformationEvent
,
355
AnnotationChangedEvent
,
356
SelectionChangedEvent
,
357
UpdatePropertyEvent
,
358
ViewProgressEvent
,
359
UpdateDataEvent
,
360
CurrentChangedEvent
,
361
ComputeVisiblePropBoundsEvent
,
362
TDxMotionEvent
,
// 3D Connexion device event
363
TDxButtonPressEvent
,
// 3D Connexion device event
364
TDxButtonReleaseEvent
,
// 3D Connexion device event
365
HoverEvent
,
366
LoadStateEvent
,
367
SaveStateEvent
,
368
StateChangedEvent
,
369
WindowMakeCurrentEvent
,
370
WindowIsCurrentEvent
,
371
WindowFrameEvent
,
372
HighlightEvent
,
373
WindowSupportsOpenGLEvent
,
374
WindowIsDirectEvent
,
375
UserEvent = 1000
376
};
377
//ETX
379
380
protected
:
381
int
AbortFlag
;
382
int
PassiveObserver
;
383
384
vtkCommand
();
385
virtual
~vtkCommand
() {}
386
387
friend
class
vtkSubjectHelper;
388
//BTX
389
vtkCommand
(
const
vtkCommand
& c) :
vtkObjectBase
(c) {}
390
void
operator=
(
const
vtkCommand
&) {}
391
//ETX
392
};
393
394
#endif
/* __vtkCommand_h */
395
Generated on Thu Mar 13 2014 08:09:43 for VTK by
1.8.1.2