]> Creatis software - bbtk.git/blob - kernel/src/bbtkWxGUIOutputMessages.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxGUIOutputMessages.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkWxGUIOutputMessages.h,v $
5   Language:  C++
6   Date:      $Date: 2008/07/23 11:46:11 $
7   Version:   $Revision: 1.2 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*//**
18  * \brief Short description in one line
19  * 
20  * Long description which 
21  * can span multiple lines
22  */
23 /**
24  * \file 
25  * \brief 
26  */
27 /**
28  * \class bbtk::
29  * \brief 
30  */
31
32
33 #ifdef _USE_WXWIDGETS_
34
35         
36 #ifndef __bbtkWxGUIOutputMessages_h__
37 #define __bbtkWxGUIOutputMessages_h__
38
39 #include "bbtkWx.h"
40  
41
42 namespace bbtk
43 {
44   
45    /// Abstract class which defines the callbacks invoked by WxGUIOutputMessages
46   class BBTK_EXPORT WxGUIOutputMessagesUser
47   {
48   public:
49     WxGUIOutputMessagesUser() {}
50     virtual ~WxGUIOutputMessagesUser() {}
51     /// Callback invoked when a command is entered in the WxGUIOutputMessages
52     virtual void WxGUIOutputMessagesEnter(const std::string& command) {}
53   };
54   
55
56   // Forward decl
57   class WxStreamRedirector;
58
59   /// GUI Component which provides a command input zone 
60   class BBTK_EXPORT WxGUIOutputMessages : public wxPanel
61   {
62   public:
63     WxGUIOutputMessages(wxWindow *parent, WxGUIOutputMessagesUser* user = 0);
64     ~WxGUIOutputMessages();
65     
66     void Print(const std::string& message, const wxColor* col = 0);
67
68   private :
69     WxGUIOutputMessagesUser* mUser;
70     wxTextCtrl* mwxOutputText;
71     wxTextAttr* mwxOutputTextAttr;
72     WxStreamRedirector* mRedirect_cout;
73     WxStreamRedirector* mRedirect_cerr;
74     /*
75   public:
76     enum
77       {
78         ID_Text_Command,
79         ID_Btn_Go,
80         ID_Btn_Include,
81         ID_Btn_Reset,
82         ID_Btn_Config,
83         ID_Btn_GraphS,
84         ID_Btn_GraphD,
85         ID_Btn_Help
86       };
87     
88     DECLARE_EVENT_TABLE()
89     */
90   };
91   
92   
93 } // namespace bbtk
94
95
96 #endif // __bbtkWxGUIOutputMessages_h__
97
98 #endif //_USE_WXWIDGETS_