| 1057 | } |
| 1058 | |
| 1059 | CTreeNodeUI* RedisDataUI::NewNode(const string& text, bool isLeaf) |
| 1060 | { |
| 1061 | CTreeNodeUI* pNodeTmp = new CTreeNodeUI; |
| 1062 | pNodeTmp->SetItemTextColor(0XFF000000); |
| 1063 | pNodeTmp->SetItemHotTextColor(0XFF000000); |
| 1064 | pNodeTmp->SetSelItemTextColor(0XFF000000); |
| 1065 | pNodeTmp->SetItemText(Base::CharacterSet::ANSIToUnicode(text).c_str()); |
| 1066 | pNodeTmp->SetAttribute(_T("height"), _T("22")); |
| 1067 | pNodeTmp->SetAttribute(_T("inset"), _T("0,0,0,0")); |
| 1068 | if (isLeaf) |
| 1069 | { |
| 1070 | pNodeTmp->SetAttribute(_T("itemattr"), _T("valign=\"left\" font=\"5\" textpadding=\"5,3,0,0\"")); |
| 1071 | pNodeTmp->SetAttribute(_T("folderattr"), _T("padding=\"21,3,0,0\" width=\"16\" height=\"16\" selectedimage=\"file='TreeStandard.png' source='112,32,128,48'\" normalimage=\"file='TreeStandard.png' source='112,32,128,48'\"")); |
| 1072 | } |
| 1073 | else |
| 1074 | { |
| 1075 | pNodeTmp->SetAttribute(_T("folderattr"), _T("padding=\"0,3,0,0\" width=\"16\" height=\"16\" selectedimage=\"file='tree_expand.png' source='0,0,16,16'\" normalimage=\"file='tree_expand.png' source='16,0,32,16'\"")); |
| 1076 | pNodeTmp->SetAttribute(_T("itemattr"), _T("bkimage=\"file='TreeStandard.png' source='112,0,128,16' dest='5,3,21,19'\" valign=\"left\" font=\"5\" textpadding=\"25,3,0,0\"")); |
| 1077 | } |
| 1078 | pNodeTmp->GetFolderButton()->SetEnabled(false); |
| 1079 | // if (isLeaf) pNodeTmp->SetAttribute(_T("folderattr"), _T("padding=\"0,3,0,0\" width=\"16\" height=\"16\" selectedimage=\"file='TreeStandard.png' source='112,32,128,48'\" normalimage=\"file='TreeStandard.png' source='112,32,128,48'\"")); |
| 1080 | // else pNodeTmp->SetAttribute(_T("folderattr"), _T("padding=\"0,3,0,0\" width=\"16\" height=\"16\" selectedimage=\"file='TreeStandard.png' source='112,0,128,16'\" normalimage=\"file='TreeStandard.png' source='112,16,128,32'\"")); |
| 1081 | return pNodeTmp; |
| 1082 | } |
| 1083 | |
| 1084 | void RedisDataUI::DelChildNode( CTreeNodeUI* pNode ) |
| 1085 | { |
nothing calls this directly
no test coverage detected