1 /*=========================================================================
4 Module: $RCSfile: bbwxSplit.h,v $
6 Date: $Date: 2008/01/28 08:56:02 $
7 Version: $Revision: 1.3 $
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.
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.
17 =========================================================================*//**
21 * \brief Widget which splits a window into two parts
25 * \brief Widget which splits a window into two parts
29 #ifdef _USE_WXWIDGETS_
32 #ifndef __bbWxSplit_h__
33 #define __bbWxSplit_h__
35 #include "bbtkWxBlackBox.h"
36 #include <wx/splitter.h>
48 //--------------------------------------------------------------------------
49 class SplitWidget : public bbtk::WxBlackBoxWidgetPanel
53 SplitWidget(Split* bbtksplit, wxWindow *parent, int orientation);
56 void SetChilds(wxWindow* child1,
60 wxSplitterWindow *GetWxSplitterWindow();
61 // void SetProportion(int prop);
65 wxSplitterWindow *mwxSplitterWindow;
68 //------------------------------------------------------------------------
69 //------------------------------------------------------------------------
70 //------------------------------------------------------------------------
76 class Split : public bbtk::WxBlackBox
79 BBTK_USER_BLACK_BOX_INTERFACE(Split,bbtk::WxBlackBox);
80 BBTK_DECLARE_INPUT(Widget1,wxWindow*);
81 BBTK_DECLARE_INPUT(Widget2,wxWindow*);
82 BBTK_DECLARE_INPUT(Orientation,int);
83 BBTK_DECLARE_INPUT(Proportion,int);
84 BBTK_PROCESS(Process);
85 BBTK_CREATE_WIDGET(CreateWidget);
91 virtual void bbUserConstructor();
96 //=================================================================
97 // UserBlackBox description
98 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Split,bbtk::WxBlackBox);
100 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
101 BBTK_DESCRIPTION("Widget which splits a window in two fixed size parts (wxSplitterWindow)");
102 BBTK_INPUT(Split,Widget1,"Upper or left widget",wxWindow*);
103 BBTK_INPUT(Split,Widget2,"Lower or right widget",wxWindow*);
104 BBTK_INPUT(Split,Orientation,"Orientation (default 0), 0=Horizontal , 1=Vertical",int);
105 BBTK_INPUT(Split,Proportion,"Proportion (in percent) of the first children in the window",int);
106 BBTK_END_DESCRIBE_BLACK_BOX(Split);
107 //=================================================================
111 #endif //__bbtkWxSplit_h__
113 #endif //_USE_WXWIDGETS_