]> Creatis software - bbtk.git/blob - kernel/src/bbtkWxGUIOutputMessages.h
9b8319c757fde8ea8c7a251dabe0575fc652254f
[bbtk.git] / kernel / src / bbtkWxGUIOutputMessages.h
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbtkWxGUIOutputMessages.h,v $
4   Language:  C++
5   Date:      $Date: 2009/12/09 08:46:21 $
6   Version:   $Revision: 1.4 $
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
14 *  This software is governed by the CeCILL-B license under French law and 
15 *  abiding by the rules of distribution of free software. You can  use, 
16 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
17 *  license as circulated by CEA, CNRS and INRIA at the following URL 
18 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
19 *  or in the file LICENSE.txt.
20 *
21 *  As a counterpart to the access to the source code and  rights to copy,
22 *  modify and redistribute granted by the license, users are provided only
23 *  with a limited warranty  and the software's author,  the holder of the
24 *  economic rights,  and the successive licensors  have only  limited
25 *  liability. 
26 *
27 *  The fact that you are presently reading this means that you have had
28 *  knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */                                                                         
30
31
32 /**
33  * \brief Short description in one line
34  * 
35  * Long description which 
36  * can span multiple lines
37  */
38 /**
39  * \file 
40  * \brief 
41  */
42 /**
43  * \class bbtk::
44  * \brief 
45  */
46
47
48 #ifdef _USE_WXWIDGETS_
49
50         
51 #ifndef __bbtkWxGUIOutputMessages_h__
52 #define __bbtkWxGUIOutputMessages_h__
53
54 #include "bbtkWx.h"
55  
56
57 namespace bbtk
58 {
59   
60    /// Abstract class which defines the callbacks invoked by WxGUIOutputMessages
61   class BBTK_EXPORT WxGUIOutputMessagesUser
62   {
63   public:
64     WxGUIOutputMessagesUser() {}
65     virtual ~WxGUIOutputMessagesUser() {}
66     /// Callback invoked when a command is entered in the WxGUIOutputMessages
67     virtual void WxGUIOutputMessagesEnter(const std::string& command) {}
68   };
69   
70
71   // Forward decl
72   class WxStreamRedirector;
73
74   /// GUI Component which provides a command input zone 
75   class BBTK_EXPORT WxGUIOutputMessages : public wxPanel
76   {
77   public:
78     WxGUIOutputMessages(wxWindow *parent, WxGUIOutputMessagesUser* user = 0);
79     ~WxGUIOutputMessages();
80     
81     void Print(const std::string& message, const wxColor* col = 0);
82
83   private :
84     WxGUIOutputMessagesUser* mUser;
85     wxTextCtrl* mwxOutputText;
86     wxTextAttr* mwxOutputTextAttr;
87         wxFont* mFixedFont;
88     WxStreamRedirector* mRedirect_cout;
89     WxStreamRedirector* mRedirect_cerr;
90     /*
91   public:
92     enum
93       {
94         ID_Text_Command,
95         ID_Btn_Go,
96         ID_Btn_Include,
97         ID_Btn_Reset,
98         ID_Btn_Config,
99         ID_Btn_GraphS,
100         ID_Btn_GraphD,
101         ID_Btn_Help
102       };
103     
104     DECLARE_EVENT_TABLE()
105     */
106   };
107   
108   
109 } // namespace bbtk
110
111
112 #endif // __bbtkWxGUIOutputMessages_h__
113
114 #endif //_USE_WXWIDGETS_