forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkCocoaTkUtilities.h
63 lines (51 loc) · 1.85 KB
/
vtkCocoaTkUtilities.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*=========================================================================
Program: Visualization Toolkit
Module: vtkCocoaTkUtilities.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkCocoaTkUtilities
* @brief Internal Tk Routines for Cocoa
*
*
* vtkCocoaTkUtilities provide access to the Tk internals for Cocoa
* implementations of Tk. These internals must be implemented in a .mm
* file, since Cocoa is Objective-C, but the header file itself is
* pure C++ so that it can be included by other VTK classes.
*
* @sa
* vtkCocoaGLView
*
* @warning
* This header must be in C++ only because it is included by .cxx files.
* That means no Objective-C may be used. That's why some instance variables
* are void* instead of what they really should be.
*/
#ifndef vtkCocoaTkUtilities_h
#define vtkCocoaTkUtilities_h
#include "vtkObject.h"
struct Tk_Window_;
class vtkCocoaTkUtilities : public vtkObject
{
public:
static vtkCocoaTkUtilities *New();
vtkTypeMacro(vtkCocoaTkUtilities,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
* Return the NSView for a Tk_Window. It is returned as a void pointer
* so that users of this function don't need to compile as Objective C.
*/
static void* GetDrawableView(Tk_Window_ *window);
protected:
vtkCocoaTkUtilities() {}
~vtkCocoaTkUtilities() override {}
private:
vtkCocoaTkUtilities(const vtkCocoaTkUtilities&) = delete;
void operator=(const vtkCocoaTkUtilities&) = delete;
};
#endif