本文整理汇总了C++中TTeamMenuItem::Signature方法的典型用法代码示例。如果您正苦于以下问题:C++ TTeamMenuItem::Signature方法的具体用法?C++ TTeamMenuItem::Signature怎么用?C++ TTeamMenuItem::Signature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTeamMenuItem
的用法示例。
在下文中一共展示了TTeamMenuItem::Signature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BString
void
TBarView::ChangeState(int32 state, bool vertical, bool left, bool top)
{
bool vertSwap = (fVertical != vertical);
bool leftSwap = (fLeft != left);
fState = state;
fVertical = vertical;
fLeft = left;
fTop = top;
BRect screenFrame = (BScreen(Window())).Frame();
PlaceBeMenu();
PlaceTray(vertSwap, leftSwap, screenFrame);
// We need to keep track of what apps are expanded.
BList expandedItems;
BString* signature = NULL;
if (fVertical && Expando()
&& static_cast<TBarApp*>(be_app)->Settings()->superExpando) {
// Get a list of the signatures of expanded apps. Can't use
// team_id because there can be more than one team per application
if (fVertical && Expando() && vertical && fExpando) {
for (int index = 0; index < fExpando->CountItems(); index++) {
TTeamMenuItem* item
= dynamic_cast<TTeamMenuItem*>(fExpando->ItemAt(index));
if (item != NULL && item->IsExpanded()) {
signature = new BString(item->Signature());
expandedItems.AddItem((void*)signature);
}
}
}
}
PlaceApplicationBar(screenFrame);
SizeWindow(screenFrame);
PositionWindow(screenFrame);
Window()->UpdateIfNeeded();
// Re-expand those apps.
if (expandedItems.CountItems() > 0) {
for (int sigIndex = expandedItems.CountItems(); sigIndex-- > 0;) {
signature = static_cast<BString*>(expandedItems.ItemAt(sigIndex));
if (signature == NULL)
continue;
// Start at the 'bottom' of the list working up.
// Prevents being thrown off by expanding items.
for (int teamIndex = fExpando->CountItems(); teamIndex-- > 0;) {
TTeamMenuItem* item
= dynamic_cast<TTeamMenuItem*>(fExpando->ItemAt(teamIndex));
if (item != NULL && !signature->Compare(item->Signature())) {
item->ToggleExpandState(false);
break;
}
}
}
// Clean up expanded signature list.
while (!expandedItems.IsEmpty()) {
delete static_cast<BString*>(expandedItems.RemoveItem((int32)0));
}
fExpando->SizeWindow();
}
Invalidate();
}