本文整理汇总了C++中BView::RemoveChild方法的典型用法代码示例。如果您正苦于以下问题:C++ BView::RemoveChild方法的具体用法?C++ BView::RemoveChild怎么用?C++ BView::RemoveChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BView
的用法示例。
在下文中一共展示了BView::RemoveChild方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BStringView
void
ServerSettingsView::_GetAuthEncrMenu(entry_ref protocol,
BMenuField*& authField, BMenuField*& sslField)
{
BMailAccountSettings dummySettings;
BView *view = new BStringView("", "Not here!");//CreateConfigView(protocol, dummySettings.InboundSettings(),
// dummySettings, fImageId);
authField = (BMenuField*)view->FindView("auth_method");
sslField = (BMenuField*)view->FindView("flavor");
view->RemoveChild(authField);
view->RemoveChild(sslField);
delete view;
}
示例2: NoRenamer
void PecoApp::NoRenamer() {
if (fRenameMode == MODE_NONE) return;
fWindow->Lock();
BMenuField *myField = (BMenuField *)fWindow->FindView("selectMode");
BMenu *myMenu = myField->Menu();
myMenu->FindMarked()->SetMarked(false);
myField->MenuItem()->SetLabel(STR_PLEASE_SELECT);
BView *bottomView = fWindow->FindView("bottomView");
bottomView->RemoveChild((BView *)((PecoApp *)be_app)->fRenamers[fRenameMode]);
fRenameMode = MODE_NONE;
float deltaHeight = - be_plain_font->Size()*2 - 40;
float min_h, max_h, min_v, max_v;
fWindow->GetSizeLimits( &min_h, &max_h, &min_v, &max_v );
fWindow->SetSizeLimits( min_h, max_h, min_v + deltaHeight, max_v );
fWindow->FindView("topView")->SetResizingMode(0);
fWindow->FindView("bottomView")->SetResizingMode(B_FOLLOW_TOP_BOTTOM);
fWindow->ResizeBy(0, deltaHeight);
fWindow->FindView("topView")->SetResizingMode(B_FOLLOW_TOP_BOTTOM);
fWindow->FindView("bottomView")->SetResizingMode(B_FOLLOW_BOTTOM);
fWindow->Unlock();
}
示例3: ChangeRenamer
void PecoApp::ChangeRenamer() {
BMenuField *myField = (BMenuField *)fWindow->FindView("selectMode");
BMenu *myMenu = myField->Menu();
if (fRenameMode != myMenu->IndexOf(myField->Menu()->FindMarked())) {
BView *bottomView = fWindow->FindView("bottomView");
fWindow->Lock();
if (fRenameMode != -1)
bottomView->RemoveChild((BView *)((PecoApp *)be_app)->fRenamers[fRenameMode]);
else {
float deltaHeight = be_plain_font->Size()*2 + 40;
fWindow->FindView("topView")->SetResizingMode(0);
fWindow->FindView("bottomView")->SetResizingMode(B_FOLLOW_TOP_BOTTOM);
fWindow->ResizeBy(0, deltaHeight);
fWindow->FindView("topView")->SetResizingMode(B_FOLLOW_TOP_BOTTOM);
fWindow->FindView("bottomView")->SetResizingMode(B_FOLLOW_BOTTOM);
float min_h, max_h, min_v, max_v;
fWindow->GetSizeLimits( &min_h, &max_h, &min_v, &max_v );
fWindow->SetSizeLimits( min_h, max_h, min_v + deltaHeight, max_v );
}
fRenameMode = myMenu->IndexOf(myField->Menu()->FindMarked());
bottomView->AddChild(((PecoApp *)be_app)->fRenamers[fRenameMode]);
if (((PecoApp *)be_app)->fRenamers[fRenameMode]->ChildAt(0) != NULL)
((PecoApp *)be_app)->fRenamers[fRenameMode]->ChildAt(0)->MakeFocus();
else
fWindow->FindView("DoIt")->MakeFocus();
fWindow->Unlock();
MakeList();
}
}
示例4: DeactivateView
void TMediaTabView::DeactivateView(EChildID which)
{
// Take away the control buttons
BView* view = ChildAt(which);
BView* b = view->ChildAt(0);
while (b) {
BView* next = b->NextSibling();
if (dynamic_cast<TRadioBitmapButton*>(b) != 0)
view->RemoveChild(b);
b = next;
}
// Make sure the view is invisible
if (!view->IsHidden())
view->Hide();
}