void FileSelectionPage::_BuildUI(const char* description) { BRect rect(Bounds()); fDescription = CreateDescription(rect, "description", description); MakeHeading(fDescription); AddChild(fDescription); BString file; fSettings->FindString("file", &file); fSelect = new BButton(rect, "select", B_TRANSLATE_COMMENT("Select", "Button"), new BMessage(kMsgOpenFilePanel), B_FOLLOW_RIGHT); fSelect->ResizeToPreferred(); float selectLeft = rect.right - fSelect->Bounds().Width(); rect.right = selectLeft - kFileButtonDistance; fFile = new BTextControl(rect, "file", B_TRANSLATE_COMMENT("File:", "Text control label"), file.String(), new BMessage()); fFile->SetDivider(be_plain_font->StringWidth(fFile->Label()) + 5); AddChild(fFile); fSelect->MoveTo(selectLeft, 0); AddChild(fSelect); _Layout(); }
void ParagraphLayout::_ValidateLayout() { if (!fLayoutValid) { _Layout(); fLayoutValid = true; } }
void IconList::AttachedToWindow( void ) { SetFgColor( get_default_color( COL_MENU_TEXT ) ); SetEraseColor( get_default_color( COL_SHINE ) ); SetBgColor( get_default_color( COL_SHINE ) ); _Layout(); }
void IconList::InnerView::AddIcon( Image *pcImage, String cName ) { Icon *pcIcon = new Icon( Rect(), pcImage, cName ); AddChild( pcIcon ); m_vIcons.push_back( pcIcon ); _Layout(); }
void TextDocumentLayout::_ValidateLayout() { if (!fLayoutValid) { _Layout(); fLayoutValid = true; } }
void IconList::InnerView::FrameSized( const Point &cDelta ) { Rect cFrame = GetFrame(); m_cSize.x = cFrame.Width(); m_cSize.y = cFrame.Height(); _Layout(); }
void IconList::InnerView::AttachedToWindow( void ) { View *pcParent = GetParent(); SetFgColor( pcParent->GetFgColor() ); SetEraseColor( pcParent->GetEraseColor() ); SetBgColor( pcParent->GetBgColor() ); _Layout(); }
void DefaultPartitionPage::_BuildUI() { const float kTextDistance = be_control_look->DefaultItemSpacing(); BRect rect(Bounds()); BString text; text << B_TRANSLATE_COMMENT("Default Partition", "Title") << "\n" << B_TRANSLATE("Please specify a default partition and a timeout.\n" "The boot menu will load the default partition after " "the timeout unless you select another partition. You " "can also have the boot menu wait indefinitely for you " "to select a partition.\n" "Keep the 'ALT' key pressed to disable the timeout at boot time."); fDescription = CreateDescription(rect, "description", text); MakeHeading(fDescription); AddChild(fDescription); LayoutDescriptionVertically(fDescription); rect.top = fDescription->Frame().bottom + kTextDistance; BPopUpMenu* popUpMenu = _CreatePopUpMenu(); fDefaultPartition = new BMenuField(rect, "partitions", B_TRANSLATE_COMMENT("Default Partition:", "Menu field label"), popUpMenu); float divider = be_plain_font->StringWidth(fDefaultPartition->Label()) + 3; fDefaultPartition->SetDivider(divider); AddChild(fDefaultPartition); fDefaultPartition->ResizeToPreferred(); // timeout slider rect.top = fDefaultPartition->Frame().bottom + kTextDistance; int32 timeout; fSettings->FindInt32("timeout", &timeout); BString timeoutLabel; _GetTimeoutLabel(timeout, timeoutLabel); int32 sliderValue = get_index_for_timeout(timeout); fTimeoutSlider = new BSlider(rect, "timeout", timeoutLabel.String(), new BMessage(kMsgTimeout), 0, kNumberOfTimeoutOptions-1, B_BLOCK_THUMB, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fTimeoutSlider->SetModificationMessage(new BMessage(kMsgTimeout)); fTimeoutSlider->SetValue(sliderValue); fTimeoutSlider->SetLimitLabels(B_TRANSLATE("Immediately"), B_TRANSLATE("Never")); fTimeoutSlider->SetHashMarks(B_HASH_MARKS_BOTTOM); fTimeoutSlider->SetHashMarkCount(kNumberOfTimeoutOptions); fTimeoutSlider->ResizeToPreferred(); AddChild(fTimeoutSlider); _Layout(); }
void IconList::AddIcon( Image *pcImage, String cName ) { m_pcInnerView->AddIcon( pcImage, cName ); _Layout(); }
void IconList::FrameSized( const Point &cDelta ) { _Layout(); }
void FileSelectionPage::FrameResized(float width, float height) { WizardPageView::FrameResized(width, height); _Layout(); }
void ParagraphLayout::_ValidateLayout() { if (!fLayoutValid) _Layout(); }
void DefaultPartitionPage::FrameResized(float width, float height) { WizardPageView::FrameResized(width, height); _Layout(); }