本文整理汇总了C++中StringVector::StringAt方法的典型用法代码示例。如果您正苦于以下问题:C++ StringVector::StringAt方法的具体用法?C++ StringVector::StringAt怎么用?C++ StringVector::StringAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringVector
的用法示例。
在下文中一共展示了StringVector::StringAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: font
void
AboutView::AddCopyrightEntry(const char* name, const char* text,
const StringVector& licenses, const StringVector& sources,
const char* url)
{
BFont font(be_bold_font);
//font.SetSize(be_bold_font->Size());
font.SetFace(B_BOLD_FACE | B_ITALIC_FACE);
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuYellow);
fCreditsView->Insert(name);
fCreditsView->Insert("\n");
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert(text);
fCreditsView->Insert("\n");
if (licenses.CountStrings() > 0) {
if (licenses.CountStrings() > 1)
fCreditsView->Insert(B_TRANSLATE("Licenses: "));
else
fCreditsView->Insert(B_TRANSLATE("License: "));
for (int32 i = 0; i < licenses.CountStrings(); i++) {
const char* license = licenses.StringAt(i);
if (i > 0)
fCreditsView->Insert(", ");
BString licenseName;
BString licenseURL;
parse_named_url(license, licenseName, licenseURL);
BPath licensePath;
if (_GetLicensePath(licenseURL, licensePath) == B_OK) {
fCreditsView->InsertHyperText(licenseName,
new OpenFileAction(licensePath.Path()));
} else
fCreditsView->Insert(licenseName);
}
fCreditsView->Insert("\n");
}
if (sources.CountStrings() > 0) {
fCreditsView->Insert(B_TRANSLATE("Source Code: "));
for (int32 i = 0; i < sources.CountStrings(); i++) {
const char* source = sources.StringAt(i);
if (i > 0)
fCreditsView->Insert(", ");
BString urlName;
BString urlAddress;
parse_named_url(source, urlName, urlAddress);
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL,
&kLinkBlue);
fCreditsView->InsertHyperText(urlName,
new URLAction(urlAddress));
}
fCreditsView->Insert("\n");
}
if (url) {
BString urlName;
BString urlAddress;
parse_named_url(url, urlName, urlAddress);
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL,
&kLinkBlue);
fCreditsView->InsertHyperText(urlName,
new URLAction(urlAddress));
fCreditsView->Insert("\n");
}
fCreditsView->Insert("\n");
}