Salome HOME
PARAVIS HTML docs
[modules/paravis.git] / src / PVGUI / PVGUI_OutputWindowAdapter.h
1
2
3 #ifndef _PVGUI_OutputWindowAdapter_h
4 #define _PVGUI_OutputWindowAdapter_h
5
6 #include <vtkOutputWindow.h>
7
8 /*!
9 vtkOutputWindow implementation that puts VTK output messages to SALOME log window.
10
11 To use, create an instance of PVGUI_OutputWindowAdapter and pass it to the
12 vtkOutputWindow::setInstance() static method.
13
14 This class is based on pqOutputWindow ParaView class.
15 */
16 class PVGUI_OutputWindowAdapter : public vtkOutputWindow
17 {
18 public:
19   static PVGUI_OutputWindowAdapter *New();
20   vtkTypeRevisionMacro(PVGUI_OutputWindowAdapter, vtkOutputWindow);
21
22   //! Returns the number of text messages received
23   const unsigned int getTextCount();
24   //! Returns the number of error messages received
25   const unsigned int getErrorCount();
26   //! Returns the number of warning messages received
27   const unsigned int getWarningCount();
28   //! Returns the number of generic warning messages received
29   const unsigned int getGenericWarningCount();
30
31 private:
32   PVGUI_OutputWindowAdapter();
33   PVGUI_OutputWindowAdapter(const PVGUI_OutputWindowAdapter&);
34   PVGUI_OutputWindowAdapter& operator=(const PVGUI_OutputWindowAdapter&);
35   ~PVGUI_OutputWindowAdapter();
36
37   unsigned int TextCount;
38   unsigned int ErrorCount;
39   unsigned int WarningCount;
40   unsigned int GenericWarningCount;
41
42   virtual void DisplayText(const char*);
43   virtual void DisplayErrorText(const char*);
44   virtual void DisplayWarningText(const char*);
45   virtual void DisplayGenericWarningText(const char*);
46 };
47
48 #endif // !_PVGUI_OutputWindowAdapter_h