本文整理汇总了C++中BGridLayout::SetMinRowHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ BGridLayout::SetMinRowHeight方法的具体用法?C++ BGridLayout::SetMinRowHeight怎么用?C++ BGridLayout::SetMinRowHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BGridLayout
的用法示例。
在下文中一共展示了BGridLayout::SetMinRowHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BMessage
//.........这里部分代码省略.........
}
else
{
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
BGridLayout* layout = new BGridLayout( B_VERTICAL );
if ( !layout ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
MainView->SetLayout( layout );
layout->SetInsets( 0, 0, 0, 5 );
layout->SetSpacing( 0, 2 );
menuBar = CreateMenuBar();
layout->AddView( menuBar, 0, 0 );
BTabView* tabView = new BTabView( Bounds().InsetBySelf( 5, 30 ),
"Tab view" );
if ( !tabView ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
BLayoutItem* layoutItem = layout->AddView( tabView, 0, 1 );
if ( layoutItem ) {
layoutItem->SetExplicitAlignment( BAlignment( B_ALIGN_USE_FULL_WIDTH, B_ALIGN_USE_FULL_HEIGHT ) );
}
BRect individualTab = tabView->Bounds();
individualTab.bottom -= ( tabView->TabHeight() + 20 + menuBar->Bounds().Height() );
// Enable firing the activity in any case
fData.SetEventActivityFired( false );
// General view
genView = new EventEditor_GeneralView( individualTab, &fData );
if ( !genView || genView->InitCheck() != B_OK ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
BTab* tab = new BTab();
tabView->AddTab( genView, tab );
tab->SetLabel( "General" );
// Reminder view
remView = new EventEditor_ReminderView( individualTab, &fData );
if ( !remView || remView->InitCheck() != B_OK ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
tab = new BTab();
tabView->AddTab( remView, tab );
tab->SetLabel( "Reminder" );
// Event activity
actView = new ActivityView( individualTab.InsetByCopy( 5, 5 ), "Event activity", fData.GetEventActivity() );
if ( !actView || actView->InitCheck() != B_OK ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
tab = new BTab();
tabView->AddTab( actView, tab );
tab->SetLabel( "Activity" );
// Note view
noteView = new EventEditor_NoteView( individualTab.InsetByCopy( 5, 5 ), &fData );
if ( !noteView || noteView->InitCheck() != B_OK ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
tab = new BTab();
tabView->AddTab( noteView, tab );
tab->SetLabel( "Note" );
menuBar->SetTargetForItems( this );
// Save button
saveAndClose = new BButton( BRect( 0, 0, 1, 1 ),
"Save",
"Save",
new BMessage( kFileSave ) );
if ( !saveAndClose ) {
global_toReturn = B_NO_MEMORY;
be_app->PostMessage( B_QUIT_REQUESTED );
}
BLayoutItem* layoutItem2 = layout->AddView( saveAndClose, 0, 2 );
if ( layoutItem ) {
layoutItem->SetExplicitAlignment( BAlignment( B_ALIGN_RIGHT, B_ALIGN_BOTTOM ) );
}
saveAndClose->SetTarget( this );
layout->SetMaxRowHeight( 1, 520 );
layout->SetMinRowHeight( 2, 25 );
// Refresh view
InvalidateLayout();
MainView->Invalidate();
} // <-- end of UI initialization for MainWindow