forked from FNNDSC/KWWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtkKWClipboardHelper.h
56 lines (43 loc) · 1.81 KB
/
vtkKWClipboardHelper.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
/*=========================================================================
Module: vtkKWClipboardHelper.h,v
Copyright (c) Kitware, Inc.
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.
=========================================================================*/
// .NAME vtkKWClipboardHelper - A clipboard class
// .SECTION Description
// This class offers some convenient methods to copy text or vtkImageData onto
// the system clipboard, so that they can be pasted into other applications.
// The system clipboard will be cleared before the new contents are added to it.
#ifndef __vtkKWClipboardHelper_h
#define __vtkKWClipboardHelper_h
#include "vtkObject.h"
#include "vtkKWWidgets.h" // Needed for export symbols directives
class vtkImageData;
class KWWidgets_EXPORT vtkKWClipboardHelper : public vtkObject
{
public:
// Description:
// Standard New and type methods
static vtkKWClipboardHelper* New();
vtkTypeMacro(vtkKWClipboardHelper, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Copy some texts onto the system clipboard.
// Return 1 on success; 0 on failure.
int CopyTextToClipboard(const char* text);
// Copy a vtkImageData onto the system clipboard. The data
// will be converted into a bitmap first.
// Return 1 on success; 0 on failure.
int CopyImageToClipboard(vtkImageData* imgdata);
protected:
vtkKWClipboardHelper();
~vtkKWClipboardHelper();
private:
vtkKWClipboardHelper(const vtkKWClipboardHelper&); // Not implemented
void operator=(const vtkKWClipboardHelper&); // Not implemented
};
#endif