00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKSTATUSBAR_H 00020 #define MITKSTATUSBAR_H 00021 #include <itkObject.h> 00022 #include "mitkCommon.h" 00023 #include "mitkStatusBarImplementation.h" 00024 00025 00026 namespace mitk { 00027 //##Documentation 00028 //## @brief Sending a message to the applications StatusBar 00029 //## 00030 //## Holds a GUI dependent StatusBarImplementation and sends the text further. 00031 //## nearly equal to itk::OutputWindow, 00032 //## no Window, but one line of text and a delay for clear. 00033 //## all mitk-classes use this class to display text on GUI-StatusBar. 00034 //## The mainapplication has to set the internal held StatusBarImplementation with SetInstance(..). 00035 //## @ingroup Interaction 00036 class MITK_CORE_EXPORT StatusBar : public itk::Object 00037 { 00038 public: 00039 itkTypeMacro(StatusBar, itk::Object); 00040 00041 //##Documentation 00042 //## @brief static method to get the GUI dependent StatusBar-instance 00043 //## so the methods DisplayText, etc. can be called 00044 //## No reference counting, cause of decentral static use! 00045 static StatusBar* GetInstance(); 00046 00047 //##Documentation 00048 //## @brief Supply a GUI- dependent StatusBar. Has to be set by the application 00049 //## to connect the application dependent subclass of mitkStatusBar 00050 //## if you create an instance, then call ->Delete() on the supplied 00051 //## instance after setting it. 00052 static void SetImplementation(StatusBarImplementation* instance); 00053 00054 //##Documentation 00055 //## @brief Send a string to the applications StatusBar 00056 void DisplayText(const char* t); 00057 //##Documentation 00058 //## @brief Send a string with a time delay to the applications StatusBar 00059 void DisplayText(const char* t, int ms); 00060 void DisplayErrorText(const char *t); 00061 void DisplayWarningText(const char *t); 00062 void DisplayWarningText(const char *t, int ms); 00063 void DisplayGenericOutputText(const char *t); 00064 void DisplayDebugText(const char *t); 00065 void DisplayGreyValueText(const char *t); 00066 00067 //##Documentation 00068 //## @brief removes any temporary message being shown. 00069 void Clear(); 00070 00071 //##Documentation 00072 //## @brief Set the SizeGrip of the window 00073 //## (the triangle in the lower right Windowcorner for changing the size) 00074 //## to enabled or disabled 00075 void SetSizeGripEnabled(bool enable); 00076 00077 protected: 00078 StatusBar(); 00079 virtual ~StatusBar(); 00080 static StatusBarImplementation* m_Implementation; 00081 static StatusBar* m_Instance; 00082 }; 00083 00084 }// end namespace mitk 00085 #endif /* define MITKSTATUSBAR_H */