using namespace Dali;
+using Dali::Toolkit::TextLabel;
+
// Define this so that it is interchangeable
// "DP" stands for Device independent Pixels
#define DP(x) DemoHelper::ScalePointSize(x)
{
// The Init signal is received once (only) during the Application lifetime
+ DemoHelper::RequestThemeChange();
+
Stage stage = Stage::GetCurrent();
// Respond to key events
TOOLBAR_IMAGE,
std::string("") );
- mTitleActor = Dali::Toolkit::TextView::New();
- mTitleActor.SetName( "CUSTOM_TOOLBAR_TITLE" );
+ mTitleActor = DemoHelper::CreateToolBarLabel( "CUSTOM_TOOLBAR_TITLE" );
SetTitle();
}
}
- mTitleActor.SetText( std::string( TOOLBAR_TITLE ) + ": " + subTitle );
- mTitleActor.SetStyleToCurrentText( DemoHelper::GetDefaultTextStyle() );
+ mTitleActor.SetProperty( Toolkit::TextLabel::Property::TEXT, std::string( std::string( TOOLBAR_TITLE ) + ": " + subTitle ) );
}
bool OnMenu( Toolkit::Button button )
mMenu.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mMenu.HideTail();
mMenu.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::HideMenu );
- mMenu.SetPreferredSize( Vector2( popupWidth, 0.0f ) );
+ mMenu.SetSize( popupWidth, 0.0f );
mMenu.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
Toolkit::TableView tableView = Toolkit::TableView::New( 0, 0 );
popup.SetName( "POPUP" );
popup.SetParentOrigin( ParentOrigin::CENTER );
popup.SetAnchorPoint( AnchorPoint::CENTER );
- popup.SetPreferredSize( Vector2( POPUP_WIDTH_DP, 0.0f ) );
+ popup.SetSize( POPUP_WIDTH_DP, 0.0f );
popup.HideTail();
popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched );
{
mPopup = CreatePopup();
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_TITLE_ID )
mPopup = CreatePopup();
mPopup.SetTitle( "Popup!" );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_BUTTONS_1_ID )
mPopup.AddButton( okayButton );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_BUTTONS_2_ID )
mPopup.AddButton( okayButton );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_TITLE_BUTTONS_ID )
mPopup.AddButton( okayButton );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_CONTENT_TEXT_ID )
{
mPopup = CreatePopup();
- Toolkit::TextView text = Toolkit::TextView::New();
+ TextLabel text = TextLabel::New( CONTENT_TEXT );
text.SetName( "POPUP_CONTENT_TEXT" );
- text.SetText( CONTENT_TEXT );
- text.SetMultilinePolicy( Toolkit::TextView::SplitByWord );
- text.SetWidthExceedPolicy( Toolkit::TextView::Split );
- text.SetLineJustification( Toolkit::TextView::Center );
- text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetProperty( TextLabel::Property::MULTI_LINE, true );
+ text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
+ text.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
+ text.SetResizePolicy( FILL_TO_PARENT, Dali::HEIGHT );
text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_ID )
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
image.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- image.SetDimensionDependency( HEIGHT, WIDTH );
+ image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( image );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_SCALE_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
mPopup.Add( image );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_FIT_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
mPopup.Add( image );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_FILL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
mPopup.Add( image );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_TITLE_CONTENT_TEXT_ID )
mPopup = CreatePopup();
mPopup.SetTitle( "Popup!" );
- Toolkit::TextView text = Toolkit::TextView::New();
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT );
text.SetName( "POPUP_CONTENT_TEXT" );
- text.SetText( CONTENT_TEXT );
- text.SetMultilinePolicy( Toolkit::TextView::SplitByWord );
- text.SetWidthExceedPolicy( Toolkit::TextView::Split );
- text.SetLineJustification( Toolkit::TextView::Center );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_TITLE_CONTENT_TEXT_BUTTONS_ID )
mPopup = CreatePopup();
mPopup.SetTitle( "Popup!" );
- Toolkit::TextView text = Toolkit::TextView::New();
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT );
text.SetName( "POPUP_CONTENT_TEXT" );
- text.SetText( CONTENT_TEXT );
- text.SetMultilinePolicy( Toolkit::TextView::SplitByWord );
- text.SetWidthExceedPolicy( Toolkit::TextView::Split );
- text.SetLineJustification( Toolkit::TextView::Left );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
mPopup.Add( text );
mPopup.AddButton( okayButton );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == POPUP_BUTTON_COMPLEX_ID )
// Text
{
- Toolkit::TextView text = Toolkit::TextView::New();
- text.SetText( "Do you really want to quit?" );
- text.SetMultilinePolicy( Toolkit::TextView::SplitByWord );
- text.SetWidthExceedPolicy( Toolkit::TextView::Split );
- text.SetLineJustification( Toolkit::TextView::Left );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Do you really want to quit?" );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) );
}
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) );
image.SetName( "COMPLEX_IMAGE" );
image.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- image.SetDimensionDependency( HEIGHT, WIDTH );
+ image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) );
}
Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
checkBox.SetBackgroundImage( unchecked );
checkBox.SetSelectedImage( checked );
- checkBox.SetPreferredSize( Vector2( 48, 48 ) );
- checkBox.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ checkBox.SetSize( 48, 48 );
root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) );
- Toolkit::TextView text = Toolkit::TextView::New();
- text.SetText( "Don't show again" );
- text.SetLineJustification( Toolkit::TextView::Left );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Don't show again" );
Actor textActor = text;
textActor.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 10.0f ) );
root.AddChild( text, Toolkit::TableView::CellPosition( 0, 1 ) );
- content.AddChild( root, Toolkit::TableView::CellPosition( 1, 0, 0, 2 ) ); // Column span 2
+ content.AddChild( root, Toolkit::TableView::CellPosition( 1, 0 ) );
}
mPopup.Add( content );
mPopup.AddButton( okayButton );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_EMPTY_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fixed" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fill" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fill" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fixed" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fill" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fixed" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fill" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
-
Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
table.SetFitHeight( 1 );
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fill" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fill" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 300.0f ) );
+ backing.SetSize( 0.0f, 300.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- TextActor text = TextActor::New( "Fixed" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
- TextActor text = TextActor::New( "Fit" );
+ Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
text.SetParentOrigin( ParentOrigin::CENTER );
backing.Add( text );
mPopup.Add( table );
- // The popup is not yet on the stage so needs to be flaged as dirty
- mPopup.MarkDirtyForRelayout();
-
mPopup.Show();
}
else if( button.GetName() == OKAY_BUTTON_ID || button.GetName() == CANCEL_BUTTON_ID )
Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
Layer mContentLayer; ///< Content layer
- Toolkit::TextView mTitleActor; ///< Title text
+ Toolkit::TextLabel mTitleActor; ///< Title text
Toolkit::Popup mMenu; ///< The navigation menu
bool mMenuShown; ///< If the navigation menu is currently being displayed or not