30 #ifndef vtkCocoaRenderWindow_h
31 #define vtkCocoaRenderWindow_h
34 #include "vtkRenderingOpenGL2Module.h"
38 VTK_ABI_NAMESPACE_BEGIN
52 void Start()
override;
57 void Frame()
override;
62 virtual void WindowConfigure();
91 virtual void PrefFullScreen();
118 void SetPosition(
int x,
int y) override;
119 void SetPosition(
int a[2])
override { this->
SetPosition(a[0], a[1]); }
138 void SetWindowName(const
char*) override;
140 void SetNextWindowInfo(const
char*)
override
142 vtkDebugMacro(
"SetNextWindowInfo not implemented (WindowRemap not implemented).");
146 vtkDebugMacro(
"Method not implemented.");
159 this->DisplayIndex = displayId ? *(
reinterpret_cast<int*
>(displayId)) : 0;
164 vtkDebugMacro(
"Method not implemented.");
184 vtkDebugMacro(
"SetNextWindowId not implemented (WindowRemap not implemented).");
224 void UpdateContext();
253 virtual void SetupPalette(
void* hDC);
254 virtual void SetupPixelFormat(
void* hDC,
void* dwFlags,
int debug,
int bpp = 16,
int zbpp = 16);
296 void SetContextId(
void*);
298 void* GetContextId();
299 void* GetGenericContext()
override {
return this->GetContextId(); }
313 virtual
void SetRootWindow(
void*);
319 virtual
void* GetRootWindow();
332 void SetWindowId(
void*) override;
338 virtual
void* GetWindowId();
339 void* GetGenericWindowId()
override {
return this->GetWindowId(); }
348 void SetParentId(
void* nsview) override;
356 virtual
void* GetParentId();
357 void* GetGenericParentId()
override {
return this->GetParentId(); }
369 void SetWantsBestResolution(
bool wantsBest);
370 bool GetWantsBestResolution();
378 void SetConnectContextToNSView(
bool connect);
379 bool GetConnectContextToNSView();
386 void SetPixelFormat(
void* pixelFormat);
388 void* GetPixelFormat();
399 void PushContext() override;
400 void PopContext() override;
403 void Render() override;
407 ~vtkCocoaRenderWindow() override;
409 std::stack<
void*> ContextStack;
411 void CreateGLContext();
413 void CreateAWindow() override;
414 void DestroyWindow() override;
422 void SetCocoaManager(
void* manager);
423 void* GetCocoaManager();
426 void SetCocoaServer(
void* server);
427 void* GetCocoaServer();
430 vtkCocoaRenderWindow(const vtkCocoaRenderWindow&) = delete;
431 void operator=(const vtkCocoaRenderWindow&) = delete;
448 bool WantsBestResolution;
449 bool ConnectContextToNSView;
451 int DisplayIndex = 0;
454 #define vtkCocoaRenderWindow_OVERRIDE_ATTRIBUTES vtkCocoaRenderWindow::CreateOverrideAttributes()
455 VTK_ABI_NAMESPACE_END
virtual void SetCursorPosition(int, int)
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void SetForceMakeCurrent()
If called, allow MakeCurrent() to skip cache-check when called.
Attribute for vtkObjectFactory overrides.
virtual void HideCursor()
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
virtual void SetFullScreen(vtkTypeBool)
Turn on/off rendering full screen window size.
virtual void WindowRemap()
Remap the rendering window.
Cocoa OpenGL rendering window.
bool InitializeFromCurrentContext() override
Initialize the render window from the information associated with the currently activated OpenGL cont...
void SetWindowInfo(const char *) override
Dummy stubs for vtkWindow API.
virtual bool IsCurrent()
Tells if this window is the current graphics context for the calling thread.
virtual void Finalize()
Finalize the rendering process.
void SetNextWindowId(void *) override
Dummy stubs for vtkWindow API.
virtual void SetStereoCapableWindow(vtkTypeBool capable)
Prescribe that the window be created in a stereo-capable mode.
void SetDisplayId(void *displayId) override
Set the index of the NSScreen on which the window should be created.
static vtkOpenGLRenderWindow * New()
void SetPosition(int a[2]) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
virtual void SetSize(int width, int height)
Set the size (width and height) of the rendering window in screen coordinates (in pixels)...
a simple class to control print indentation
void Start() override
Begin the rendering process.
void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
virtual int * GetScreenSize()
Get the current size of the screen in pixels.
void Initialize() override
Initialize the rendering window.
static vtkOverrideAttribute * CreateOverrideAttributes()
virtual void MakeCurrent()
Make the window current.
#define VTK_SIZEHINT(...)
const char * ReportCapabilities() override
Get report of capabilities for the render window.
#define VTK_MARSHALEXCLUDE(reason)
void Frame() override
A termination method performed at the end of the rendering process to do things like swapping buffers...
virtual int * GetSize()
Get the size (width and height) of the rendering window in screen coordinates (in pixels)...
virtual vtkTypeBool GetEventPending()
Check to see if a mouse button has been pressed.
virtual void ReleaseCurrent()
Release the current context.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSize(int a[2]) override
Set the size (width and height) of the rendering window in screen coordinates (in pixels)...
bool GetPlatformSupportsRenderWindowSharing() override
Does this platform support render window data sharing.
virtual void ShowCursor()
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
void SetParentInfo(const char *) override
Dummy stubs for vtkWindow API.
virtual void SetCurrentCursor(int)
Change the shape of the cursor.
virtual vtkTypeBool IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.