]> Creatis software - bbtk.git/blob - kernel/src/bbtkWidgetBlackBoxWindow.h
04344ad7fcbd0d50befa48520fe5a289ca7f0ec0
[bbtk.git] / kernel / src / bbtkWidgetBlackBoxWindow.h
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbtkWidgetBlackBoxWindow.h,v $
4   Language:  C++
5   Date:      $Date: 2009/05/19 10:19:23 $
6   Version:   $Revision: 1.2 $
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  * \brief Short description in one line
33  * 
34  * Long description which 
35  * can span multiple lines
36  */
37 /**
38  * \file 
39  * \brief 
40  */
41 /**
42  * \class bbtk::
43  * \brief 
44  */
45
46
47
48 #ifndef __bbtkWidgetBlackBoxWindow_h__
49 #define __bbtkWidgetBlackBoxWindow_h__
50
51
52 #include "bbtkWidgetBlackBox.h"
53
54 namespace bbtk
55 {
56
57
58   //==================================================================
59   // The base of the hierarchy of windows associated to a WidgetBlackBox
60   template <class W>
61   class BBTK_EXPORT WidgetBlackBoxWindow 
62   {
63   public:
64     typedef typename WidgetBlackBox<W>::Pointer WidgetBlackBoxPointer;
65     typedef typename WidgetBlackBox<W>::WeakPointer WidgetBlackBoxWeakPointer;
66
67     WidgetBlackBoxWindow(WidgetBlackBoxPointer box);
68     virtual ~WidgetBlackBoxWindow();
69     virtual void bbShow();
70     virtual void bbHide();
71     virtual void bbDestroy();
72     bool bbIsShown() { return mShown; }
73     virtual WidgetBlackBoxPointer bbGetBlackBox() { return mBox.lock(); }
74     //virtual wxDialog* bbGetDialog() { return 0; } 
75     //virtual wxFrame* bbGetFrame() { return 0; } 
76     virtual bool bbIsDialog() { return false; }
77     virtual bool bbIsFrame() { return false; }
78   private:
79     WidgetBlackBoxWeakPointer mBox;
80     bool mShown;
81   };
82   //==================================================================
83
84
85 } //namespace bbtk
86
87 #include "bbtkWidgetBlackBoxWindow.txx"
88
89 #endif  //__bbtkWidgetBlackBoxWindow_h__
90