本文整理汇总了C++中BitmapLoader::GetImageIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ BitmapLoader::GetImageIndex方法的具体用法?C++ BitmapLoader::GetImageIndex怎么用?C++ BitmapLoader::GetImageIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitmapLoader
的用法示例。
在下文中一共展示了BitmapLoader::GetImageIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetImageId
int PHPOutlineTree::GetImageId(PHPEntityBase::Ptr_t entry)
{
BitmapLoader* bmpLoader = clGetManager()->GetStdIcons();
if(entry->Is(kEntityTypeFunction)) {
PHPEntityFunction* func = entry->Cast<PHPEntityFunction>();
if(func->HasFlag(kFunc_Private))
return bmpLoader->GetImageIndex(BitmapLoader::kFunctionPrivate);
else if(func->HasFlag(kFunc_Protected))
return bmpLoader->GetImageIndex(BitmapLoader::kFunctionProtected);
else
// public
return bmpLoader->GetImageIndex(BitmapLoader::kFunctionPublic);
} else if(entry->Is(kEntityTypeVariable)) {
PHPEntityVariable* var = entry->Cast<PHPEntityVariable>();
if(!var->IsMember() && !var->IsConst()) {
// A global variale
return bmpLoader->GetImageIndex(BitmapLoader::kMemberPublic);
} else if(var->IsMember()) {
if(var->HasFlag(kVar_Const)) return bmpLoader->GetImageIndex(BitmapLoader::kConstant); // constant
// Member
if(var->HasFlag(kVar_Private))
return bmpLoader->GetImageIndex(BitmapLoader::kMemberPrivate);
else if(var->HasFlag(kVar_Protected))
return bmpLoader->GetImageIndex(BitmapLoader::kMemberProtected);
else
return bmpLoader->GetImageIndex(BitmapLoader::kMemberPublic);
} else if(var->IsConst()) {
// Constant
return bmpLoader->GetImageIndex(BitmapLoader::kConstant);
} else {
return bmpLoader->GetImageIndex(BitmapLoader::kMemberPublic);
}
} else if(entry->Is(kEntityTypeNamespace)) {
// Namespace
return bmpLoader->GetImageIndex(BitmapLoader::kNamespace);
} else if(entry->Is(kEntityTypeClass)) {
return bmpLoader->GetImageIndex(BitmapLoader::kClass);
}
return wxNOT_FOUND; // Unknown
}