]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxListCtrl.cxx
#3403 vtk8itk5wx3-macos
[bbtk.git] / packages / wx / src / bbwxListCtrl.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 "bbwxListCtrl.h"
5 #include "bbwxPackage.h"
6
7 #include <wx/listctrl.h>
8
9 namespace bbwx
10 {
11
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ListCtrl)
13 BBTK_BLACK_BOX_IMPLEMENTATION(ListCtrl,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 ListCtrl::Process()
18 {
19         wxListCtrl *lstctrl= ((wxListCtrl*)bbGetOutputWidget());
20         lstctrl->DeleteAllColumns();    
21
22         unsigned int i,iSize=bbGetInputTitles().size();
23         for (i=0;i<iSize;i++)
24         {
25                 lstctrl->AppendColumn( bbtk::std2wx( bbGetInputTitles()[i] ) , wxLIST_FORMAT_CENTRE );          
26         } // for i
27
28     unsigned int j,jSize=bbGetInputColumn00().size();
29         for (j=0;j<jSize;j++)
30         {
31            lstctrl->InsertItem(j, bbtk::std2wx("0") );
32            lstctrl->SetItem(j,0, bbtk::std2wx( bbGetInputColumn00()[j] ) );
33            
34            if ((bbGetInputColumn01().size()==jSize ) && (1<iSize) ) { lstctrl->SetItem(j,1, bbtk::std2wx( bbGetInputColumn01()[j] ) ); }
35            if ((bbGetInputColumn02().size()==jSize ) && (2<iSize) ) { lstctrl->SetItem(j,2, bbtk::std2wx( bbGetInputColumn02()[j] ) ); }
36            if ((bbGetInputColumn03().size()==jSize ) && (3<iSize) ) { lstctrl->SetItem(j,3, bbtk::std2wx( bbGetInputColumn03()[j] ) ); }
37            if ((bbGetInputColumn04().size()==jSize ) && (4<iSize) ) { lstctrl->SetItem(j,4, bbtk::std2wx( bbGetInputColumn04()[j] ) ); }
38            if ((bbGetInputColumn05().size()==jSize ) && (5<iSize) ) { lstctrl->SetItem(j,5, bbtk::std2wx( bbGetInputColumn05()[j] ) ); }
39            if ((bbGetInputColumn06().size()==jSize ) && (6<iSize) ) { lstctrl->SetItem(j,6, bbtk::std2wx( bbGetInputColumn06()[j] ) ); }
40            if ((bbGetInputColumn07().size()==jSize ) && (7<iSize) ) { lstctrl->SetItem(j,7, bbtk::std2wx( bbGetInputColumn07()[j] ) ); }
41            if ((bbGetInputColumn08().size()==jSize ) && (8<iSize) ) { lstctrl->SetItem(j,8, bbtk::std2wx( bbGetInputColumn08()[j] ) ); }
42            if ((bbGetInputColumn09().size()==jSize ) && (9<iSize) ) { lstctrl->SetItem(j,9, bbtk::std2wx( bbGetInputColumn09()[j] ) ); }
43            if ((bbGetInputColumn10().size()==jSize ) && (10<iSize)) { lstctrl->SetItem(j,10,bbtk::std2wx( bbGetInputColumn10()[j] ) ); }
44           
45         } // for j
46
47   
48   
49 }
50 //===== 
51 // 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)
52 //===== 
53 void ListCtrl::CreateWidget(wxWindow* parent)
54 {
55 //  |wxLC_NO_HEADER
56    bbSetOutputWidget( new wxListCtrl ( parent , -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT  )  );
57   
58 }
59 //===== 
60 // 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)
61 //===== 
62 void ListCtrl::bbUserSetDefaultValues()
63 {
64
65 }
66 //===== 
67 // 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)
68 //===== 
69 void ListCtrl::bbUserInitializeProcessing()
70 {
71
72 }
73 //===== 
74 // 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)
75 //===== 
76 void ListCtrl::bbUserFinalizeProcessing()
77 {
78
79 }
80 }
81 // EO namespace bbwx
82
83