Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkOutputWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOutputWindow.h,v $
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 =========================================================================*/
00027 #ifndef __vtkOutputWindow_h
00028 #define __vtkOutputWindow_h
00029 
00030 #include "vtkObject.h"
00031 
00032 //BTX
00033 
00034 class VTK_COMMON_EXPORT vtkOutputWindow;
00035 
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   vtkTypeRevisionMacro(vtkOutputWindow,vtkObject);
00050   virtual void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00057   static vtkOutputWindow* New();
00058   // Description:
00059   // Return the singleton instance with no reference counting.
00060   static vtkOutputWindow* GetInstance();
00061   // Description:
00062   // Supply a user defined output window. Call ->Delete() on the supplied
00063   // instance after setting it.
00064   static void SetInstance(vtkOutputWindow *instance);
00065   // Description:
00066   // Display the text. Four virtual methods exist, depending on the type of
00067   // message to display. This allows redirection or reformatting of the
00068   // messages. The default implementation uses DisplayText for all.
00069   virtual void DisplayText(const char*);
00070   virtual void DisplayErrorText(const char*);
00071   virtual void DisplayWarningText(const char*);
00072   virtual void DisplayGenericWarningText(const char*);
00074 
00075   virtual void DisplayDebugText(const char*);
00077 
00079   vtkBooleanMacro(PromptUser,int);
00080   vtkSetMacro(PromptUser, int);
00082 //BTX
00083   // use this as a way of memory management when the
00084   // program exits the SmartPointer will be deleted which
00085   // will delete the Instance singleton
00086   static vtkOutputWindowCleanup Cleanup;
00087 //ETX
00088 protected:
00089   vtkOutputWindow();
00090   virtual ~vtkOutputWindow();
00091   int PromptUser;
00092 private:
00093   static vtkOutputWindow* Instance;
00094 private:
00095   vtkOutputWindow(const vtkOutputWindow&);  // Not implemented.
00096   void operator=(const vtkOutputWindow&);  // Not implemented.
00097 };
00098 
00099 #endif

Generated on Mon Jan 21 23:07:17 2008 for VTK by  doxygen 1.4.3-20050530