��������: CTreeNodeUI ��������: ������Ϣ: CTreeNodeUI * _ParentNode ����˵��:
| 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 |
nothing calls this directly
no test coverage detected