Commit 4a85a50e authored by David Gobbi's avatar David Gobbi
Browse files

Constify the SetWindowInfo parameter

parent 23ec83e4
......@@ -50,8 +50,8 @@ public:
virtual void *GetGenericParentId() = 0;
virtual void *GetGenericContext() = 0;
virtual void *GetGenericDrawable() = 0;
virtual void SetWindowInfo(char *) = 0;
virtual void SetParentInfo(char *) = 0;
virtual void SetWindowInfo(const char *) = 0;
virtual void SetParentInfo(const char *) = 0;
//@}
//@{
......
......@@ -555,9 +555,9 @@ public:
void *GetGenericParentId() override = 0;
void *GetGenericContext() override = 0;
void *GetGenericDrawable() override = 0;
void SetWindowInfo(char *) override = 0;
virtual void SetNextWindowInfo(char *) = 0;
void SetParentInfo(char *) override = 0;
void SetWindowInfo(const char *) override = 0;
virtual void SetNextWindowInfo(const char *) = 0;
void SetParentInfo(const char *) override = 0;
//@}
/**
......
......@@ -134,7 +134,7 @@ public:
*/
void SetWindowName(const char *) override;
void SetNextWindowInfo(char *) override
void SetNextWindowInfo(const char *) override
{
vtkWarningMacro("SetNextWindowInfo not implemented (WindowRemap not implemented).");
}
......@@ -158,14 +158,14 @@ public:
* The parameter is an ASCII string of a decimal number representing
* a pointer to the window.
*/
void SetWindowInfo(char*) override;
void SetWindowInfo(const char*) override;
/**
* See the documentation for SetParentId(). This method allows the ParentId
* to be set as an ASCII string of a decimal number that is the memory
* address of the parent NSView.
*/
void SetParentInfo(char*) override;
void SetParentInfo(const char*) override;
void SetNextWindowId(void*) override
{
......
......@@ -1523,7 +1523,7 @@ void vtkCocoaRenderWindow::SetCocoaManager(void *manager)
}
//----------------------------------------------------------------------------
void vtkCocoaRenderWindow::SetWindowInfo(char *info)
void vtkCocoaRenderWindow::SetWindowInfo(const char *info)
{
// The parameter is an ASCII string of a decimal number representing
// a pointer to the window. Convert it back to a pointer.
......@@ -1537,7 +1537,7 @@ void vtkCocoaRenderWindow::SetWindowInfo(char *info)
}
//----------------------------------------------------------------------------
void vtkCocoaRenderWindow::SetParentInfo(char *info)
void vtkCocoaRenderWindow::SetParentInfo(const char *info)
{
// The parameter is an ASCII string of a decimal number representing
// a pointer to the window. Convert it back to a pointer.
......
......@@ -623,7 +623,7 @@ void vtkEGLRenderWindow::SetPosition(int x, int y)
}
// Set this RenderWindow to a pre-existing window.
void vtkEGLRenderWindow::SetWindowInfo(char *)
void vtkEGLRenderWindow::SetWindowInfo(const char *)
{
this->OwnWindow = 0;
this->Mapped = 1;
......
......@@ -141,9 +141,9 @@ public:
virtual void *GetGenericParentId() {return NULL;}
virtual void *GetGenericContext();
virtual void *GetGenericDrawable() {return NULL;}
virtual void SetWindowInfo(char *);
virtual void SetNextWindowInfo(char *) {}
virtual void SetParentInfo(char *) {}
virtual void SetWindowInfo(const char *);
virtual void SetNextWindowInfo(const char *) {}
virtual void SetParentInfo(const char *) {}
//@}
void SetWindowName(const char *);
......
......@@ -162,11 +162,11 @@ void* vtkGenericOpenGLRenderWindow::GetGenericDrawable()
return nullptr;
}
void vtkGenericOpenGLRenderWindow::SetWindowInfo(char*)
void vtkGenericOpenGLRenderWindow::SetWindowInfo(const char*)
{
}
void vtkGenericOpenGLRenderWindow::SetParentInfo(char*)
void vtkGenericOpenGLRenderWindow::SetParentInfo(const char*)
{
}
......@@ -204,7 +204,7 @@ void vtkGenericOpenGLRenderWindow::SetNextWindowId(void*)
{
}
void vtkGenericOpenGLRenderWindow::SetNextWindowInfo(char*)
void vtkGenericOpenGLRenderWindow::SetNextWindowInfo(const char*)
{
}
......
......@@ -94,8 +94,8 @@ public:
void* GetGenericParentId() override;
void* GetGenericContext() override;
void* GetGenericDrawable() override;
void SetWindowInfo(char*) override;
void SetParentInfo(char*) override;
void SetWindowInfo(const char*) override;
void SetParentInfo(const char*) override;
int* GetScreenSize() VTK_SIZEHINT(2) override;
void Start() override;
void HideCursor() override;
......@@ -104,7 +104,7 @@ public:
void WindowRemap() override;
int GetEventPending() override;
void SetNextWindowId(void*) override;
void SetNextWindowInfo(char*) override;
void SetNextWindowInfo(const char*) override;
void CreateAWindow() override;
void DestroyWindow() override;
// }@
......
......@@ -133,7 +133,7 @@ public:
*/
void SetWindowName(const char *) override;
void SetNextWindowInfo(char *) override
void SetNextWindowInfo(const char *) override
{
vtkWarningMacro("SetNextWindowInfo not implemented (WindowRemap not implemented).");
}
......@@ -157,14 +157,14 @@ public:
* The parameter is an ASCII string of a decimal number representing
* a pointer to the window.
*/
void SetWindowInfo(char*) override;
void SetWindowInfo(const char*) override;
/**
* See the documentation for SetParentId(). This method allows the ParentId
* to be set as an ASCII string of a decimal number that is the memory
* address of the parent UIView.
*/
void SetParentInfo(char*) override;
void SetParentInfo(const char*) override;
void SetNextWindowId(void*) override
{
......
......@@ -416,7 +416,7 @@ void vtkOSOpenGLRenderWindow::SetPosition(int x, int y)
}
// Set this RenderWindow's X window id to a pre-existing window.
void vtkOSOpenGLRenderWindow::SetWindowInfo(char *info)
void vtkOSOpenGLRenderWindow::SetWindowInfo(const char *info)
{
int tmp;
......@@ -427,7 +427,7 @@ void vtkOSOpenGLRenderWindow::SetWindowInfo(char *info)
}
// Set this RenderWindow's X window id to a pre-existing window.
void vtkOSOpenGLRenderWindow::SetNextWindowInfo(char *info)
void vtkOSOpenGLRenderWindow::SetNextWindowInfo(const char *info)
{
int tmp;
sscanf(info,"%i",&tmp);
......@@ -436,7 +436,7 @@ void vtkOSOpenGLRenderWindow::SetNextWindowInfo(char *info)
}
// Sets the X window id of the window that WILL BE created.
void vtkOSOpenGLRenderWindow::SetParentInfo(char *info)
void vtkOSOpenGLRenderWindow::SetParentInfo(const char *info)
{
int tmp;
......
......@@ -206,17 +206,17 @@ public:
/**
* Set this RenderWindow's X window id to a pre-existing window.
*/
void SetWindowInfo(char *info);
void SetWindowInfo(const char *info);
/**
* Set the window info that will be used after WindowRemap()
*/
void SetNextWindowInfo(char *info);
void SetNextWindowInfo(const char *info);
/**
* Sets the X window id of the window that WILL BE created.
*/
void SetParentInfo(char *info);
void SetParentInfo(const char *info);
/**
* Render without displaying the window.
......
......@@ -1333,7 +1333,7 @@ void vtkWin32OpenGLRenderWindow::SetWindowId(HWND arg)
}
// Set this RenderWindow's X window id to a pre-existing window.
void vtkWin32OpenGLRenderWindow::SetWindowInfo(char *info)
void vtkWin32OpenGLRenderWindow::SetWindowInfo(const char *info)
{
int tmp;
......@@ -1343,7 +1343,7 @@ void vtkWin32OpenGLRenderWindow::SetWindowInfo(char *info)
vtkDebugMacro(<< "Setting WindowId to " << this->WindowId << "\n");
}
void vtkWin32OpenGLRenderWindow::SetNextWindowInfo(char *info)
void vtkWin32OpenGLRenderWindow::SetNextWindowInfo(const char *info)
{
int tmp;
......@@ -1369,7 +1369,7 @@ void vtkWin32OpenGLRenderWindow::SetDeviceContext(HDC arg)
}
// Sets the HWND id of the window that WILL BE created.
void vtkWin32OpenGLRenderWindow::SetParentInfo(char *info)
void vtkWin32OpenGLRenderWindow::SetParentInfo(const char *info)
{
int tmp;
......
......@@ -124,17 +124,17 @@ public:
/**
* Set this RenderWindow's window id to a pre-existing window.
*/
void SetWindowInfo(char *) override;
void SetWindowInfo(const char *) override;
/**
* Sets the WindowInfo that will be used after a WindowRemap.
*/
void SetNextWindowInfo(char *) override;
void SetNextWindowInfo(const char *) override;
/**
* Sets the HWND id of the window that WILL BE created.
*/
void SetParentInfo(char *) override;
void SetParentInfo(const char *) override;
void *GetGenericDisplayId() override {return (void *)this->ContextId;}
void *GetGenericWindowId() override {return (void *)this->WindowId;}
......
......@@ -1375,7 +1375,7 @@ void vtkXOpenGLRenderWindow::SetWindowId(Window arg)
}
// Set this RenderWindow's X window id to a pre-existing window.
void vtkXOpenGLRenderWindow::SetWindowInfo(char *info)
void vtkXOpenGLRenderWindow::SetWindowInfo(const char *info)
{
int tmp;
......@@ -1401,7 +1401,7 @@ void vtkXOpenGLRenderWindow::SetWindowInfo(char *info)
}
// Set this RenderWindow's X window id to a pre-existing window.
void vtkXOpenGLRenderWindow::SetNextWindowInfo(char *info)
void vtkXOpenGLRenderWindow::SetNextWindowInfo(const char *info)
{
int tmp;
sscanf(info,"%i",&tmp);
......@@ -1410,7 +1410,7 @@ void vtkXOpenGLRenderWindow::SetNextWindowInfo(char *info)
}
// Sets the X window id of the window that WILL BE created.
void vtkXOpenGLRenderWindow::SetParentInfo(char *info)
void vtkXOpenGLRenderWindow::SetParentInfo(const char *info)
{
int tmp;
......
......@@ -267,17 +267,17 @@ public:
/**
* Set this RenderWindow's X window id to a pre-existing window.
*/
void SetWindowInfo(char *info) override;
void SetWindowInfo(const char *info) override;
/**
* Set the window info that will be used after WindowRemap()
*/
void SetNextWindowInfo(char *info) override;
void SetNextWindowInfo(const char *info) override;
/**
* Sets the X window id of the window that WILL BE created.
*/
void SetParentInfo(char *info) override;
void SetParentInfo(const char *info) override;
/**
* This computes the size of the render window
......
......@@ -260,9 +260,9 @@ public:
//@}
// implement required virtual functions
void SetWindowInfo(char *) {};
void SetNextWindowInfo(char *) {};
void SetParentInfo(char *) {};
void SetWindowInfo(const char *) {};
void SetNextWindowInfo(const char *) {};
void SetParentInfo(const char *) {};
virtual void *GetGenericDisplayId() {return (void *)this->HelperWindow->GetGenericDisplayId();};
virtual void *GetGenericWindowId() {return (void *)this->HelperWindow->GetGenericWindowId();};
virtual void *GetGenericParentId() {return (void *)nullptr;};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment