File: vtkKWClipboardHelper.h

package info (click to toggle)
kwwidgets 1.0.0~cvs20090825-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 14,108 kB
  • ctags: 15,770
  • sloc: cpp: 128,146; ansic: 44,137; tcl: 30,595; python: 2,283; sh: 338; makefile: 69; xml: 10
file content (56 lines) | stat: -rw-r--r-- 1,863 bytes parent folder | download | duplicates (2)
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();
  vtkTypeRevisionMacro(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