VTK
vtkOutputWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOutputWindow.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef __vtkOutputWindow_h
31 #define __vtkOutputWindow_h
32 
33 #include "vtkObject.h"
34 
35 //BTX
37 {
38 public:
41 };
42 //ETX
43 
45 {
46 public:
47 // Methods from vtkObject
48  vtkTypeMacro(vtkOutputWindow,vtkObject);
50  virtual void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
57  static vtkOutputWindow* New();
58  // Description:
59  // Return the singleton instance with no reference counting.
60  static vtkOutputWindow* GetInstance();
61  // Description:
62  // Supply a user defined output window. Call ->Delete() on the supplied
63  // instance after setting it.
64  static void SetInstance(vtkOutputWindow *instance);
65  // Description:
66  // Display the text. Four virtual methods exist, depending on the type of
67  // message to display. This allows redirection or reformatting of the
68  // messages. The default implementation uses DisplayText for all.
69  virtual void DisplayText(const char*);
70  virtual void DisplayErrorText(const char*);
71  virtual void DisplayWarningText(const char*);
72  virtual void DisplayGenericWarningText(const char*);
74 
75  virtual void DisplayDebugText(const char*);
77 
79  vtkBooleanMacro(PromptUser,int);
80  vtkSetMacro(PromptUser, int);
81 //BTX
82  // use this as a way of memory management when the
83  // program exits the SmartPointer will be deleted which
84  // will delete the Instance singleton
86 //ETX
87 protected:
89  virtual ~vtkOutputWindow();
91 private:
92  static vtkOutputWindow* Instance;
93 private:
94  vtkOutputWindow(const vtkOutputWindow&); // Not implemented.
95  void operator=(const vtkOutputWindow&); // Not implemented.
96 };
98 
99 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
static vtkOutputWindowCleanup Cleanup
#define VTK_COMMON_EXPORT
base class for writing debug output to a console
static vtkObject * New()