| 123 | } |
| 124 | |
| 125 | void CTextUI::PaintText(HDC hDC) |
| 126 | { |
| 127 | if( m_sText.IsEmpty() ) { |
| 128 | m_nLinks = 0; |
| 129 | return; |
| 130 | } |
| 131 | |
| 132 | if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor(); |
| 133 | if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor(); |
| 134 | |
| 135 | if( m_sText.IsEmpty() ) return; |
| 136 | |
| 137 | m_nLinks = lengthof(m_rcLinks); |
| 138 | RECT rc = m_rcItem; |
| 139 | rc.left += m_rcTextPadding.left; |
| 140 | rc.right -= m_rcTextPadding.right; |
| 141 | rc.top += m_rcTextPadding.top; |
| 142 | rc.bottom -= m_rcTextPadding.bottom; |
| 143 | if( IsEnabled() ) { |
| 144 | if( m_bShowHtml ) |
| 145 | CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \ |
| 146 | m_rcLinks, m_sLinks, m_nLinks, m_uTextStyle); |
| 147 | else |
| 148 | CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \ |
| 149 | m_iFont, m_uTextStyle); |
| 150 | } |
| 151 | else { |
| 152 | if( m_bShowHtml ) |
| 153 | CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \ |
| 154 | m_rcLinks, m_sLinks, m_nLinks, m_uTextStyle); |
| 155 | else |
| 156 | CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \ |
| 157 | m_iFont, m_uTextStyle); |
| 158 | } |
| 159 | } |
| 160 | } |
nothing calls this directly
no test coverage detected