ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkWin32OutputWindow.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 /*=========================================================================
00019  *
00020  *  Portions of this file are subject to the VTK Toolkit Version 3 copyright.
00021  *
00022  *  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00023  *
00024  *  For complete copyright, license and disclaimer of warranty information
00025  *  please refer to the NOTICE file at the top of the ITK source tree.
00026  *
00027  *=========================================================================*/
00028 #ifndef __itkWin32OutputWindow_h
00029 #define __itkWin32OutputWindow_h
00030 #if defined(_MSC_VER) || defined(__MINGW32__) // if on Windows
00031 
00032 #include "itkWin32Header.h"
00033 #include "itkOutputWindow.h"
00034 #include "itkObjectFactory.h"
00035 #include "itkWindows.h"
00036 namespace itk
00037 {
00053 class ITKCommon_EXPORT Win32OutputWindow:public OutputWindow
00054 {
00055 public:
00057   typedef Win32OutputWindow          Self;
00058   typedef OutputWindow               Superclass;
00059   typedef SmartPointer< Self >       Pointer;
00060   typedef SmartPointer< const Self > ConstPointer;
00061 
00063   itkNewMacro(Self);
00064 
00066   itkTypeMacro(Win32OutputWindow, OutputWindow);
00067 
00070   virtual void DisplayText(const char *);
00071 
00072   static LRESULT APIENTRY WndProc(HWND hWnd, UINT message,
00073                                   WPARAM wParam, LPARAM lParam);
00074 
00075 protected:
00076   Win32OutputWindow() {}
00077   virtual ~Win32OutputWindow();
00078 
00079   void PromptText(const char *text);
00080 
00081   static void AddText(const char *);
00082 
00083   static int Initialize();
00084 
00085 private:
00086   Win32OutputWindow(const Self &); //purposely not implemented
00087   void operator=(const Self &);    //purposely not implemented
00088 
00089   static HWND m_OutputWindow;
00090 };
00091 } // end namespace itk
00092 
00093 #endif // _MSC_VER
00094 #endif  //  __itkWin32OutputWindow_h
00095