MCPcopy Create free account
hub / github.com/cinience/RedisStudio / CTreeNodeUI

Method CTreeNodeUI

DuiLib/Control/UITreeView.cpp:13–57  ·  view source on GitHub ↗

��������: CTreeNodeUI ��������: ������Ϣ: CTreeNodeUI * _ParentNode ����˵��:

Source from the content-addressed store, hash-verified

11 // ����˵��:
12 //************************************
13 CTreeNodeUI::CTreeNodeUI( CTreeNodeUI* _ParentNode /*= NULL*/ )
14 {
15 m_dwItemTextColor = 0x00000000;
16 m_dwItemHotTextColor = 0;
17 m_dwSelItemTextColor = 0;
18 m_dwSelItemHotTextColor = 0;
19
20 pTreeView = NULL;
21 m_bIsVisable = true;
22 m_bIsCheckBox = false;
23 pParentTreeNode = NULL;
24
25 pHoriz = new CHorizontalLayoutUI();
26 pFolderButton = new CCheckBoxUI();
27 pDottedLine = new CLabelUI();
28 pCheckBox = new CCheckBoxUI();
29 pItemButton = new COptionUI();
30
31 this->SetFixedHeight(18);
32 this->SetFixedWidth(250);
33 pFolderButton->SetFixedWidth(GetFixedHeight());
34 pDottedLine->SetFixedWidth(2);
35 pCheckBox->SetFixedWidth(GetFixedHeight());
36 pItemButton->SetAttribute(_T("align"),_T("left"));
37
38 pDottedLine->SetVisible(false);
39 pCheckBox->SetVisible(false);
40 pItemButton->SetMouseEnabled(false);
41
42 if(_ParentNode)
43 {
44 if (_tcsicmp(_ParentNode->GetClass(), _T("TreeNodeUI")) != 0)
45 return;
46
47 pDottedLine->SetVisible(_ParentNode->IsVisible());
48 pDottedLine->SetFixedWidth(_ParentNode->GetDottedLine()->GetFixedWidth()+16);
49 this->SetParentNode(_ParentNode);
50 }
51
52 pHoriz->Add(pDottedLine);
53 pHoriz->Add(pFolderButton);
54 pHoriz->Add(pCheckBox);
55 pHoriz->Add(pItemButton);
56 Add(pHoriz);
57 }
58
59 //************************************
60 // ��������: ~CTreeNodeUI

Callers

nothing calls this directly

Calls 10

SetParentNodeMethod · 0.95
SetFixedHeightMethod · 0.80
SetFixedWidthMethod · 0.80
IsVisibleMethod · 0.80
GetFixedWidthMethod · 0.80
SetAttributeMethod · 0.45
SetVisibleMethod · 0.45
SetMouseEnabledMethod · 0.45
GetClassMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected