本文整理汇总了C++中TView::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TView::GetSize方法的具体用法?C++ TView::GetSize怎么用?C++ TView::GetSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TView
的用法示例。
在下文中一共展示了TView::GetSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: theWordDelete
void
XPFUpdateWindow::setUpdateItemList (XPFUpdateItemList *list)
{
CStr255_AC theWordDelete ((ResNumber) kXPFStringsResource, kDeleteWord);
CStr255_AC theWordInstall ((ResNumber) kXPFStringsResource, kInstallWord);
TView *listView = FindSubView ('list');
listView->SetDrawingEnvironment (new TThemeWhiteEnvironment, false);
CViewPoint offset (0, 0);
for (XPFUpdateListIterator iter (list); iter.Current (); iter.Next ()) {
if (iter->getAction () == kActionNone) continue;
TView *itemView = TViewServer::fgViewServer->DoCreateViews (GetDocument (), listView, kUpdateItem, offset);
TStaticText *name = (TStaticText *) itemView->FindSubView ('item');
TStaticText *installed = (TStaticText *) itemView->FindSubView ('inst');
TStaticText *available = (TStaticText *) itemView->FindSubView ('avai');
TStaticText *action = (TStaticText *) itemView->FindSubView ('acti');
name->SetText (iter->getResourceName (), false);
char buffer [64];
parseVersion (buffer, iter->getInstalledVersion ());
installed->SetText (buffer, false);
parseVersion (buffer, iter->getAvailableVersion ());
available->SetText (buffer, false);
if (!iter->getIsQualified ()) available->SetText ("n/a", false);
switch (iter->getAction ()) {
case kActionDelete:
theWordDelete.CopyTo (buffer);
break;
case kActionInstall:
theWordInstall.CopyTo (buffer);
break;
default:
buffer[0] = 0;
break;
}
action->SetText (buffer, false);
offset.v += itemView->GetSize().v;
}
}