KWWidgets
vtkKWClipboardHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: vtkKWClipboardHelper.h,v
4 
5  Copyright (c) Kitware, Inc.
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 // .NAME vtkKWClipboardHelper - A clipboard class
15 // .SECTION Description
16 // This class offers some convenient methods to copy text or vtkImageData onto
17 // the system clipboard, so that they can be pasted into other applications.
18 // The system clipboard will be cleared before the new contents are added to it.
19 
20 #ifndef __vtkKWClipboardHelper_h
21 #define __vtkKWClipboardHelper_h
22 
23 #include "vtkObject.h"
24 #include "vtkKWWidgets.h" // Needed for export symbols directives
25 
26 class vtkImageData;
27 
28 class KWWidgets_EXPORT vtkKWClipboardHelper : public vtkObject
29 {
30 public:
31  // Description:
32  // Standard New and type methods
33  static vtkKWClipboardHelper* New();
34  vtkTypeRevisionMacro(vtkKWClipboardHelper, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
37  // Description:
38  // Copy some texts onto the system clipboard.
39  // Return 1 on success; 0 on failure.
40  int CopyTextToClipboard(const char* text);
41 
42  // Copy a vtkImageData onto the system clipboard. The data
43  // will be converted into a bitmap first.
44  // Return 1 on success; 0 on failure.
45  int CopyImageToClipboard(vtkImageData* imgdata);
46 
47 protected:
50 
51 private:
52  vtkKWClipboardHelper(const vtkKWClipboardHelper&); // Not implemented
53  void operator=(const vtkKWClipboardHelper&); // Not implemented
54 };
55 
56 #endif