VTK  9.1.0
vtkXRenderWindowInteractor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkXRenderWindowInteractor.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=========================================================================*/
29#ifndef vtkXRenderWindowInteractor_h
30#define vtkXRenderWindowInteractor_h
31
32//===========================================================
33// now we define the C++ class
34
36#include "vtkRenderingUIModule.h" // For export macro
37#include <X11/Xlib.h> // Needed for X types in the public interface
38
40class vtkXRenderWindowInteractorInternals;
41
42class VTKRENDERINGUI_EXPORT vtkXRenderWindowInteractor : public vtkRenderWindowInteractor
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
54 void Initialize() override;
55
59 void TerminateApp() override;
60
66 void ProcessEvents() override;
67
69
78 void Enable() override;
79 void Disable() override;
81
86 void UpdateSize(int, int) override;
87
91 void GetMousePosition(int* x, int* y) override;
92
93 void DispatchEvent(XEvent*);
94
95protected:
98
103 void UpdateSizeNoXResize(int, int);
104
105 // Using static here to avoid destroying context when many apps are open:
107
108 Display* DisplayId;
109 Window WindowId;
111 int PositionBeforeStereo[2];
112 vtkXRenderWindowInteractorInternals* Internal;
113
114 // Drag and drop related
126
128
132 int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
133 int InternalDestroyTimer(int platformTimerId) override;
135
137
143 void StartEventLoop() override;
144
145private:
147 void operator=(const vtkXRenderWindowInteractor&) = delete;
148};
149
150#endif
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:113
platform-independent render window interaction including picking and frame rate control.
an X event driven interface for a RenderWindow
void TerminateApp() override
Break the event loop on 'q','e' keypress.
void UpdateSize(int, int) override
Update the Size data member and set the associated RenderWindow's size.
void Initialize() override
Initializes the event handlers without an XtAppContext.
int InternalDestroyTimer(int platformTimerId) override
X-specific internal timer methods.
void StartEventLoop() override
This will start up the X event loop and never return.
int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override
X-specific internal timer methods.
void ProcessEvents() override
Run the event loop and return.
void UpdateSizeNoXResize(int, int)
Update the Size data member and set the associated RenderWindow's size but do not resize the XWindow.
static vtkXRenderWindowInteractor * New()
void DispatchEvent(XEvent *)
~vtkXRenderWindowInteractor() override
void Enable() override
Enable/Disable interactions.
void GetMousePosition(int *x, int *y) override
Re-defines virtual function to get mouse position by querying X-server.
vtkXRenderWindowInteractorInternals * Internal
void Disable() override
Enable/Disable interactions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.