]> Creatis software - bbtk.git/blob - doc/bouml/bbtkk/140162.bodies
#2853 BBTK Feature New Normal - std:FilesFromDirectory box add option to create...
[bbtk.git] / doc / bouml / bbtkk / 140162.bodies
1 class TreeMultiItemWindow
2 !!!167426.cpp!!!        TreeMultiItemWindow(inout parent : TreeMultiItemNode, in name : wxString = wxEmptyString)
3
4
5     _name = name;
6
7
8
9         // TODO: Enter your constructor code here
10
11 !!!167554.cpp!!!        ~TreeMultiItemWindow()
12
13
14         if(_window)
15
16                 _window->Destroy();
17
18 !!!167810.cpp!!!        AssignWindow(inout wnd : wxWindow) : void
19
20
21         // delete previous, assign new (even if zero)
22
23         if(_window)
24
25                 _window->Destroy();
26
27
28
29         _window = wnd;
30
31
32
33         // recalculate the size
34
35         if(wnd)
36
37         {
38
39                 wxSize size; 
40
41
42
43                 // resize the sized control by sizer or 
44
45                 // by single window. For a sizer handled window
46
47                 // GetBestSize returns the optimal size
48
49
50
51                 /// \todo This might need rivision for retaining the sizer size
52
53                 /// maybe we need to check whether size is <> 0,0 before get best size
54
55
56
57                 if(wnd->GetSizer())
58
59                         size = wnd->GetBestSize();
60
61                 else
62
63                         size = wnd->GetSize();
64
65
66
67                 _height = size.GetHeight();
68
69                 _width = size.GetWidth();
70
71
72
73         }
74
75         else
76
77         {
78
79                 _height = 0;
80
81                 _width = 0;
82
83         }
84
85 !!!168834.cpp!!!        SetCheckboxState(in state : int) : void
86
87
88         TreeMultiItemBase::SetCheckboxState(state);
89
90
91
92         // enable or disable the window
93
94         if(GetCheckbox() && GetWindow() && state != 2)
95
96                 GetWindow()->Enable(state == 1);
97