本文整理汇总了C++中BView::IsHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ BView::IsHidden方法的具体用法?C++ BView::IsHidden怎么用?C++ BView::IsHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BView
的用法示例。
在下文中一共展示了BView::IsHidden方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ActivateView
void TMediaTabView::ActivateView(EChildID which)
{
// Give the view the control buttons
BView* view = ChildAt(which);
BPoint pt = view->Bounds().LeftBottom();
// Get the target button position. Slightly different for the
// different view types.
if (which == kElementsView)
pt.y -= kScrollHeight;
else {
pt.x++;
pt.y -= kScrollHeight + 1;
}
for (int i = 0; i < 3; i++) {
view->AddChild(fbuttons[i]);
fbuttons[i]->MoveTo(pt);
pt.x += kScrollHeight;
}
// Make sure it is visible
if (view->IsHidden())
view->Show();
}
示例2: ToggleFields
void MainView::ToggleFields(bool on)
{
Field *child = NULL;
BView *field = NULL;
child = (Field *)ChildAt(0);
while(child) {
field = child->GetField();
if(on) {
if(field->IsHidden()) field->Show();
}
else {
if(!field->IsHidden()) field->Hide();
}
child = (Field *)child->NextSibling();
}
}
示例3: ChildAt
void
PairsView::CreateGameBoard()
{
// Show hidden buttons
for (int32 i = 0; i < CountChildren(); i++) {
BView* child = ChildAt(i);
if (child->IsHidden())
child->Show();
}
_GenerateCardPos();
}
示例4: leftTop
void
BPrintJob::_RecurseView(BView* view, BPoint origin, BPicture* picture,
BRect rect)
{
ASSERT(picture != NULL);
BRegion region;
region.Set(BRect(rect.left, rect.top, rect.right, rect.bottom));
view->fState->print_rect = rect;
view->AppendToPicture(picture);
view->PushState();
view->SetOrigin(origin);
view->ConstrainClippingRegion(®ion);
if (view->ViewColor() != B_TRANSPARENT_COLOR) {
rgb_color highColor = view->HighColor();
view->SetHighColor(view->ViewColor());
view->FillRect(rect);
view->SetHighColor(highColor);
}
view->fIsPrinting = true;
view->Draw(rect);
view->fIsPrinting = false;
view->PopState();
view->EndPicture();
BView* child = view->ChildAt(0);
while (child != NULL) {
if ((child->Flags() & B_WILL_DRAW) && !child->IsHidden()) {
BPoint leftTop(view->Bounds().LeftTop() + child->Frame().LeftTop());
BRect printRect(rect.OffsetToCopy(rect.LeftTop() - leftTop)
& child->Bounds());
if (printRect.IsValid())
_RecurseView(child, origin + leftTop, picture, printRect);
}
child = child->NextSibling();
}
if ((view->Flags() & B_DRAW_ON_CHILDREN) != 0) {
view->AppendToPicture(picture);
view->PushState();
view->SetOrigin(origin);
view->ConstrainClippingRegion(®ion);
view->fIsPrinting = true;
view->DrawAfterChildren(rect);
view->fIsPrinting = false;
view->PopState();
view->EndPicture();
}
}
示例5: 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();
}
示例6: GetPreferredSize
void ArpConfigurePanel::GetPreferredSize(float* width, float* height)
{
float maxw=0, maxh=0;
size_t i;
// Get dimensions of all configuration views.
for( i=0; i<mConfigViews->size(); i++ ) {
BView* view = 0;
if( (view=mConfigViews->at(i)) != 0 ) {
ArpD(cdb << ADH << "Processing dimens for view #" << i
<< ", name="
<< view->Name() << endl);
float vwidth=0, vheight=0;
// If this view is not attached to the window (i.e., it
// is not currently displayed by the tab view), then it
// may not be able to report correct dimensions. To fix
// this, we temporarily add it to your view.
if( !view->Window() ) {
ArpD(cdb << ADH << "Temporarily attaching view to window."
<< endl);
bool hidden = view->IsHidden();
view->Hide();
AddChild(view);
view->GetPreferredSize(&vwidth, &vheight);
RemoveChild(view);
if( !hidden ) view->Show();
} else {
view->GetPreferredSize(&vwidth, &vheight);
}
ArpD(cdb << ADH << "Preferred width=" << vwidth
<< ", height=" << vheight << endl);
if( vwidth > maxw ) maxw = vwidth;
if( vheight > maxh ) maxh = vheight;
}
}
ArpD(cdb << ADH << "Final size=(" << (maxw+mTabWidth)
<< ", " << (maxh+mTabHeight) << ")" << endl);
if( width ) *width = maxw + mTabWidth + 2;
if( height ) *height = maxh + mTabHeight + 2;
}