]> Creatis software - creaWT.git/blob - wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx
5c304e65cf7c16baca45bd86d719daea0da7aec9
[creaWT.git] / wt / bbtk_wt_PKG / src / bbwtLayoutSplit.cxx
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #include "bbwtLayoutSplit.h"
5 #include "bbwtPackage.h"
6 #include "bbtkUtilities.h"
7
8
9 namespace bbwt
10 {
11
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,LayoutSplit)
13 BBTK_BLACK_BOX_IMPLEMENTATION(LayoutSplit,bbtk::WtBlackBox);
14 //===== 
15 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
16 //===== 
17 void LayoutSplit::Process()
18 {
19
20
21   
22 }
23 //===== 
24 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
25 //===== 
26 void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
27 {
28         
29         Wt::Ext::Splitter *w = new Wt::Ext::Splitter(parent);
30  
31
32         Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w);
33         Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w);
34
35         if (w1==NULL) { w1=new Wt::WContainerWidget(); }
36         if (w2==NULL) { w2=new Wt::WContainerWidget(); }
37
38         int orientation=0;
39   if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { orientation=0; }
40   if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { orientation=1; }
41
42         w->addWidget(w1);
43         w->addWidget(w2);
44
45         if(orientation == 0){   w->setOrientation(Wt::Horizontal);}
46         else{   w->setOrientation(Wt::Vertical);}
47     
48
49
50         
51         bbSetOutputWidget( w );
52         
53   
54 }
55 //===== 
56 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
57 //===== 
58 void LayoutSplit::bbUserSetDefaultValues()
59 {
60                 bbSetInputOrientation("VERTICAL");
61                 bbSetInputProportion(50);
62                 bbSetInputWidget1(NULL);
63                 bbSetInputWidget2(NULL);
64 }
65 //===== 
66 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
67 //===== 
68 void LayoutSplit::bbUserInitializeProcessing()
69 {
70
71 }
72 //===== 
73 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
74 //===== 
75 void LayoutSplit::bbUserFinalizeProcessing()
76 {
77
78 }
79 }
80 // EO namespace bbwt
81
82