| 104 | } |
| 105 | |
| 106 | SIZE CTextUI::EstimateSize(SIZE szAvailable) |
| 107 | { |
| 108 | RECT rcText = { 0, 0, MAX(szAvailable.cx, m_cxyFixed.cx), 9999 }; |
| 109 | rcText.left += m_rcTextPadding.left; |
| 110 | rcText.right -= m_rcTextPadding.right; |
| 111 | if( m_bShowHtml ) { |
| 112 | int nLinks = 0; |
| 113 | CRenderEngine::DrawHtmlText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, NULL, NULL, nLinks, DT_CALCRECT | m_uTextStyle); |
| 114 | } |
| 115 | else { |
| 116 | CRenderEngine::DrawText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, m_iFont, DT_CALCRECT | m_uTextStyle); |
| 117 | } |
| 118 | SIZE cXY = {rcText.right - rcText.left + m_rcTextPadding.left + m_rcTextPadding.right, |
| 119 | rcText.bottom - rcText.top + m_rcTextPadding.top + m_rcTextPadding.bottom}; |
| 120 | |
| 121 | if( m_cxyFixed.cy != 0 ) cXY.cy = m_cxyFixed.cy; |
| 122 | return cXY; |
| 123 | } |
| 124 | |
| 125 | void CTextUI::PaintText(HDC hDC) |
| 126 | { |
nothing calls this directly
no test coverage detected