]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxStaticBox.cxx
2809ed26a64d386b824291554ecf56a3e86bcaa4
[bbtk.git] / packages / wx / src / bbwxStaticBox.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_WXWIDGETS_
5
6 #include "bbwxStaticBox.h"
7 #include "bbwxPackage.h"
8 #include "bbtkUtilities.h"
9 namespace bbwx
10 {
11
12   BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,StaticBox)
13   BBTK_BLACK_BOX_IMPLEMENTATION(StaticBox,bbtk::WxBlackBox);
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 StaticBox::Process()
18   {
19
20   }
21 //===== 
22 // 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)
23 //===== 
24   void StaticBox::CreateWidget(wxWindow* parent)
25   {
26     std::cout << "creating..." << std::endl;
27     wxPanel *w=new wxPanel(
28       parent, //bbGetWxParent(),
29       -1
30       );
31
32     w->SetName(bbtk::std2wx(bbGetInputWinTitle()));
33     
34     wxStaticBoxSizer* boxSizer = new wxStaticBoxSizer(
35       wxVERTICAL, 
36       w, 
37       bbtk::std2wx(bbGetInputBoxTitle())
38       );
39
40     wxWindow* content = bbCreateWidgetOfInput("BoxContent",w);
41     if (content == NULL)
42     {
43       content = new wxPanel(w);
44     }
45
46     boxSizer->Add(content,1,wxEXPAND);
47     w->SetSizer(boxSizer);
48     boxSizer->Fit(w);
49     
50     bbSetOutputWidget(w);
51   }
52 //===== 
53 // 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)
54 //===== 
55   void StaticBox::bbUserSetDefaultValues()
56   {
57     bbSetInputBoxTitle("");
58     bbSetInputBoxContent(NULL);
59     std::cout << "initialized"<<std::endl;
60   }
61 //===== 
62 // 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)
63 //===== 
64   void StaticBox::bbUserInitializeProcessing()
65   {
66
67   }
68 //===== 
69 // 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)
70 //===== 
71   void StaticBox::bbUserFinalizeProcessing()
72   {
73
74   }
75
76 // This callback is necessary to get actual processing of the view 
77 // when window is shown
78   void  StaticBox::OnShowWidget()
79   {
80   }
81 }
82 // EO namespace bbwx
83
84 #endif // _USE_WXWIDGETS_