]> Creatis software - bbtk.git/blob - kernel/src/bbtkWxGUICommand.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxGUICommand.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkWxGUICommand.h,v $
5   Language:  C++
6   Date:      $Date: 2008/06/10 19:19:42 $
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 __bbtkWxGUICommand_h__
37 #define __bbtkWxGUICommand_h__
38
39 #include "bbtkWx.h"
40  
41
42 namespace bbtk
43 {
44    /// Abstract class which defines the callbacks invoked by WxGUICommand
45   class BBTK_EXPORT WxGUICommandUser
46   {
47   public:
48     WxGUICommandUser() {}
49     ~WxGUICommandUser() {}
50     /// Callback invoked when a command is entered in the WxGUICommand
51     virtual void WxGUICommandEnter(const std::string& command) {}
52   };
53
54   /// GUI Component which provides a command input zone 
55   class BBTK_EXPORT WxGUICommand : public wxPanel
56   {
57   public:
58     WxGUICommand(wxWindow *parent, WxGUICommandUser* user = 0);
59     ~WxGUICommand();
60     
61     void OnBtnGo(wxCommandEvent& event);
62     void OnCommandEnter(wxCommandEvent& event);
63     void OnCommandChar(wxCommandEvent& event);
64     
65     void OnBtnInclude(wxCommandEvent& event);
66     void OnBtnReset(wxCommandEvent& event);
67     void OnBtnConfig(wxCommandEvent& event);
68     void OnBtnGraphS(wxCommandEvent& event);
69     void OnBtnGraphD(wxCommandEvent& event);
70     void OnBtnHelp(wxCommandEvent& event);
71     void OnBtnHelpBrowser(wxCommandEvent& event);
72     
73     void SendCommand(const std::string& command);
74   private :
75     WxGUICommandUser* mUser;
76     wxComboBox* mwxTextCommand;
77     //    wxTextAttr* mwxTextCommandAttr;
78     
79   public:
80     enum
81       {
82         ID_Text_Command,
83         ID_Btn_Go,
84         ID_Btn_Include,
85         ID_Btn_Reset,
86         ID_Btn_Config,
87         ID_Btn_GraphS,
88         ID_Btn_GraphD,
89         ID_Btn_Help,
90         ID_Btn_HelpBrowser
91       };
92     
93     DECLARE_EVENT_TABLE()
94       
95       };
96   
97   
98 } // namespace bbtk
99
100
101 #endif // __bbtkWxGUICommand_h__
102
103 #endif //_USE_WXWIDGETS_