MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / DrawSubItem

Method DrawSubItem

DebugView++/LogView.cpp:826–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

824}
825
826void CLogView::DrawSubItem(CDCHandle dc, int iItem, int iSubItem, const ItemData& data) const
827{
828 auto column = SubItemToColumn(iSubItem);
829 const auto& text = data.text[column];
830 RECT rect = GetSubItemRect(iItem, iSubItem, LVIR_BOUNDS);
831 int margin = GetHeader().GetBitmapMargin();
832 rect.left += margin;
833 rect.right -= margin;
834 if (column == Column::Message)
835 return DrawHighlightedText(dc, rect, text, data.highlights, GetSelectionHighlight(dc, iItem));
836
837 HDITEM item;
838 item.mask = HDI_FORMAT;
839 unsigned align = (GetHeader().GetItem(iSubItem, &item)) ? GetTextAlign(item) : DT_LEFT;
840 dc.DrawText(text.c_str(), text.size(), &rect, align | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
841}
842
843void CLogView::DrawItem(CDCHandle dc, int iItem, unsigned /*iItemState*/) const
844{

Callers

nothing calls this directly

Calls 4

DrawHighlightedTextFunction · 0.85
GetTextAlignFunction · 0.85
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected