]> Creatis software - creaWT.git/blob - wt/bbtk_wt_PKG/src/bbwtLayoutLine.cxx~
#3037 creaWT Bug New Normal - AddMesh update
[creaWT.git] / wt / bbtk_wt_PKG / src / bbwtLayoutLine.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 #ifdef _USE_WT_
5 #include "bbwtLayoutLine.h"
6 #include "bbwtPackage.h"
7 #include "bbtkUtilities.h"
8 #include <Wt/WGridLayout>
9 namespace bbwt
10 {
11
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,LayoutLine)
13 BBTK_BLACK_BOX_IMPLEMENTATION(LayoutLine,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 LayoutLine::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 LayoutLine::CreateWidget(Wt::WContainerWidget* parent)
27 {
28
29         Wt::WContainerWidget *w = new Wt::WContainerWidget(parent);
30         int count = 0;
31         Wt::WLayout *layout;
32         Wt::WContainerWidget *cw;
33         if (bbtk::Utilities::loosematch(bbGetInputOrientation(),
34                                     "0|H|HORIZONTAL")==true)
35         {
36           layout = new Wt::WHBoxLayout();
37           if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0)  {layout->addWidget(cw);}
38           if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0)  {layout->addWidget(cw);}
39           if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0)  {layout->addWidget(cw);}
40           if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0)  {layout->addWidget(cw);}
41           if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0)  {layout->addWidget(cw);}
42           if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0)  {layout->addWidget(cw);}
43           if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0)  {layout->addWidget(cw);}
44           if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0)  {layout->addWidget(cw);}
45           if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0)  {layout->addWidget(cw);}
46                 
47         }
48     if (bbtk::Utilities::loosematch(bbGetInputOrientation(),
49                                     "1|V|VERTICAL")==true) 
50         {
51
52                 layout = new Wt::WVBoxLayout();
53           if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0)  {layout->addWidget(cw);}
54           if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0)  {layout->addWidget(cw);}
55           if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0)  {layout->addWidget(cw);}
56           if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0)  {layout->addWidget(cw);}
57           if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0)  {layout->addWidget(cw);}
58           if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0)  {layout->addWidget(cw);}
59           if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0)  {layout->addWidget(cw);}
60           if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0)  {layout->addWidget(cw);}
61           if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0)  {layout->addWidget(cw);}
62         }
63         
64 /*
65         Wt::WContainerWidget *w = new Wt::WContainerWidget(parent);
66         int count = 0;
67         Wt::WGridLayout *layout = new Wt::WGridLayout(0);
68         Wt::WContainerWidget *cw;
69         if (bbtk::Utilities::loosematch(bbGetInputOrientation(),
70                                     "0|H|HORIZONTAL")==true)
71         {
72                 
73           if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0)  {layout->addWidget(cw,0,count++);}
74           if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0)  {layout->addWidget(cw,0,count++);}
75           if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0)  {layout->addWidget(cw,0,count++);}
76           if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0)  {layout->addWidget(cw,0,count++);}
77           if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0)  {layout->addWidget(cw,0,count++);}
78           if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0)  {layout->addWidget(cw,0,count++);}
79           if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0)  {layout->addWidget(cw,0,count++);}
80           if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0)  {layout->addWidget(cw,0,count++);}
81           if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0)  {layout->addWidget(cw,0,count++);}
82                 
83         }
84     if (bbtk::Utilities::loosematch(bbGetInputOrientation(),
85                                     "1|V|VERTICAL")==true) 
86         {
87           if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0)  {layout->addWidget(cw);}
88           if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0)  {layout->addWidget(cw);}
89           if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0)  {layout->addWidget(cw);}
90           if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0)  {layout->addWidget(cw);}
91           if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0)  {layout->addWidget(cw);}
92           if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0)  {layout->addWidget(cw);}
93           if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0)  {layout->addWidget(cw);}
94           if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0)  {layout->addWidget(cw);}
95           if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0)  {layout->addWidget(cw);}
96         }
97
98 */
99         w->setLayout(layout);
100         bbSetOutputWidget( w );
101         
102   
103 }
104 //===== 
105 // 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)
106 //===== 
107 void LayoutLine::bbUserSetDefaultValues()
108 {
109                 bbSetInputOrientation("VERTICAL");
110                 bbSetInputWidget1(NULL);
111                 bbSetInputWidget2(NULL);
112                 bbSetInputWidget3(NULL);
113                 bbSetInputWidget4(NULL);
114                 bbSetInputWidget5(NULL);
115                 bbSetInputWidget6(NULL);
116                 bbSetInputWidget7(NULL);
117                 bbSetInputWidget8(NULL);
118                 bbSetInputWidget9(NULL);
119
120 }
121 //===== 
122 // 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)
123 //===== 
124 void LayoutLine::bbUserInitializeProcessing()
125 {
126
127 }
128 //===== 
129 // 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)
130 //===== 
131 void LayoutLine::bbUserFinalizeProcessing()
132 {
133
134 }
135 }
136 // EO namespace bbwt
137 #endif // _USE_WXWIDGETS_
138