]> Creatis software - creaWT.git/blob - wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx
#2498 creaWt Feature New Normal wt-version kernel
[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         Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
29         Wt::WBoxLayout *l;
30         if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { l = new Wt::WHBoxLayout(); }
31         if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { l = new Wt::WVBoxLayout(); }
32   
33   
34
35         Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w);
36         Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w);
37
38         if (w1==NULL) { w1=new Wt::WContainerWidget(); }
39         if (w2==NULL) { w2=new Wt::WContainerWidget(); }
40
41
42         l->addWidget(w1);
43         l->addWidget(w2);
44   l->setResizable(0,true,400);
45         w->setLayout(l);
46         
47         bbSetOutputWidget( w );
48         
49   
50 }
51 /*
52 void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
53 {
54         Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
55         Wt::Ext::Splitter *l = new Wt::Ext::Splitter();
56 //      if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { l = new Wt::WHBoxLayout(); }
57  //     if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { l = new Wt::WVBoxLayout(); }
58
59         Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w);
60         Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w);
61
62         if (w1==NULL) { w1=new Wt::WContainerWidget(); }
63         if (w2==NULL) { w2=new Wt::WContainerWidget(); }
64   
65   w1->resize(200,200) ;
66     w2->resize(200,200) ;
67
68         l->addWidget(w1);
69         l->addWidget(w2);
70   w->addWidget(l);
71         //w->setLayout(l);
72         
73         bbSetOutputWidget( w );
74         
75   
76 }*/
77 //===== 
78 // 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)
79 //===== 
80 void LayoutSplit::bbUserSetDefaultValues()
81 {
82                 bbSetInputOrientation("VERTICAL");
83                 bbSetInputProportion(50);
84                 bbSetInputWidget1(NULL);
85                 bbSetInputWidget2(NULL);
86 }
87 //===== 
88 // 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)
89 //===== 
90 void LayoutSplit::bbUserInitializeProcessing()
91 {
92
93 }
94 //===== 
95 // 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)
96 //===== 
97 void LayoutSplit::bbUserFinalizeProcessing()
98 {
99
100 }
101 }
102 // EO namespace bbwt
103
104