本文整理汇总了C++中Row::GetTail方法的典型用法代码示例。如果您正苦于以下问题:C++ Row::GetTail方法的具体用法?C++ Row::GetTail怎么用?C++ Row::GetTail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Row
的用法示例。
在下文中一共展示了Row::GetTail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Lookup
//.........这里部分代码省略.........
row.Attach(DNew Row());
POSITION next = brpos;
r->GetNext(next);
do {
row->AddHead(r->GetPrev(brpos));
} while(brpos);
rows.InsertBefore(rpos, row);
while(!r->IsEmpty() && r->GetHeadPosition() != next) {
r->RemoveHeadNoReturn();
}
g = r->GetAt(gpos = next);
width = g->width + g->spacing;
}
if(abs(width) >= minwidth) {
if(g->style.linebreak == _T("char")
|| g->style.linebreak == _T("word") && g->c == Text::SP) {
brpos = gpos;
}
}
}
}
}
// trim rows
for(POSITION pos = rows.GetHeadPosition(); pos; rows.GetNext(pos)) {
Row* r = rows.GetAt(pos);
while(!r->IsEmpty() && r->GetHead()->c == Text::SP) {
r->RemoveHead();
}
while(!r->IsEmpty() && r->GetTail()->c == Text::SP) {
r->RemoveTail();
}
}
// calc fill width for each glyph
CAtlList<Glyph*> glypsh2fill;
int fill_id = 0;
int fill_width = 0;
for(POSITION pos = rows.GetHeadPosition(); pos; rows.GetNext(pos)) {
Row* r = rows.GetAt(pos);
POSITION gpos = r->GetHeadPosition();
while(gpos) {
Glyph* g = r->GetNext(gpos);
if(!glypsh2fill.IsEmpty() && fill_id && (g->style.fill.id != fill_id || !pos && !gpos)) {
int w = (int)(g->style.fill.width * fill_width + 0.5);
while(!glypsh2fill.IsEmpty()) {
Glyph* g = glypsh2fill.RemoveTail();
fill_width -= g->width;
g->fill = w - fill_width;
}
ASSERT(glypsh2fill.IsEmpty());
ASSERT(fill_width == 0);
glypsh2fill.RemoveAll();
fill_width = 0;
}