| 506 | } |
| 507 | |
| 508 | void CMenuElementUI::DrawItemText(HDC hDC, const RECT& rcItem) |
| 509 | { |
| 510 | if( m_sText.IsEmpty() ) return; |
| 511 | |
| 512 | if( m_pOwner == NULL ) return; |
| 513 | TListInfoUI* pInfo = m_pOwner->GetListInfo(); |
| 514 | DWORD iTextColor = pInfo->dwTextColor; |
| 515 | if( (m_uButtonState & UISTATE_HOT) != 0 ) { |
| 516 | iTextColor = pInfo->dwHotTextColor; |
| 517 | } |
| 518 | if( IsSelected() ) { |
| 519 | iTextColor = pInfo->dwSelectedTextColor; |
| 520 | } |
| 521 | if( !IsEnabled() ) { |
| 522 | iTextColor = pInfo->dwDisabledTextColor; |
| 523 | } |
| 524 | int nLinks = 0; |
| 525 | RECT rcText = rcItem; |
| 526 | rcText.left += pInfo->rcTextPadding.left; |
| 527 | rcText.right -= pInfo->rcTextPadding.right; |
| 528 | rcText.top += pInfo->rcTextPadding.top; |
| 529 | rcText.bottom -= pInfo->rcTextPadding.bottom; |
| 530 | |
| 531 | if( pInfo->bShowHtml ) |
| 532 | CRenderEngine::DrawHtmlText(hDC, m_pManager, rcText, m_sText, iTextColor, \ |
| 533 | NULL, NULL, nLinks, DT_SINGLELINE | pInfo->uTextStyle); |
| 534 | else |
| 535 | CRenderEngine::DrawText(hDC, m_pManager, rcText, m_sText, iTextColor, \ |
| 536 | pInfo->nFont, DT_SINGLELINE | pInfo->uTextStyle); |
| 537 | } |
| 538 | |
| 539 | |
| 540 | SIZE CMenuElementUI::EstimateSize(SIZE szAvailable) |
nothing calls this directly
no test coverage detected