VTK
dox/Common/vtkOutputWindow.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkOutputWindow.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef __vtkOutputWindow_h
00031 #define __vtkOutputWindow_h
00032 
00033 #include "vtkObject.h"
00034 
00035 //BTX
00036 class VTK_COMMON_EXPORT vtkOutputWindowCleanup
00037 {
00038 public:
00039   vtkOutputWindowCleanup();
00040   ~vtkOutputWindowCleanup();
00041 };
00042 //ETX
00043 
00044 class VTK_COMMON_EXPORT vtkOutputWindow : public vtkObject
00045 {
00046 public:
00047 // Methods from vtkObject
00048   vtkTypeMacro(vtkOutputWindow,vtkObject);
00050   virtual void PrintSelf(ostream& os, vtkIndent indent);
00051 
00056   static vtkOutputWindow* New();
00058   static vtkOutputWindow* GetInstance();
00061   static void SetInstance(vtkOutputWindow *instance);
00063 
00066   virtual void DisplayText(const char*);
00067   virtual void DisplayErrorText(const char*);
00068   virtual void DisplayWarningText(const char*);
00069   virtual void DisplayGenericWarningText(const char*);
00071 
00072   virtual void DisplayDebugText(const char*);
00074 
00076   vtkBooleanMacro(PromptUser,int);
00077   vtkSetMacro(PromptUser, int);
00078 //BTX
00079   // use this as a way of memory management when the
00080   // program exits the SmartPointer will be deleted which
00081   // will delete the Instance singleton
00082   static vtkOutputWindowCleanup Cleanup;
00083 //ETX
00084 protected:
00085   vtkOutputWindow();
00086   virtual ~vtkOutputWindow();
00087   int PromptUser;
00088 private:
00089   static vtkOutputWindow* Instance;
00090 private:
00091   vtkOutputWindow(const vtkOutputWindow&);  // Not implemented.
00092   void operator=(const vtkOutputWindow&);  // Not implemented.
00093 };
00095 
00096 #endif