本文整理汇总了C++中StaticString::MoveTo方法的典型用法代码示例。如果您正苦于以下问题:C++ StaticString::MoveTo方法的具体用法?C++ StaticString::MoveTo怎么用?C++ StaticString::MoveTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StaticString
的用法示例。
在下文中一共展示了StaticString::MoveTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BMessage
//.........这里部分代码省略.........
mainWidth = MathUtils::max( mainWidth, r.right ) ;
mainHeight = MathUtils::max( mainHeight, r.bottom ) ;
//=================================================================
// File Main View
//=================================================================
fpContaining = new BTextControl( BRect( 3, 3, 10, 10 ) ,
"containing", "Containing Text:", "", NULL ) ;
fFileView->AddChild( fpContaining ) ;
width = fpContaining->StringWidth( "Containing Text:" ) ;
width *= 2.5 ;
fpContaining->ResizeTo( width , 10 ) ;
fpContaining->ResizeToPreferred() ;
r = fpContaining->Frame() ;
top = r.bottom + 7 ;
StaticString * sv = new StaticString( BRect( 3, 3, 50, 10 ) , "kb",
"kB" ) ;
sv -> ResizeToPreferred() ;
r = sv->Frame() ;
width -= (r.Width() + 3) ;
fpSizeGT = new BTextControl(
BRect( 3, top, width - 3, top + 10 ) ,
"size", "Size at least: ", "", NULL ) ;
fFileView->AddChild( fpSizeGT ) ;
fpSizeGT->ResizeToPreferred() ;
fpSizeGT->SetDivider( fpContaining->Divider() ) ;
r = fpSizeGT->Frame() ;
fpSizeGT->ResizeTo( width - 6, r.Height() ) ;
r = fpSizeGT->Frame() ;
top = r.bottom - sv->Frame().Height() ;
sv->MoveTo( width , top ) ;
fFileView->AddChild( sv ) ;
top = r.bottom + 4 ;
sv = new StaticString( BRect( 3, 3, 50, 10 ) , "kb",
"kB" ) ;
sv -> ResizeToPreferred() ;
r = sv->Frame() ;
fpSizeLT = new BTextControl(
BRect( 3, top, width - 3, top + 10 ) ,
"size", "Size less than: ", "", NULL ) ;
fFileView->AddChild( fpSizeLT ) ;
fpSizeLT->ResizeToPreferred() ;
fpSizeLT->SetDivider( fpContaining->Divider() ) ;
r = fpSizeLT->Frame() ;
fpSizeLT->ResizeTo( width - 6, r.Height() ) ;
r = fpSizeLT->Frame() ;
top = r.bottom - sv->Frame().Height() ;
sv->MoveTo( width , top ) ;
fFileView->AddChild( sv ) ;
width = sv->Frame().right ;
top = r.bottom + 7 ;
fpKind = new StringPopUp( BRect( 3, top, width, top + 10 ) ,
"kind", "Kind: ") ;
fpKind->AddStrings( sizeof(kKindStr)/sizeof(kKindStr[0]), kKindStr) ;
fFileView->AddChild( fpKind ) ;
fpKind->ResizeToPreferred() ;
r = fpKind->Frame() ;
width = MathUtils::max( r.right, fpContaining->Frame().right ) ;