]> Creatis software - bbtk.git/blob - kernel/src/bbtkWxBlackBox.h
Disclaimers
[bbtk.git] / kernel / src / bbtkWxBlackBox.h
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbtkWxBlackBox.h,v $
4   Language:  C++
5   Date:      $Date: 2010/01/14 13:17:27 $
6   Version:   $Revision: 1.32 $
7 ========================================================================*/
8
9
10 /* ---------------------------------------------------------------------
11
12 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
13 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 *
15 *  This software is governed by the CeCILL-B license under French law and 
16 *  abiding by the rules of distribution of free software. You can  use, 
17 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
18 *  license as circulated by CEA, CNRS and INRIA at the following URL 
19 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
20 *  or in the file LICENSE.txt.
21 *
22 *  As a counterpart to the access to the source code and  rights to copy,
23 *  modify and redistribute granted by the license, users are provided only
24 *  with a limited warranty  and the software's author,  the holder of the
25 *  economic rights,  and the successive licensors  have only  limited
26 *  liability. 
27 *
28 *  The fact that you are presently reading this means that you have had
29 *  knowledge of the CeCILL-B license and that you accept its terms.
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 __bbtkWxBlackBox_h__
52 #define __bbtkWxBlackBox_h__
53
54
55
56 #include "bbtkWidgetBlackBox.h"
57 #include "bbtkWx.h"
58
59
60 namespace bbtk
61 {
62
63  
64
65   //==================================================================
66   /// Widget black boxes
67 //EED 10/06/2009 /*BBTK_EXPORT*/
68   class BBTK_EXPORT WxBlackBox : public bbtk::WidgetBlackBox<wxWindow>
69   { 
70   public:
71     BBTK_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::WidgetBlackBox<wxWindow>);
72
73           
74     //  protected:
75     
76   public:
77   
78    //==================================================================    
79     /// Callback for creating a Dialog window (modal)
80     /// ** Must be defined ** in toolkit specific descendants 
81     virtual void bbCreateDialogWindow();
82     //==================================================================    
83
84     //==================================================================    
85     /// Callback for creating a Frame window 
86     /// ** Must be defined ** in toolkit specific descendants 
87     virtual void bbCreateFrameWindow();
88     //==================================================================    
89
90      
91     //==================================================================    
92     wxWindow* bbGetWindow() { return bbmWindow; }
93     void bbSetWindow(wxWindow*) ;
94     bool bbWindowIsCreated() { return (bbGetWindow() != 0); }
95     //==================================================================    
96
97
98     //==================================================================    
99     virtual void bbShowWindow();
100     //==================================================================   
101  
102     //==================================================================    
103     virtual void bbDestroyWindow();
104     //==================================================================    
105
106   private:
107
108     wxWindow* bbmWindow;
109  
110   };
111   //=================================================================
112  
113
114   //=================================================================
115   // WxBlackBoxDescriptor declaration
116   class WxBlackBoxDescriptor : public WidgetBlackBoxDescriptor<wxWindow>
117   BBTK_BEGIN_DESCRIBE_BLACK_BOX_BODY(WxBlackBox);
118   BBTK_NAME("WxBlackBox");
119   BBTK_END_DESCRIBE_BLACK_BOX(WxBlackBox);
120   //=================================================================
121
122
123 } //namespace bbtk
124
125 #endif  //__bbtkWxBlackBox_h__
126
127 #endif  //USE_WXWIDGETS