]> Creatis software - bbtk.git/blob - packages/kw/src/bbkwLayoutSplit.h
Feature #1774
[bbtk.git] / packages / kw / src / bbkwLayoutSplit.h
1 /*
2 # ---------------------------------------------------------------------
3 #
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 #                        pour la SantÈ)
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 #
10 #  This software is governed by the CeCILL-B license under French law and
11 #  abiding by the rules of distribution of free software. You can  use,
12 #  modify and/ or redistribute the software under the terms of the CeCILL-B
13 #  license as circulated by CEA, CNRS and INRIA at the following URL
14 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 #  or in the file LICENSE.txt.
16 #
17 #  As a counterpart to the access to the source code and  rights to copy,
18 #  modify and redistribute granted by the license, users are provided only
19 #  with a limited warranty  and the software's author,  the holder of the
20 #  economic rights,  and the successive licensors  have only  limited
21 #  liability.
22 #
23 #  The fact that you are presently reading this means that you have had
24 #  knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
26
27
28 /*=========================================================================
29   Program:   bbtk
30   Module:    $RCSfile: bbkwLayoutSplit.h,v $
31   Language:  C++
32   Date:      $Date: 2012/11/16 08:51:05 $
33   Version:   $Revision: 1.4 $
34 =========================================================================*/
35
36
37
38 /**
39  */
40 /**
41  * \file 
42  * \brief Widget which splits a window into two parts 
43  */
44 /**
45  * \class bbkw::LayoutSplit
46  * \brief Widget which splits a window into two parts 
47  */
48
49
50 #ifdef USE_KWWIDGETS
51
52
53 #ifndef __bbKwLayoutSplit_h__
54 #define __bbKwLayoutSplit_h__
55
56 #include "bbtkKWBlackBox.h"
57
58 namespace bbkw
59 {
60   
61   
62   
63   
64   class LayoutSplit : public bbtk::KWBlackBox
65   {
66     
67     BBTK_BLACK_BOX_INTERFACE(LayoutSplit,bbtk::KWBlackBox);
68     BBTK_DECLARE_INPUT(Widget1,vtkKWWidget*);
69     BBTK_DECLARE_INPUT(Widget2,vtkKWWidget*);
70     BBTK_DECLARE_INPUT(Orientation,std::string);
71     BBTK_DECLARE_INPUT(Proportion,int);
72     BBTK_PROCESS(Process);
73     BBTK_CREATE_KWWIDGET(CreateWidget);
74    void CreateWidget(vtkKWFrame*);
75
76     void Process();
77   protected:
78     virtual void bbUserConstructor();
79
80   };
81   
82  
83 //=================================================================
84 // BlackBox description
85   BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutSplit,bbtk::KWBlackBox);
86   BBTK_NAME("kwLayoutSplit");
87   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
88   BBTK_DESCRIPTION("Widget which splits a window in two fixed size parts (vtkKWSplitFrame)");
89   // Already inserted for any KwBlackBox  BBTK_CATEGORY("widget");
90   BBTK_INPUT(LayoutSplit,Widget1,"Upper or left widget",vtkKWWidget*,"");
91   BBTK_INPUT(LayoutSplit,Widget2,"Lower or right widget",vtkKWWidget*,"");
92   BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,"");
93    BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,"");
94   BBTK_END_DESCRIBE_BLACK_BOX(LayoutSplit);
95   //=================================================================
96 }
97
98 //namespace bbtk
99 #endif  //__bbtkKwLayoutSplit_h__
100
101 #endif //_USE_KWWIDGETS_