]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxLayoutSplit.h
*** empty log message ***
[bbtk.git] / packages / wx / src / bbwxLayoutSplit.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbwxLayoutSplit.h,v $
5   Language:  C++
6   Date:      $Date: 2008/06/19 09:46:46 $
7   Version:   $Revision: 1.4 $
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  */
19 /**
20  * \file 
21  * \brief Widget which splits a window into two parts 
22  */
23 /**
24  * \class bbwx::LayoutSplit
25  * \brief Widget which splits a window into two parts 
26  */
27
28
29 #ifdef _USE_WXWIDGETS_
30
31
32 #ifndef __bbWxLayoutSplit_h__
33 #define __bbWxLayoutSplit_h__
34
35 #include "bbtkWxBlackBox.h"
36 #include <wx/splitter.h>
37
38
39
40 namespace bbwx
41 {
42   
43   
44   
45   
46   class LayoutSplit : public bbtk::WxBlackBox
47   {
48     
49     BBTK_BLACK_BOX_INTERFACE(LayoutSplit,bbtk::WxBlackBox);
50     BBTK_DECLARE_INPUT(Widget1,wxWindow*);
51     BBTK_DECLARE_INPUT(Widget2,wxWindow*);
52     BBTK_DECLARE_INPUT(Orientation,std::string);
53     BBTK_DECLARE_INPUT(Proportion,int);
54     BBTK_PROCESS(Process);
55     BBTK_CREATE_WIDGET(CreateWidget);
56     
57     void Process();
58     void CreateWidget();
59     void bbUserOnShow();
60
61   protected:
62     virtual void bbUserConstructor();
63
64   };
65   
66  
67 //=================================================================
68 // BlackBox description
69   BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutSplit,bbtk::WxBlackBox);
70   BBTK_NAME("LayoutSplit");
71   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
72   BBTK_DESCRIPTION("Widget which splits a window in two fixed size parts (wxSplitterWindow)");
73   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
74   BBTK_INPUT(LayoutSplit,Widget1,"Upper or left widget",wxWindow*,"");
75   BBTK_INPUT(LayoutSplit,Widget2,"Lower or right widget",wxWindow*,"");
76   BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,"");
77    BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,"");
78   BBTK_END_DESCRIBE_BLACK_BOX(LayoutSplit);
79   //=================================================================
80 }
81
82 //namespace bbtk
83 #endif  //__bbtkWxLayoutSplit_h__
84
85 #endif //_USE_WXWIDGETS_