]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxSplit.h
Recreated the complete cvs tree because the project architecture deeply changed
[bbtk.git] / packages / wx / src / bbwxSplit.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbwxSplit.h,v $
5   Language:  C++
6   Date:      $Date: 2008/01/22 15:02:00 $
7   Version:   $Revision: 1.1.1.1 $
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 Pattern for the definition of a new type of Node (header)
26  */
27 /**
28  * \class bbtk::NodePatern 
29  * \brief Pattern for the definition of a new type of Node 
30  */
31
32
33 #ifdef _USE_WXWIDGETS_
34
35
36 #ifndef __bbWxSplit_h__
37 #define __bbWxSplit_h__
38
39 #include "bbtkWxBlackBox.h"
40 #include <wx/splitter.h>
41
42
43
44 namespace bbwx
45 {
46   
47   
48   /*
49   
50   class Split;
51   
52   //--------------------------------------------------------------------------
53   class SplitWidget : public bbtk::WxBlackBoxWidgetPanel 
54   {
55   public:
56     
57     SplitWidget(Split* bbtksplit, wxWindow *parent, int orientation);
58     ~SplitWidget();
59
60     void SetChilds(wxWindow* child1, 
61                    wxWindow* child2,
62                    int proportion);
63
64     wxSplitterWindow *GetWxSplitterWindow();
65     //   void SetProportion(int prop);
66     
67   private:
68     int                 mOrientation;
69     wxSplitterWindow    *mwxSplitterWindow;
70   };
71   
72   //------------------------------------------------------------------------
73   //------------------------------------------------------------------------
74   //------------------------------------------------------------------------
75
76   
77   */
78   
79   
80   class Split : public bbtk::WxBlackBox
81   {
82     
83     BBTK_USER_BLACK_BOX_INTERFACE(Split,bbtk::WxBlackBox);
84     BBTK_DECLARE_INPUT(Widget1,wxWindow*);
85     BBTK_DECLARE_INPUT(Widget2,wxWindow*);
86     BBTK_DECLARE_INPUT(Orientation,int);
87     BBTK_DECLARE_INPUT(Proportion,int);
88     BBTK_PROCESS(Process);
89     // BBTK_CREATE_WIDGET(CreateWidget);
90     
91     void Process();
92     //    void CreateWidget();
93
94   protected:
95     virtual void bbUserConstructor();
96
97   };
98   
99  
100 //=================================================================
101 // UserBlackBox description
102   BBTK_BEGIN_DESCRIBE_BLACK_BOX(Split,bbtk::WxBlackBox);
103   BBTK_NAME("Split");
104   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
105   BBTK_DESCRIPTION("Widget which splits a window in two fixed size parts (wxSplitterWindow)");
106   BBTK_INPUT(Split,Widget1,"Upper or left widget",wxWindow*);
107   BBTK_INPUT(Split,Widget2,"Lower or right widget",wxWindow*);
108   BBTK_INPUT(Split,Orientation,"Orientation (default 0), 0=Horizontal , 1=Vertical",int);
109    BBTK_INPUT(Split,Proportion,"Proportion (in percent) of the first children in the window",int);
110   BBTK_END_DESCRIBE_BLACK_BOX(Split);
111   //=================================================================
112 }
113
114 //namespace bbtk
115 #endif  //__bbtkWxSplit_h__
116
117 #endif //_USE_WXWIDGETS_