VTK
dox/Common/Core/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 "vtkCommonCoreModule.h" // For export macro
00034 #include "vtkObject.h"
00035 
00036 //BTX
00037 class VTKCOMMONCORE_EXPORT vtkOutputWindowCleanup
00038 {
00039 public:
00040   vtkOutputWindowCleanup();
00041   ~vtkOutputWindowCleanup();
00042 };
00043 //ETX
00044 
00045 class VTKCOMMONCORE_EXPORT vtkOutputWindow : public vtkObject
00046 {
00047 public:
00048 // Methods from vtkObject
00049   vtkTypeMacro(vtkOutputWindow,vtkObject);
00051   virtual void PrintSelf(ostream& os, vtkIndent indent);
00052 
00057   static vtkOutputWindow* New();
00059   static vtkOutputWindow* GetInstance();
00062   static void SetInstance(vtkOutputWindow *instance);
00064 
00067   virtual void DisplayText(const char*);
00068   virtual void DisplayErrorText(const char*);
00069   virtual void DisplayWarningText(const char*);
00070   virtual void DisplayGenericWarningText(const char*);
00072 
00073   virtual void DisplayDebugText(const char*);
00075 
00077   vtkBooleanMacro(PromptUser,int);
00078   vtkSetMacro(PromptUser, int);
00079 //BTX
00080   // use this as a way of memory management when the
00081   // program exits the SmartPointer will be deleted which
00082   // will delete the Instance singleton
00083   static vtkOutputWindowCleanup Cleanup;
00084 //ETX
00085 protected:
00086   vtkOutputWindow();
00087   virtual ~vtkOutputWindow();
00088   int PromptUser;
00089 private:
00090   static vtkOutputWindow* Instance;
00091 private:
00092   vtkOutputWindow(const vtkOutputWindow&);  // Not implemented.
00093   void operator=(const vtkOutputWindow&);  // Not implemented.
00094 };
00096 
00097 #endif