00001 /*========================================================================= 00002 Program: bbtk 00003 Module: $RCSfile: bbtkWxGUIOutputMessages.h,v $ 00004 Language: C++ 00005 Date: $Date: 2009/12/09 08:46:21 $ 00006 Version: $Revision: 1.4 $ 00007 =========================================================================*/ 00008 00009 /* --------------------------------------------------------------------- 00010 00011 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale) 00012 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux 00013 * 00014 * This software is governed by the CeCILL-B license under French law and 00015 * abiding by the rules of distribution of free software. You can use, 00016 * modify and/ or redistribute the software under the terms of the CeCILL-B 00017 * license as circulated by CEA, CNRS and INRIA at the following URL 00018 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 00019 * or in the file LICENSE.txt. 00020 * 00021 * As a counterpart to the access to the source code and rights to copy, 00022 * modify and redistribute granted by the license, users are provided only 00023 * with a limited warranty and the software's author, the holder of the 00024 * economic rights, and the successive licensors have only limited 00025 * liability. 00026 * 00027 * The fact that you are presently reading this means that you have had 00028 * knowledge of the CeCILL-B license and that you accept its terms. 00029 * ------------------------------------------------------------------------ */ 00030 00031 00048 #ifdef _USE_WXWIDGETS_ 00049 00050 00051 #ifndef __bbtkWxGUIOutputMessages_h__ 00052 #define __bbtkWxGUIOutputMessages_h__ 00053 00054 #include "bbtkWx.h" 00055 00056 00057 namespace bbtk 00058 { 00059 00061 class BBTK_EXPORT WxGUIOutputMessagesUser 00062 { 00063 public: 00064 WxGUIOutputMessagesUser() {} 00065 virtual ~WxGUIOutputMessagesUser() {} 00067 virtual void WxGUIOutputMessagesEnter(const std::string& command) {} 00068 }; 00069 00070 00071 // Forward decl 00072 class WxStreamRedirector; 00073 00075 class BBTK_EXPORT WxGUIOutputMessages : public wxPanel 00076 { 00077 public: 00078 WxGUIOutputMessages(wxWindow *parent, WxGUIOutputMessagesUser* user = 0); 00079 ~WxGUIOutputMessages(); 00080 00081 void Print(const std::string& message, const wxColor* col = 0); 00082 00083 private : 00084 WxGUIOutputMessagesUser* mUser; 00085 wxTextCtrl* mwxOutputText; 00086 wxTextAttr* mwxOutputTextAttr; 00087 wxFont* mFixedFont; 00088 WxStreamRedirector* mRedirect_cout; 00089 WxStreamRedirector* mRedirect_cerr; 00090 /* 00091 public: 00092 enum 00093 { 00094 ID_Text_Command, 00095 ID_Btn_Go, 00096 ID_Btn_Include, 00097 ID_Btn_Reset, 00098 ID_Btn_Config, 00099 ID_Btn_GraphS, 00100 ID_Btn_GraphD, 00101 ID_Btn_Help 00102 }; 00103 00104 DECLARE_EVENT_TABLE() 00105 */ 00106 }; 00107 00108 00109 } // namespace bbtk 00110 00111 00112 #endif // __bbtkWxGUIOutputMessages_h__ 00113 00114 #endif //_USE_WXWIDGETS_