Commit 2a8a2120f4a6831bf88ef50d9852f0396631520c

Authored by Ferran Sole
2 parents a97c94ec d8498e60

[dali_1.0.38] Merge branch 'tizen'

Change-Id: I34e01f36eb917faff4999ef666f60692d80c0433
demo/dali-demo.cpp
@@ -57,7 +57,9 @@ int main(int argc, char **argv) @@ -57,7 +57,9 @@ int main(int argc, char **argv)
57 demo.AddExample(Example("text-label-emojis.example", DALI_DEMO_STR_TITLE_EMOJI_TEXT)); 57 demo.AddExample(Example("text-label-emojis.example", DALI_DEMO_STR_TITLE_EMOJI_TEXT));
58 demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES)); 58 demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES));
59 demo.AddExample(Example("path-animation.example", DALI_DEMO_STR_TITLE_PATH_ANIMATION)); 59 demo.AddExample(Example("path-animation.example", DALI_DEMO_STR_TITLE_PATH_ANIMATION));
60 - demo.AddExample(Example("size-negotiation.example", "Size Negotiation")); 60 + demo.AddExample(Example("size-negotiation.example", DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE));
  61 + demo.AddExample(Example("buttons.example", DALI_DEMO_STR_TITLE_BUTTONS));
  62 + demo.AddExample(Example("logging.example", DALI_DEMO_STR_TITLE_LOGGING));
61 63
62 demo.SortAlphabetically( true ); 64 demo.SortAlphabetically( true );
63 65
demo/dali-table-view.cpp
@@ -106,7 +106,7 @@ ImageActor CreateBackground( std::string imagePath ) @@ -106,7 +106,7 @@ ImageActor CreateBackground( std::string imagePath )
106 background.SetAnchorPoint( AnchorPoint::CENTER ); 106 background.SetAnchorPoint( AnchorPoint::CENTER );
107 background.SetParentOrigin( ParentOrigin::CENTER ); 107 background.SetParentOrigin( ParentOrigin::CENTER );
108 background.SetZ( -1.0f ); 108 background.SetZ( -1.0f );
109 - background.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 109 + background.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
110 110
111 return background; 111 return background;
112 } 112 }
@@ -228,7 +228,7 @@ void DaliTableView::Initialize( Application& application ) @@ -228,7 +228,7 @@ void DaliTableView::Initialize( Application& application )
228 mRootActor = TableView::New( 4, 1 ); 228 mRootActor = TableView::New( 4, 1 );
229 mRootActor.SetAnchorPoint( AnchorPoint::CENTER ); 229 mRootActor.SetAnchorPoint( AnchorPoint::CENTER );
230 mRootActor.SetParentOrigin( ParentOrigin::CENTER ); 230 mRootActor.SetParentOrigin( ParentOrigin::CENTER );
231 - mRootActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 231 + mRootActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
232 Stage::GetCurrent().Add( mRootActor ); 232 Stage::GetCurrent().Add( mRootActor );
233 233
234 // Toolbar at top 234 // Toolbar at top
@@ -244,7 +244,7 @@ void DaliTableView::Initialize( Application& application ) @@ -244,7 +244,7 @@ void DaliTableView::Initialize( Application& application )
244 // Add logo 244 // Add logo
245 Dali::ImageActor logo = CreateLogo( LOGO_PATH ); 245 Dali::ImageActor logo = CreateLogo( LOGO_PATH );
246 logo.SetName( "LOGO_IMAGE" ); 246 logo.SetName( "LOGO_IMAGE" );
247 - logo.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS ); 247 + logo.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
248 const float paddingHeight = ( ( 1.f-TABLE_RELATIVE_SIZE.y ) * stageSize.y ); 248 const float paddingHeight = ( ( 1.f-TABLE_RELATIVE_SIZE.y ) * stageSize.y );
249 const float logoMargin = paddingHeight * LOGO_MARGIN_RATIO; 249 const float logoMargin = paddingHeight * LOGO_MARGIN_RATIO;
250 250
@@ -258,8 +258,8 @@ void DaliTableView::Initialize( Application& application ) @@ -258,8 +258,8 @@ void DaliTableView::Initialize( Application& application )
258 Alignment alignment = Alignment::New(); 258 Alignment alignment = Alignment::New();
259 alignment.SetName( "LOGO_ALIGNMENT" ); 259 alignment.SetName( "LOGO_ALIGNMENT" );
260 alignment.Add( logo ); 260 alignment.Add( logo );
261 - alignment.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
262 - alignment.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 261 + alignment.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  262 + alignment.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
263 Actor alignmentActor = alignment; 263 Actor alignmentActor = alignment;
264 alignmentActor.SetPadding( Padding( 0.0f, 0.0f, logoMargin, logoMargin )); 264 alignmentActor.SetPadding( Padding( 0.0f, 0.0f, logoMargin, logoMargin ));
265 mRootActor.AddChild( alignment, TableView::CellPosition( 1, 0 ) ); 265 mRootActor.AddChild( alignment, TableView::CellPosition( 1, 0 ) );
@@ -271,7 +271,7 @@ void DaliTableView::Initialize( Application& application ) @@ -271,7 +271,7 @@ void DaliTableView::Initialize( Application& application )
271 271
272 mScrollView.SetAnchorPoint( AnchorPoint::CENTER ); 272 mScrollView.SetAnchorPoint( AnchorPoint::CENTER );
273 mScrollView.SetParentOrigin( ParentOrigin::CENTER ); 273 mScrollView.SetParentOrigin( ParentOrigin::CENTER );
274 - mScrollView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 274 + mScrollView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
275 const float buttonsPageMargin = ( 1.0f - TABLE_RELATIVE_SIZE.x ) * 0.5f * stageSize.width; 275 const float buttonsPageMargin = ( 1.0f - TABLE_RELATIVE_SIZE.x ) * 0.5f * stageSize.width;
276 mScrollView.SetPadding( Padding( buttonsPageMargin, buttonsPageMargin, 0.0f, 0.0f ) ); 276 mScrollView.SetPadding( Padding( buttonsPageMargin, buttonsPageMargin, 0.0f, 0.0f ) );
277 277
@@ -284,13 +284,13 @@ void DaliTableView::Initialize( Application& application ) @@ -284,13 +284,13 @@ void DaliTableView::Initialize( Application& application )
284 mScrollViewLayer.SetAnchorPoint( AnchorPoint::CENTER ); 284 mScrollViewLayer.SetAnchorPoint( AnchorPoint::CENTER );
285 mScrollViewLayer.SetParentOrigin( ParentOrigin::CENTER ); 285 mScrollViewLayer.SetParentOrigin( ParentOrigin::CENTER );
286 mScrollViewLayer.SetDrawMode( DrawMode::OVERLAY ); 286 mScrollViewLayer.SetDrawMode( DrawMode::OVERLAY );
287 - mScrollViewLayer.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 287 + mScrollViewLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
288 288
289 // Create solid background colour. 289 // Create solid background colour.
290 ImageActor backgroundColourActor = Dali::Toolkit::CreateSolidColorActor( BACKGROUND_COLOR ); 290 ImageActor backgroundColourActor = Dali::Toolkit::CreateSolidColorActor( BACKGROUND_COLOR );
291 backgroundColourActor.SetAnchorPoint( AnchorPoint::CENTER ); 291 backgroundColourActor.SetAnchorPoint( AnchorPoint::CENTER );
292 backgroundColourActor.SetParentOrigin( ParentOrigin::CENTER ); 292 backgroundColourActor.SetParentOrigin( ParentOrigin::CENTER );
293 - backgroundColourActor.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 293 + backgroundColourActor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
294 backgroundColourActor.SetSizeModeFactor( Vector3( 1.0f, 1.5f, 1.0f ) ); 294 backgroundColourActor.SetSizeModeFactor( Vector3( 1.0f, 1.5f, 1.0f ) );
295 backgroundColourActor.SetZ( BACKGROUND_Z ); 295 backgroundColourActor.SetZ( BACKGROUND_Z );
296 mScrollViewLayer.Add( backgroundColourActor ); 296 mScrollViewLayer.Add( backgroundColourActor );
@@ -298,7 +298,7 @@ void DaliTableView::Initialize( Application& application ) @@ -298,7 +298,7 @@ void DaliTableView::Initialize( Application& application )
298 // Populate background and bubbles - needs to be scrollViewLayer so scroll ends show 298 // Populate background and bubbles - needs to be scrollViewLayer so scroll ends show
299 Actor bubbleContainer = Actor::New(); 299 Actor bubbleContainer = Actor::New();
300 bubbleContainer.SetRelayoutEnabled( true ); 300 bubbleContainer.SetRelayoutEnabled( true );
301 - bubbleContainer.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 301 + bubbleContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
302 bubbleContainer.SetAnchorPoint( AnchorPoint::CENTER ); 302 bubbleContainer.SetAnchorPoint( AnchorPoint::CENTER );
303 bubbleContainer.SetParentOrigin( ParentOrigin::CENTER ); 303 bubbleContainer.SetParentOrigin( ParentOrigin::CENTER );
304 mScrollViewLayer.Add( bubbleContainer ); 304 mScrollViewLayer.Add( bubbleContainer );
@@ -306,7 +306,7 @@ void DaliTableView::Initialize( Application& application ) @@ -306,7 +306,7 @@ void DaliTableView::Initialize( Application& application )
306 SetupBackground( bubbleContainer ); 306 SetupBackground( bubbleContainer );
307 307
308 Alignment buttonsAlignment = Alignment::New(); 308 Alignment buttonsAlignment = Alignment::New();
309 - buttonsAlignment.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 309 + buttonsAlignment.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
310 buttonsAlignment.Add( mScrollViewLayer ); 310 buttonsAlignment.Add( mScrollViewLayer );
311 311
312 mScrollViewLayer.Add( mScrollView ); 312 mScrollViewLayer.Add( mScrollView );
@@ -395,7 +395,7 @@ void DaliTableView::Populate() @@ -395,7 +395,7 @@ void DaliTableView::Populate()
395 TableView page = TableView::New( 3, 3 ); 395 TableView page = TableView::New( 3, 3 );
396 page.SetAnchorPoint( AnchorPoint::CENTER ); 396 page.SetAnchorPoint( AnchorPoint::CENTER );
397 page.SetParentOrigin( ParentOrigin::CENTER ); 397 page.SetParentOrigin( ParentOrigin::CENTER );
398 - page.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 398 + page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
399 mScrollView.Add( page ); 399 mScrollView.Add( page );
400 400
401 // Calculate the number of images going across (columns) within a page, according to the screen resolution and dpi. 401 // Calculate the number of images going across (columns) within a page, according to the screen resolution and dpi.
@@ -492,7 +492,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit @@ -492,7 +492,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
492 content.SetAnchorPoint( AnchorPoint::CENTER ); 492 content.SetAnchorPoint( AnchorPoint::CENTER );
493 content.SetParentOrigin( ParentOrigin::CENTER ); 493 content.SetParentOrigin( ParentOrigin::CENTER );
494 content.SetRelayoutEnabled( true ); 494 content.SetRelayoutEnabled( true );
495 - content.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 495 + content.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
496 content.SetSizeModeFactor( sizeMultiplier ); 496 content.SetSizeModeFactor( sizeMultiplier );
497 497
498 // create background image 498 // create background image
@@ -503,7 +503,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit @@ -503,7 +503,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
503 image.SetAnchorPoint( AnchorPoint::CENTER ); 503 image.SetAnchorPoint( AnchorPoint::CENTER );
504 image.SetParentOrigin( ParentOrigin::CENTER ); 504 image.SetParentOrigin( ParentOrigin::CENTER );
505 // make the image 100% of tile 505 // make the image 100% of tile
506 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 506 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
507 507
508 // move image back to get text appear in front 508 // move image back to get text appear in front
509 image.SetZ( -1 ); 509 image.SetZ( -1 );
@@ -513,7 +513,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit @@ -513,7 +513,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
513 513
514 // Add stencil 514 // Add stencil
515 ImageActor stencil = NewStencilImage(); 515 ImageActor stencil = NewStencilImage();
516 - stencil.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 516 + stencil.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
517 image.Add( stencil ); 517 image.Add( stencil );
518 } 518 }
519 519
@@ -524,7 +524,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit @@ -524,7 +524,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
524 label.SetProperty( TextLabel::Property::TEXT, title ); 524 label.SetProperty( TextLabel::Property::TEXT, title );
525 label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 525 label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
526 label.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 526 label.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
527 - label.SetResizePolicy( FILL_TO_PARENT, HEIGHT ); 527 + label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
528 label.SetColor( TABLE_TEXT_STYLE_COLOR ); 528 label.SetColor( TABLE_TEXT_STYLE_COLOR );
529 content.Add( label ); 529 content.Add( label );
530 530
@@ -1000,9 +1000,9 @@ void DaliTableView::OnLogoTapped( Dali::Actor actor, const Dali::TapGesture& tap @@ -1000,9 +1000,9 @@ void DaliTableView::OnLogoTapped( Dali::Actor actor, const Dali::TapGesture& tap
1000 mVersionPopup = Dali::Toolkit::Popup::New(); 1000 mVersionPopup = Dali::Toolkit::Popup::New();
1001 mVersionPopup.SetParentOrigin( ParentOrigin::CENTER ); 1001 mVersionPopup.SetParentOrigin( ParentOrigin::CENTER );
1002 mVersionPopup.SetAnchorPoint( AnchorPoint::CENTER ); 1002 mVersionPopup.SetAnchorPoint( AnchorPoint::CENTER );
1003 - mVersionPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 1003 + mVersionPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
1004 mVersionPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 1004 mVersionPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
1005 - mVersionPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 1005 + mVersionPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
1006 mVersionPopup.SetTitle( stream.str() ); 1006 mVersionPopup.SetTitle( stream.str() );
1007 mVersionPopup.HideTail(); 1007 mVersionPopup.HideTail();
1008 mVersionPopup.OutsideTouchedSignal().Connect( this, &DaliTableView::HideVersionPopup ); 1008 mVersionPopup.OutsideTouchedSignal().Connect( this, &DaliTableView::HideVersionPopup );
examples/animated-shapes/animated-shapes-example.cpp
@@ -56,7 +56,7 @@ public: @@ -56,7 +56,7 @@ public:
56 56
57 //Create a view 57 //Create a view
58 mView = Dali::Toolkit::View::New(); 58 mView = Dali::Toolkit::View::New();
59 - mView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 59 + mView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
60 stage.Add( mView ); 60 stage.Add( mView );
61 61
62 //Set background image for the view 62 //Set background image for the view
examples/blocks/blocks-example.cpp
@@ -359,7 +359,7 @@ private: @@ -359,7 +359,7 @@ private:
359 mLevelContainer.SetAnchorPoint( AnchorPoint::CENTER ); 359 mLevelContainer.SetAnchorPoint( AnchorPoint::CENTER );
360 mLevelContainer.SetParentOrigin( ParentOrigin::CENTER ); 360 mLevelContainer.SetParentOrigin( ParentOrigin::CENTER );
361 mLevelContainer.SetRelayoutEnabled( true ); 361 mLevelContainer.SetRelayoutEnabled( true );
362 - mLevelContainer.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 362 + mLevelContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
363 mContentLayer.Add( mLevelContainer ); 363 mContentLayer.Add( mLevelContainer );
364 364
365 mBrickCount = 0; 365 mBrickCount = 0;
examples/builder/examples.cpp
@@ -395,7 +395,7 @@ public: @@ -395,7 +395,7 @@ public:
395 { 395 {
396 TextLabel label = TextLabel::New( ShortName( text ) ); 396 TextLabel label = TextLabel::New( ShortName( text ) );
397 label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "builderlabel" ); 397 label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "builderlabel" );
398 - label.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 398 + label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
399 399
400 // Hook up tap detector 400 // Hook up tap detector
401 mTapDetector.Attach( label ); 401 mTapDetector.Attach( label );
examples/buttons/buttons-example.cpp
@@ -21,21 +21,9 @@ @@ -21,21 +21,9 @@
21 21
22 using namespace Dali; 22 using namespace Dali;
23 23
24 -namespace  
25 -{  
26 -// Used to produce visually same dimensions on desktop and device builds  
27 -float ScalePointSize( int pointSize )  
28 -{  
29 - Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi();  
30 - float meanDpi = (dpi.height + dpi.width) * 0.5f;  
31 - return pointSize * meanDpi / 220.0f;  
32 -}  
33 -  
34 -} // namespace  
35 -  
36 // Define this so that it is interchangeable 24 // Define this so that it is interchangeable
37 // "DP" stands for Device independent Pixels 25 // "DP" stands for Device independent Pixels
38 -#define DP(x) ScalePointSize(x) 26 +#define DP(x) x
39 27
40 28
41 namespace 29 namespace
@@ -67,7 +55,7 @@ const char* const CHECKBOX_SELECTED_IMAGE = DALI_IMAGE_DIR "checkbox-selected.pn @@ -67,7 +55,7 @@ const char* const CHECKBOX_SELECTED_IMAGE = DALI_IMAGE_DIR "checkbox-selected.pn
67 const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f ); 55 const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f );
68 56
69 // Layout sizes 57 // Layout sizes
70 -const int RADIO_LABEL_THUMBNAIL_SIZE = 48; 58 +const int RADIO_LABEL_THUMBNAIL_SIZE = 60;
71 const int RADIO_IMAGE_SPACING = 8; 59 const int RADIO_IMAGE_SPACING = 8;
72 const int BUTTON_HEIGHT = 48; 60 const int BUTTON_HEIGHT = 48;
73 61
@@ -122,25 +110,45 @@ class ButtonsController: public ConnectionTracker @@ -122,25 +110,45 @@ class ButtonsController: public ConnectionTracker
122 TOOLBAR_IMAGE, 110 TOOLBAR_IMAGE,
123 TOOLBAR_TITLE ); 111 TOOLBAR_TITLE );
124 112
125 - int yPos = TOP_MARGIN + MARGIN_SIZE; 113 + Toolkit::TableView contentTable = Toolkit::TableView::New( 4, 1 );
  114 + contentTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  115 + contentTable.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  116 + contentTable.SetAnchorPoint( AnchorPoint::TOP_LEFT );
  117 + contentTable.SetParentOrigin( ParentOrigin::TOP_LEFT );
  118 + contentTable.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
  119 +// contentTable.TouchedSignal().Connect( this, &ButtonsController::OnTouchEvent );
  120 +
  121 + for( unsigned int i = 0; i < contentTable.GetRows(); ++i )
  122 + {
  123 + contentTable.SetFitHeight( i );
  124 + }
  125 +
  126 + contentTable.SetPosition( 0.0f, TOP_MARGIN );
  127 +
  128 + mContentLayer.Add( contentTable );
126 129
127 // Image selector radio group 130 // Image selector radio group
128 - Actor radioGroup2Background = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
129 - radioGroup2Background.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
130 - radioGroup2Background.SetParentOrigin( ParentOrigin::TOP_LEFT );  
131 - radioGroup2Background.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
132 - radioGroup2Background.SetRelayoutEnabled( true );  
133 - radioGroup2Background.SetSize( DP(348), DP(GROUP2_HEIGHT) );  
134 - mContentLayer.Add( radioGroup2Background );  
135 -  
136 - Actor radioButtonsGroup2 = Actor::New();  
137 - radioButtonsGroup2.SetParentOrigin( ParentOrigin::TOP_LEFT );  
138 - radioButtonsGroup2.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
139 - radioButtonsGroup2.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );  
140 - radioButtonsGroup2.SetRelayoutEnabled( true );  
141 - radioButtonsGroup2.SetSize( DP(100), DP(160) );  
142 -  
143 - radioGroup2Background.Add( radioButtonsGroup2 ); 131 + Toolkit::TableView radioGroup2Background = Toolkit::TableView::New( 2, 2 );
  132 + radioGroup2Background.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  133 + radioGroup2Background.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  134 + radioGroup2Background.SetBackgroundColor( BACKGROUND_COLOUR );
  135 + radioGroup2Background.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  136 + radioGroup2Background.SetFitHeight( 0 );
  137 + radioGroup2Background.SetFitHeight( 1 );
  138 + radioGroup2Background.SetFitWidth( 0 );
  139 +
  140 + contentTable.Add( radioGroup2Background );
  141 +
  142 + Toolkit::TableView radioButtonsGroup2 = Toolkit::TableView::New( 3, 1 );
  143 + radioButtonsGroup2.SetCellPadding( Size( 0.0f, MARGIN_SIZE * 0.5f ) );
  144 + radioButtonsGroup2.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
  145 + for( unsigned int i = 0; i < radioButtonsGroup2.GetRows(); ++i )
  146 + {
  147 + radioButtonsGroup2.SetFitHeight( i );
  148 + }
  149 + radioButtonsGroup2.SetFitWidth( 0 );
  150 +
  151 + radioGroup2Background.AddChild( radioButtonsGroup2, Toolkit::TableView::CellPosition( 0, 0 ) );
144 152
145 int radioY = 0; 153 int radioY = 0;
146 154
@@ -189,11 +197,8 @@ class ButtonsController: public ConnectionTracker @@ -189,11 +197,8 @@ class ButtonsController: public ConnectionTracker
189 197
190 // Create select button 198 // Create select button
191 mUpdateButton = Toolkit::PushButton::New(); 199 mUpdateButton = Toolkit::PushButton::New();
192 - mUpdateButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );  
193 - mUpdateButton.SetAnchorPoint( AnchorPoint::TOP_CENTER );  
194 - mUpdateButton.SetPosition( 0, DP(MARGIN_SIZE) );  
195 mUpdateButton.SetLabel( "Select" ); 200 mUpdateButton.SetLabel( "Select" );
196 - mUpdateButton.SetSize( DP(100), DP(BUTTON_HEIGHT) ); 201 + mUpdateButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
197 202
198 mUpdateButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 203 mUpdateButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
199 mUpdateButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); 204 mUpdateButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
@@ -201,7 +206,7 @@ class ButtonsController: public ConnectionTracker @@ -201,7 +206,7 @@ class ButtonsController: public ConnectionTracker
201 206
202 mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked ); 207 mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked );
203 208
204 - radioButtonsGroup2.Add(mUpdateButton); 209 + radioGroup2Background.AddChild( mUpdateButton, Toolkit::TableView::CellPosition( 1, 0 ) );
205 210
206 // ImageActor to display selected image 211 // ImageActor to display selected image
207 mBigImage1 = ResourceImage::New( BIG_IMAGE_1 ); 212 mBigImage1 = ResourceImage::New( BIG_IMAGE_1 );
@@ -209,43 +214,48 @@ class ButtonsController: public ConnectionTracker @@ -209,43 +214,48 @@ class ButtonsController: public ConnectionTracker
209 mBigImage3 = ResourceImage::New( BIG_IMAGE_3 ); 214 mBigImage3 = ResourceImage::New( BIG_IMAGE_3 );
210 215
211 mImage = ImageActor::New( mBigImage1 ); 216 mImage = ImageActor::New( mBigImage1 );
212 - mImage.SetParentOrigin( ParentOrigin::TOP_RIGHT );  
213 - mImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
214 - mImage.SetPosition( DP(MARGIN_SIZE), 0 );  
215 - mImage.SetSize( DP(218), DP(218) );  
216 - radioButtonsGroup2.Add( mImage ); 217 + mImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
  218 + mImage.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH );
  219 + radioGroup2Background.AddChild( mImage, Toolkit::TableView::CellPosition( 0, 1, 2, 1 ) );
217 220
218 // The enable/disable radio group 221 // The enable/disable radio group
219 - yPos += GROUP2_HEIGHT + MARGIN_SIZE; 222 + Toolkit::TableView radioGroup1Background = Toolkit::TableView::New( 1, 1 );
  223 + radioGroup1Background.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  224 + radioGroup1Background.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  225 + radioGroup1Background.SetBackgroundColor( BACKGROUND_COLOUR );
  226 + radioGroup1Background.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  227 + radioGroup1Background.SetFitHeight( 0 );
220 228
221 - Actor radioGroup1Background = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
222 - radioGroup1Background.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
223 - radioGroup1Background.SetParentOrigin( ParentOrigin::TOP_LEFT );  
224 - radioGroup1Background.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
225 - radioGroup1Background.SetRelayoutEnabled( true );  
226 - radioGroup1Background.SetSize( DP(348), DP(GROUP1_HEIGHT) );  
227 - mContentLayer.Add( radioGroup1Background ); 229 + contentTable.Add( radioGroup1Background );
228 230
229 // Radio group 231 // Radio group
230 - Actor radioButtonsGroup1 = Actor::New();  
231 - radioButtonsGroup1.SetParentOrigin( ParentOrigin::TOP_LEFT );  
232 - radioButtonsGroup1.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
233 - radioButtonsGroup1.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) ); 232 + Toolkit::TableView radioButtonsGroup1 = Toolkit::TableView::New( 2, 1 );
  233 + radioButtonsGroup1.SetCellPadding( Size( 0.0f, MARGIN_SIZE * 0.5f ) );
  234 + radioButtonsGroup1.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
  235 + for( unsigned int i = 0; i < radioButtonsGroup1.GetRows(); ++i )
  236 + {
  237 + radioButtonsGroup1.SetFitHeight( i );
  238 + }
  239 + radioButtonsGroup1.SetFitWidth( 0 );
234 240
235 radioGroup1Background.Add( radioButtonsGroup1 ); 241 radioGroup1Background.Add( radioButtonsGroup1 );
236 242
237 // First radio button 243 // First radio button
238 { 244 {
239 Toolkit::TableView tableView = Toolkit::TableView::New( 1, 2 ); 245 Toolkit::TableView tableView = Toolkit::TableView::New( 1, 2 );
240 - tableView.SetSize( DP(260), 0.0f );  
241 - tableView.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 246 + tableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
  247 + tableView.SetFitHeight( 0 );
  248 + tableView.SetFitWidth( 0 );
  249 + tableView.SetFitWidth( 1 );
242 250
243 Toolkit::TextLabel textLabel = Toolkit::TextLabel::New( "Select enabled" ); 251 Toolkit::TextLabel textLabel = Toolkit::TextLabel::New( "Select enabled" );
  252 + textLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH );
  253 + textLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
  254 + textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
244 tableView.AddChild( textLabel, Toolkit::TableView::CellPosition( 0, 0 ) ); 255 tableView.AddChild( textLabel, Toolkit::TableView::CellPosition( 0, 0 ) );
245 256
246 ImageActor imageActor = ImageActor::New( ResourceImage::New( ENABLED_IMAGE ) ); 257 ImageActor imageActor = ImageActor::New( ResourceImage::New( ENABLED_IMAGE ) );
247 imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); 258 imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
248 - imageActor.SetResizePolicy( FIXED, ALL_DIMENSIONS );  
249 imageActor.SetPadding( Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) ); 259 imageActor.SetPadding( Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) );
250 tableView.AddChild( imageActor, Toolkit::TableView::CellPosition( 0, 1 ) ); 260 tableView.AddChild( imageActor, Toolkit::TableView::CellPosition( 0, 1 ) );
251 261
@@ -275,27 +285,25 @@ class ButtonsController: public ConnectionTracker @@ -275,27 +285,25 @@ class ButtonsController: public ConnectionTracker
275 } 285 }
276 286
277 // CheckBoxes 287 // CheckBoxes
278 - yPos += GROUP1_HEIGHT + MARGIN_SIZE; 288 + Toolkit::TableView checkBoxBackground = Toolkit::TableView::New( 3, 1 );
  289 + checkBoxBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  290 + checkBoxBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  291 + checkBoxBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  292 + checkBoxBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
279 293
280 - Actor checkBoxBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
281 - checkBoxBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
282 - checkBoxBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
283 - checkBoxBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
284 - checkBoxBackground.SetRelayoutEnabled( true );  
285 - checkBoxBackground.SetSize( DP(430), DP(GROUP3_HEIGHT) );  
286 - mContentLayer.Add( checkBoxBackground ); 294 + for( unsigned int i = 0; i < checkBoxBackground.GetRows(); ++i )
  295 + {
  296 + checkBoxBackground.SetFitHeight( i );
  297 + }
  298 +
  299 + contentTable.Add( checkBoxBackground );
287 300
288 Dali::Image unselected = Dali::ResourceImage::New( CHECKBOX_UNSELECTED_IMAGE ); 301 Dali::Image unselected = Dali::ResourceImage::New( CHECKBOX_UNSELECTED_IMAGE );
289 Dali::Image selected = Dali::ResourceImage::New( CHECKBOX_SELECTED_IMAGE ); 302 Dali::Image selected = Dali::ResourceImage::New( CHECKBOX_SELECTED_IMAGE );
290 303
291 - int checkYPos = MARGIN_SIZE;  
292 -  
293 { 304 {
294 Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); 305 Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
295 checkBox.SetName( "checkbox1" ); 306 checkBox.SetName( "checkbox1" );
296 - checkBox.SetPosition( DP(MARGIN_SIZE), DP(checkYPos) );  
297 - checkBox.SetParentOrigin( ParentOrigin::TOP_LEFT );  
298 - checkBox.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
299 checkBox.SetBackgroundImage( unselected ); 307 checkBox.SetBackgroundImage( unselected );
300 checkBox.SetSelectedImage( selected ); 308 checkBox.SetSelectedImage( selected );
301 checkBox.SetLabel( "CheckBox1 is unselected" ); 309 checkBox.SetLabel( "CheckBox1 is unselected" );
@@ -304,13 +312,9 @@ class ButtonsController: public ConnectionTracker @@ -304,13 +312,9 @@ class ButtonsController: public ConnectionTracker
304 checkBoxBackground.Add( checkBox ); 312 checkBoxBackground.Add( checkBox );
305 } 313 }
306 314
307 - checkYPos += 60;  
308 -  
309 { 315 {
310 Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); 316 Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
311 checkBox.SetName( "checkbox2" ); 317 checkBox.SetName( "checkbox2" );
312 - checkBox.SetPosition( DP(MARGIN_SIZE), DP(checkYPos) );  
313 - checkBox.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
314 checkBox.SetBackgroundImage( unselected ); 318 checkBox.SetBackgroundImage( unselected );
315 checkBox.SetSelectedImage( selected ); 319 checkBox.SetSelectedImage( selected );
316 checkBox.SetLabel( "CheckBox2 is selected" ); 320 checkBox.SetLabel( "CheckBox2 is selected" );
@@ -320,13 +324,9 @@ class ButtonsController: public ConnectionTracker @@ -320,13 +324,9 @@ class ButtonsController: public ConnectionTracker
320 checkBoxBackground.Add( checkBox ); 324 checkBoxBackground.Add( checkBox );
321 } 325 }
322 326
323 - checkYPos += 60;  
324 -  
325 { 327 {
326 Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); 328 Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
327 checkBox.SetName( "checkbox3" ); 329 checkBox.SetName( "checkbox3" );
328 - checkBox.SetPosition( DP(MARGIN_SIZE), DP(checkYPos) );  
329 - checkBox.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
330 checkBox.SetBackgroundImage( unselected ); 330 checkBox.SetBackgroundImage( unselected );
331 checkBox.SetSelectedImage( selected ); 331 checkBox.SetSelectedImage( selected );
332 checkBox.SetLabel( "CheckBox3 is unselected" ); 332 checkBox.SetLabel( "CheckBox3 is unselected" );
@@ -336,23 +336,25 @@ class ButtonsController: public ConnectionTracker @@ -336,23 +336,25 @@ class ButtonsController: public ConnectionTracker
336 } 336 }
337 337
338 // Create togglabe button 338 // Create togglabe button
339 - yPos += GROUP3_HEIGHT + MARGIN_SIZE; 339 + Toolkit::TableView toggleBackground = Toolkit::TableView::New( 3, 1 );
  340 + toggleBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  341 + toggleBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  342 + toggleBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  343 + toggleBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  344 +
  345 + for( unsigned int i = 0; i < toggleBackground.GetRows(); ++i )
  346 + {
  347 + toggleBackground.SetFitHeight( i );
  348 + }
  349 +
  350 + contentTable.Add( toggleBackground );
340 351
341 - Actor toggleBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
342 - toggleBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
343 - toggleBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
344 - toggleBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
345 - toggleBackground.SetRelayoutEnabled( true );  
346 - toggleBackground.SetSize( DP(150 + MARGIN_SIZE * 2), DP(GROUP4_HEIGHT) );  
347 - mContentLayer.Add( toggleBackground );  
348 352
349 Toolkit::PushButton toggleButton = Toolkit::PushButton::New(); 353 Toolkit::PushButton toggleButton = Toolkit::PushButton::New();
350 toggleButton.SetTogglableButton( true ); 354 toggleButton.SetTogglableButton( true );
351 - toggleButton.SetParentOrigin( ParentOrigin::TOP_LEFT );  
352 - toggleButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
353 - toggleButton.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );  
354 toggleButton.SetLabel( "Unselected" ); 355 toggleButton.SetLabel( "Unselected" );
355 - toggleButton.SetSize( DP(150), DP(BUTTON_HEIGHT) ); 356 + toggleButton.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  357 + toggleButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
356 358
357 toggleButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 359 toggleButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
358 toggleButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); 360 toggleButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
@@ -465,6 +467,34 @@ class ButtonsController: public ConnectionTracker @@ -465,6 +467,34 @@ class ButtonsController: public ConnectionTracker
465 return true; 467 return true;
466 } 468 }
467 469
  470 + bool OnTouchEvent( Actor actor, const TouchEvent& event )
  471 + {
  472 + if( 1u == event.GetPointCount() )
  473 + {
  474 + const TouchPoint::State state = event.GetPoint(0u).state;
  475 +
  476 + // Clamp to integer values; this is to reduce flicking due to pixel misalignment
  477 + const float localPoint = static_cast<float>( static_cast<int>( event.GetPoint( 0 ).local.y ) );
  478 +
  479 + if( TouchPoint::Down == state )
  480 + {
  481 + mLastPoint = localPoint;
  482 + mAnimation = Animation::New( 0.25f );
  483 + }
  484 + else if( TouchPoint::Motion == state )
  485 + {
  486 + if( mAnimation )
  487 + {
  488 + mAnimation.AnimateBy( Property(actor, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunctions::Linear );
  489 + mAnimation.Play();
  490 + mLastPoint = localPoint;
  491 + }
  492 + }
  493 + }
  494 +
  495 + return true;
  496 + }
  497 +
468 private: 498 private:
469 499
470 Application& mApplication; 500 Application& mApplication;
@@ -478,6 +508,9 @@ class ButtonsController: public ConnectionTracker @@ -478,6 +508,9 @@ class ButtonsController: public ConnectionTracker
478 508
479 Toolkit::PushButton mUpdateButton; 509 Toolkit::PushButton mUpdateButton;
480 510
  511 + Animation mAnimation;
  512 + float mLastPoint;
  513 +
481 Image mBigImage1; 514 Image mBigImage1;
482 Image mBigImage2; 515 Image mBigImage2;
483 Image mBigImage3; 516 Image mBigImage3;
examples/cluster/cluster-example.cpp
@@ -490,7 +490,7 @@ public: @@ -490,7 +490,7 @@ public:
490 490
491 // Scale ScrollView to fit parent (mContentLayer) 491 // Scale ScrollView to fit parent (mContentLayer)
492 mScrollView.SetRelayoutEnabled( true ); 492 mScrollView.SetRelayoutEnabled( true );
493 - mScrollView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 493 + mScrollView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
494 494
495 // Add the scroll view to the content layer 495 // Add the scroll view to the content layer
496 mContentLayer.Add(mScrollView); 496 mContentLayer.Add(mScrollView);
@@ -580,7 +580,7 @@ public: @@ -580,7 +580,7 @@ public:
580 shadowActor.SetPosition(Vector3(0.0f, 0.0f, -1.0f)); 580 shadowActor.SetPosition(Vector3(0.0f, 0.0f, -1.0f));
581 581
582 // Apply size-relative mode to auto-size the image shadow 582 // Apply size-relative mode to auto-size the image shadow
583 - shadowActor.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 583 + shadowActor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
584 shadowActor.SetSizeModeFactor( ShadowProperty::SIZE_SCALE ); 584 shadowActor.SetSizeModeFactor( ShadowProperty::SIZE_SCALE );
585 actor.Add( shadowActor ); 585 actor.Add( shadowActor );
586 586
@@ -589,7 +589,7 @@ public: @@ -589,7 +589,7 @@ public:
589 ImageActor imageActor = ImageActor::New( image ); 589 ImageActor imageActor = ImageActor::New( image );
590 imageActor.SetParentOrigin( ParentOrigin::CENTER ); 590 imageActor.SetParentOrigin( ParentOrigin::CENTER );
591 imageActor.SetAnchorPoint( AnchorPoint::CENTER ); 591 imageActor.SetAnchorPoint( AnchorPoint::CENTER );
592 - imageActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 592 + imageActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
593 actor.Add( imageActor ); 593 actor.Add( imageActor );
594 594
595 // Add a border image child actor (with a fixed size offset from parent). 595 // Add a border image child actor (with a fixed size offset from parent).
@@ -599,7 +599,7 @@ public: @@ -599,7 +599,7 @@ public:
599 borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH ); 599 borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH );
600 borderActor.SetNinePatchBorder( CLUSTER_IMAGE_BORDER_ABSOLUTE ); 600 borderActor.SetNinePatchBorder( CLUSTER_IMAGE_BORDER_ABSOLUTE );
601 borderActor.SetPosition( Vector3( 0.0f, 0.0f, 1.0f ) ); 601 borderActor.SetPosition( Vector3( 0.0f, 0.0f, 1.0f ) );
602 - borderActor.SetResizePolicy( SIZE_FIXED_OFFSET_FROM_PARENT, ALL_DIMENSIONS ); 602 + borderActor.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
603 borderActor.SetSizeModeFactor( Vector3( CLUSTER_IMAGE_BORDER_INDENT - 1.0f, CLUSTER_IMAGE_BORDER_INDENT - 1.0f, 0.0f ) * 2.0f ); 603 borderActor.SetSizeModeFactor( Vector3( CLUSTER_IMAGE_BORDER_INDENT - 1.0f, CLUSTER_IMAGE_BORDER_INDENT - 1.0f, 0.0f ) * 2.0f );
604 actor.Add( borderActor ); 604 actor.Add( borderActor );
605 605
@@ -630,7 +630,7 @@ public: @@ -630,7 +630,7 @@ public:
630 pageView.SetParentOrigin(ParentOrigin::CENTER); 630 pageView.SetParentOrigin(ParentOrigin::CENTER);
631 pageView.SetPosition(Vector3(stageSize.width * column, 0.0f, 0.0f)); 631 pageView.SetPosition(Vector3(stageSize.width * column, 0.0f, 0.0f));
632 pageView.SetRelayoutEnabled( true ); 632 pageView.SetRelayoutEnabled( true );
633 - pageView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 633 + pageView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
634 634
635 // Create cluster actors, add them to scroll view, and set the shear effect with the given center point. 635 // Create cluster actors, add them to scroll view, and set the shear effect with the given center point.
636 Cluster cluster = CreateClusterActor(clusterType, style); 636 Cluster cluster = CreateClusterActor(clusterType, style);
examples/cube-transition-effect/cube-transition-effect-example.cpp
@@ -288,8 +288,8 @@ void CubeTransitionApp::OnInit( Application&amp; application ) @@ -288,8 +288,8 @@ void CubeTransitionApp::OnInit( Application&amp; application )
288 // show the first image 288 // show the first image
289 mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) ); 289 mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) );
290 mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION ); 290 mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION );
291 - mCurrentImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
292 - mCurrentImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 291 + mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  292 + mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
293 mParent.Add( mCurrentImage ); 293 mParent.Add( mCurrentImage );
294 294
295 mCurrentEffect = mCubeWaveEffect; 295 mCurrentEffect = mCubeWaveEffect;
@@ -328,8 +328,8 @@ void CubeTransitionApp::GoToNextImage() @@ -328,8 +328,8 @@ void CubeTransitionApp::GoToNextImage()
328 mNextImage = ImageActor::New( image ); 328 mNextImage = ImageActor::New( image );
329 329
330 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION); 330 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION);
331 - mNextImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
332 - mNextImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 331 + mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  332 + mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
333 mNextImage.SetRelayoutEnabled( false ); 333 mNextImage.SetRelayoutEnabled( false );
334 mCurrentEffect.SetTargetImage(mNextImage); 334 mCurrentEffect.SetTargetImage(mNextImage);
335 if( image.GetLoadingState() == ResourceLoadingSucceeded ) 335 if( image.GetLoadingState() == ResourceLoadingSucceeded )
examples/dissolve-effect/dissolve-effect-example.cpp
@@ -256,8 +256,8 @@ void DissolveEffectApp::OnInit( Application&amp; application ) @@ -256,8 +256,8 @@ void DissolveEffectApp::OnInit( Application&amp; application )
256 mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) ); 256 mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) );
257 mCurrentImage.SetRelayoutEnabled( false ); 257 mCurrentImage.SetRelayoutEnabled( false );
258 mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); 258 mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
259 - mCurrentImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
260 - mCurrentImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 259 + mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  260 + mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
261 mParent.Add( mCurrentImage ); 261 mParent.Add( mCurrentImage );
262 262
263 mPanGestureDetector.Attach( mCurrentImage ); 263 mPanGestureDetector.Attach( mCurrentImage );
@@ -287,8 +287,8 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture&amp; gesture ) @@ -287,8 +287,8 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture&amp; gesture )
287 mNextImage = ImageActor::New( image ); 287 mNextImage = ImageActor::New( image );
288 mNextImage.SetRelayoutEnabled( false ); 288 mNextImage.SetRelayoutEnabled( false );
289 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); 289 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
290 - mNextImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
291 - mNextImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 290 + mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  291 + mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
292 mNextImage.SetZ(INITIAL_DEPTH); 292 mNextImage.SetZ(INITIAL_DEPTH);
293 mParent.Add( mNextImage ); 293 mParent.Add( mNextImage );
294 Vector2 size = Vector2( mCurrentImage.GetCurrentSize() ); 294 Vector2 size = Vector2( mCurrentImage.GetCurrentSize() );
@@ -399,8 +399,8 @@ bool DissolveEffectApp::OnTimerTick() @@ -399,8 +399,8 @@ bool DissolveEffectApp::OnTimerTick()
399 Image image = LoadStageFillingImage( IMAGES[ mIndex ] ); 399 Image image = LoadStageFillingImage( IMAGES[ mIndex ] );
400 mNextImage = ImageActor::New( image ); 400 mNextImage = ImageActor::New( image );
401 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); 401 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
402 - mNextImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
403 - mNextImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 402 + mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  403 + mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
404 mNextImage.SetZ(INITIAL_DEPTH); 404 mNextImage.SetZ(INITIAL_DEPTH);
405 mParent.Add( mNextImage ); 405 mParent.Add( mNextImage );
406 switch( mCentralLineIndex%4 ) 406 switch( mCentralLineIndex%4 )
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
@@ -424,7 +424,7 @@ public: @@ -424,7 +424,7 @@ public:
424 424
425 Actor gridActor = Actor::New(); 425 Actor gridActor = Actor::New();
426 gridActor.SetRelayoutEnabled( true ); 426 gridActor.SetRelayoutEnabled( true );
427 - gridActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 427 + gridActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
428 gridActor.SetParentOrigin( ParentOrigin::CENTER ); 428 gridActor.SetParentOrigin( ParentOrigin::CENTER );
429 gridActor.SetAnchorPoint( AnchorPoint::CENTER ); 429 gridActor.SetAnchorPoint( AnchorPoint::CENTER );
430 430
examples/item-view/item-view-example.cpp
@@ -894,7 +894,7 @@ public: // From ItemFactory @@ -894,7 +894,7 @@ public: // From ItemFactory
894 borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH ); 894 borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH );
895 borderActor.SetNinePatchBorder( Vector4( ITEM_IMAGE_BORDER_LEFT, ITEM_IMAGE_BORDER_TOP, ITEM_IMAGE_BORDER_RIGHT, ITEM_IMAGE_BORDER_BOTTOM ) ); 895 borderActor.SetNinePatchBorder( Vector4( ITEM_IMAGE_BORDER_LEFT, ITEM_IMAGE_BORDER_TOP, ITEM_IMAGE_BORDER_RIGHT, ITEM_IMAGE_BORDER_BOTTOM ) );
896 borderActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); // darken with parent image-actor 896 borderActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); // darken with parent image-actor
897 - borderActor.SetResizePolicy( SIZE_FIXED_OFFSET_FROM_PARENT, ALL_DIMENSIONS ); 897 + borderActor.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
898 borderActor.SetSizeModeFactor( ITEM_BORDER_MARGIN_SIZE ); 898 borderActor.SetSizeModeFactor( ITEM_BORDER_MARGIN_SIZE );
899 actor.Add(borderActor); 899 actor.Add(borderActor);
900 actor.SetKeyboardFocusable( true ); 900 actor.SetKeyboardFocusable( true );
@@ -988,7 +988,7 @@ private: @@ -988,7 +988,7 @@ private:
988 mMenu.OutsideTouchedSignal().Connect( this, &ItemViewExample::HideMenu ); 988 mMenu.OutsideTouchedSignal().Connect( this, &ItemViewExample::HideMenu );
989 989
990 TableView tableView = TableView::New( 0, 0 ); 990 TableView tableView = TableView::New( 0, 0 );
991 - tableView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 991 + tableView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
992 mMenu.Add( tableView ); 992 mMenu.Add( tableView );
993 993
994 Slider slider = Slider::New(); 994 Slider slider = Slider::New();
@@ -997,21 +997,21 @@ private: @@ -997,21 +997,21 @@ private:
997 slider.SetProperty( Slider::Property::VALUE, mDurationSeconds ); 997 slider.SetProperty( Slider::Property::VALUE, mDurationSeconds );
998 slider.SetProperty( Slider::Property::VALUE_PRECISION, 2 ); 998 slider.SetProperty( Slider::Property::VALUE_PRECISION, 2 );
999 slider.SetProperty( Slider::Property::SHOW_POPUP, true ); 999 slider.SetProperty( Slider::Property::SHOW_POPUP, true );
1000 - slider.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1000 + slider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1001 slider.ValueChangedSignal().Connect( this, &ItemViewExample::SliderValueChange ); 1001 slider.ValueChangedSignal().Connect( this, &ItemViewExample::SliderValueChange );
1002 tableView.AddChild( slider, TableView::CellPosition( 0, 0 ) ); 1002 tableView.AddChild( slider, TableView::CellPosition( 0, 0 ) );
1003 1003
1004 TextLabel text = TextLabel::New( "Duration" ); 1004 TextLabel text = TextLabel::New( "Duration" );
1005 text.SetAnchorPoint( ParentOrigin::TOP_LEFT ); 1005 text.SetAnchorPoint( ParentOrigin::TOP_LEFT );
1006 text.SetParentOrigin( ParentOrigin::TOP_LEFT ); 1006 text.SetParentOrigin( ParentOrigin::TOP_LEFT );
1007 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1008 - text.SetResizePolicy( FIXED, HEIGHT ); 1007 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1008 + text.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
1009 text.SetSize( Vector2( 0.0f, LABEL_TEXT_SIZE_Y ) ); 1009 text.SetSize( Vector2( 0.0f, LABEL_TEXT_SIZE_Y ) );
1010 slider.Add( text ); 1010 slider.Add( text );
1011 1011
1012 Actor textContainer = Actor::New(); 1012 Actor textContainer = Actor::New();
1013 textContainer.SetRelayoutEnabled( true ); 1013 textContainer.SetRelayoutEnabled( true );
1014 - textContainer.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1014 + textContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1015 mAlphaFunctionText = TextLabel::New( ALPHA_FUNCTIONS_TEXT[mAlphaFuncIndex] ); 1015 mAlphaFunctionText = TextLabel::New( ALPHA_FUNCTIONS_TEXT[mAlphaFuncIndex] );
1016 mAlphaFunctionText.SetAnchorPoint( ParentOrigin::CENTER ); 1016 mAlphaFunctionText.SetAnchorPoint( ParentOrigin::CENTER );
1017 mAlphaFunctionText.SetParentOrigin( ParentOrigin::CENTER ); 1017 mAlphaFunctionText.SetParentOrigin( ParentOrigin::CENTER );
@@ -1025,7 +1025,7 @@ private: @@ -1025,7 +1025,7 @@ private:
1025 text = TextLabel::New( "Alpha Function" ); 1025 text = TextLabel::New( "Alpha Function" );
1026 text.SetAnchorPoint( ParentOrigin::TOP_LEFT ); 1026 text.SetAnchorPoint( ParentOrigin::TOP_LEFT );
1027 text.SetParentOrigin( ParentOrigin::TOP_LEFT ); 1027 text.SetParentOrigin( ParentOrigin::TOP_LEFT );
1028 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1028 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1029 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y ); 1029 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
1030 textContainer.Add( text ); 1030 textContainer.Add( text );
1031 1031
examples/logging/logging-example.cpp
@@ -23,21 +23,9 @@ @@ -23,21 +23,9 @@
23 23
24 using namespace Dali; 24 using namespace Dali;
25 25
26 -namespace  
27 -{  
28 -// Used to produce visually same dimensions on desktop and device builds  
29 -float ScalePointSize( int pointSize )  
30 -{  
31 - Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi();  
32 - float meanDpi = (dpi.height + dpi.width) * 0.5f;  
33 - return pointSize * meanDpi / 220.0f;  
34 -}  
35 -  
36 -} // namespace  
37 -  
38 // Define this so that it is interchangeable 26 // Define this so that it is interchangeable
39 // "DP" stands for Device independent Pixels 27 // "DP" stands for Device independent Pixels
40 -#define DP(x) ScalePointSize(x) 28 +#define DP(x) x
41 29
42 //enum ButtonType 30 //enum ButtonType
43 //{ 31 //{
@@ -186,17 +174,34 @@ class LoggingController: public ConnectionTracker @@ -186,17 +174,34 @@ class LoggingController: public ConnectionTracker
186 TOOLBAR_IMAGE, 174 TOOLBAR_IMAGE,
187 TOOLBAR_TITLE ); 175 TOOLBAR_TITLE );
188 176
189 - Vector2 stageSize = Stage::GetCurrent().GetSize(); 177 + Toolkit::TableView contentTable = Toolkit::TableView::New( 6, 1 );
  178 + contentTable.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  179 + contentTable.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  180 + contentTable.SetAnchorPoint( AnchorPoint::TOP_LEFT );
  181 + contentTable.SetParentOrigin( ParentOrigin::TOP_LEFT );
  182 + contentTable.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
  183 +// contentTable.TouchedSignal().Connect( this, &LoggingController::OnTouchEvent );
  184 +
  185 + for( unsigned int i = 0; i < contentTable.GetRows(); ++i )
  186 + {
  187 + contentTable.SetFitHeight( i );
  188 + }
  189 +
  190 + contentTable.SetPosition( 0.0f, TOP_MARGIN );
  191 +
  192 + mContentLayer.Add( contentTable );
190 193
191 - int yPos = TOP_MARGIN + MARGIN_SIZE;  
192 194
193 // Logger selector radio group 195 // Logger selector radio group
194 - Actor radioGroupBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
195 - radioGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 196 + Toolkit::TableView radioGroupBackground = Toolkit::TableView::New( 2, 1 );
  197 + radioGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  198 + radioGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  199 + radioGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
196 radioGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT ); 200 radioGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );
197 - radioGroupBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
198 - radioGroupBackground.SetSize( stageSize.width - 2 * DP(MARGIN_SIZE), DP(LOGGER_RADIO_GROUP_HEIGHT) );  
199 - mContentLayer.Add( radioGroupBackground ); 201 + radioGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );
  202 + radioGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
  203 +
  204 + contentTable.Add( radioGroupBackground );
200 205
201 // Label 206 // Label
202 { 207 {
@@ -204,20 +209,27 @@ class LoggingController: public ConnectionTracker @@ -204,20 +209,27 @@ class LoggingController: public ConnectionTracker
204 label.SetParentOrigin( ParentOrigin::TOP_LEFT ); 209 label.SetParentOrigin( ParentOrigin::TOP_LEFT );
205 label.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 210 label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
206 label.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) ); 211 label.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );
  212 + label.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
207 213
208 radioGroupBackground.Add( label ); 214 radioGroupBackground.Add( label );
  215 + radioGroupBackground.SetFitHeight( 0 );
209 } 216 }
210 217
211 // Radio group 218 // Radio group
212 - Actor radioButtonsGroup = Actor::New();  
213 - radioButtonsGroup.SetParentOrigin( ParentOrigin::TOP_LEFT );  
214 - radioButtonsGroup.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
215 - radioButtonsGroup.SetPosition( DP(MARGIN_SIZE), 0 ); 219 + Toolkit::TableView radioButtonsGroup = Toolkit::TableView::New( 3, 1 );
  220 + radioButtonsGroup.SetCellPadding( Size( 0.0f, MARGIN_SIZE * 0.5f ) );
  221 + radioButtonsGroup.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
  222 + for( unsigned int i = 0; i < radioButtonsGroup.GetRows(); ++i )
  223 + {
  224 + radioButtonsGroup.SetFitHeight( i );
  225 + }
  226 + radioButtonsGroup.SetFitWidth( 0 );
216 227
217 radioGroupBackground.Add( radioButtonsGroup ); 228 radioGroupBackground.Add( radioButtonsGroup );
  229 + radioGroupBackground.SetFitHeight( 1 );
218 230
219 int radioX = 0; 231 int radioX = 0;
220 - int radioY = MARGIN_SIZE + 28; 232 + int radioY = 0;
221 233
222 // Radio 1 234 // Radio 1
223 { 235 {
@@ -267,26 +279,21 @@ class LoggingController: public ConnectionTracker @@ -267,26 +279,21 @@ class LoggingController: public ConnectionTracker
267 } 279 }
268 280
269 // Create/delete/disable group 281 // Create/delete/disable group
270 - yPos += LOGGER_RADIO_GROUP_HEIGHT + MARGIN_SIZE; 282 + Toolkit::TableView createGroupBackground = Toolkit::TableView::New( 1, 2 );
  283 + createGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  284 + createGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  285 + createGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  286 + createGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  287 + createGroupBackground.SetFitHeight( 0 );
271 288
272 - Actor createGroupBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
273 - createGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
274 - createGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
275 - createGroupBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
276 - createGroupBackground.SetSize( stageSize.width - 2 * DP(MARGIN_SIZE), DP(LOGGER_GROUP_HEIGHT) );  
277 - mContentLayer.Add( createGroupBackground );  
278 -  
279 - int buttonXDP = DP(MARGIN_SIZE);  
280 - int buttonWidthDP = (createGroupBackground.GetTargetSize().width - DP(MARGIN_SIZE) * 3) / 2; 289 + contentTable.Add( createGroupBackground );
281 290
282 { 291 {
283 Toolkit::PushButton button = Toolkit::PushButton::New(); 292 Toolkit::PushButton button = Toolkit::PushButton::New();
284 button.SetName( CREATE_BUTTON_ID ); 293 button.SetName( CREATE_BUTTON_ID );
285 button.SetLabel( CREATE_BUTTON_TEXT ); 294 button.SetLabel( CREATE_BUTTON_TEXT );
286 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
287 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
288 - button.SetPosition( buttonXDP, 0 );  
289 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 295 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  296 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
290 297
291 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 298 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
292 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 299 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -298,15 +305,11 @@ class LoggingController: public ConnectionTracker @@ -298,15 +305,11 @@ class LoggingController: public ConnectionTracker
298 } 305 }
299 306
300 { 307 {
301 - buttonXDP += DP(MARGIN_SIZE) + buttonWidthDP;  
302 -  
303 Toolkit::PushButton button = Toolkit::PushButton::New(); 308 Toolkit::PushButton button = Toolkit::PushButton::New();
304 button.SetName( DELETE_BUTTON_ID ); 309 button.SetName( DELETE_BUTTON_ID );
305 button.SetLabel( DELETE_BUTTON_TEXT ); 310 button.SetLabel( DELETE_BUTTON_TEXT );
306 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
307 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
308 - button.SetPosition( buttonXDP, 0 );  
309 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 311 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  312 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
310 313
311 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 314 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
312 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 315 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -318,26 +321,22 @@ class LoggingController: public ConnectionTracker @@ -318,26 +321,22 @@ class LoggingController: public ConnectionTracker
318 } 321 }
319 322
320 // Start/stop group 323 // Start/stop group
321 - yPos += LOGGER_GROUP_HEIGHT + MARGIN_SIZE;  
322 324
323 - Actor timingGroupBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
324 - timingGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
325 - timingGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
326 - timingGroupBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
327 - timingGroupBackground.SetSize( stageSize.width - 2 * DP(MARGIN_SIZE), DP(LOGGER_GROUP_HEIGHT) );  
328 - mContentLayer.Add( timingGroupBackground ); 325 + Toolkit::TableView timingGroupBackground = Toolkit::TableView::New( 1, 2 );
  326 + timingGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  327 + timingGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  328 + timingGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  329 + timingGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  330 + timingGroupBackground.SetFitHeight( 0 );
329 331
330 - buttonXDP = DP(MARGIN_SIZE);  
331 - buttonWidthDP = (timingGroupBackground.GetTargetSize().width - DP(MARGIN_SIZE) * 3) / 2; 332 + contentTable.Add( timingGroupBackground );
332 333
333 { 334 {
334 Toolkit::PushButton button = Toolkit::PushButton::New(); 335 Toolkit::PushButton button = Toolkit::PushButton::New();
335 button.SetName( START_BUTTON_ID ); 336 button.SetName( START_BUTTON_ID );
336 button.SetLabel( START_BUTTON_TEXT ); 337 button.SetLabel( START_BUTTON_TEXT );
337 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
338 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
339 - button.SetPosition( buttonXDP, 0 );  
340 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 338 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  339 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
341 340
342 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 341 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
343 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 342 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -349,15 +348,11 @@ class LoggingController: public ConnectionTracker @@ -349,15 +348,11 @@ class LoggingController: public ConnectionTracker
349 } 348 }
350 349
351 { 350 {
352 - buttonXDP += DP(MARGIN_SIZE) + buttonWidthDP;  
353 -  
354 Toolkit::PushButton button = Toolkit::PushButton::New(); 351 Toolkit::PushButton button = Toolkit::PushButton::New();
355 button.SetName( STOP_BUTTON_ID ); 352 button.SetName( STOP_BUTTON_ID );
356 button.SetLabel( STOP_BUTTON_TEXT ); 353 button.SetLabel( STOP_BUTTON_TEXT );
357 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
358 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
359 - button.SetPosition( buttonXDP, 0 );  
360 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 354 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  355 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
361 356
362 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 357 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
363 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 358 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -369,26 +364,21 @@ class LoggingController: public ConnectionTracker @@ -369,26 +364,21 @@ class LoggingController: public ConnectionTracker
369 } 364 }
370 365
371 // Enable/disable group 366 // Enable/disable group
372 - yPos += LOGGER_GROUP_HEIGHT + MARGIN_SIZE;  
373 -  
374 - Actor enableGroupBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
375 - enableGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
376 - enableGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
377 - enableGroupBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
378 - enableGroupBackground.SetSize( stageSize.width - 2 * DP(MARGIN_SIZE), DP(LOGGER_GROUP_HEIGHT) );  
379 - mContentLayer.Add( enableGroupBackground ); 367 + Toolkit::TableView enableGroupBackground = Toolkit::TableView::New( 1, 2 );
  368 + enableGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  369 + enableGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  370 + enableGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  371 + enableGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  372 + enableGroupBackground.SetFitHeight( 0 );
380 373
381 - buttonXDP = DP(MARGIN_SIZE);  
382 - buttonWidthDP = (enableGroupBackground.GetTargetSize().width - DP(MARGIN_SIZE) * 3) / 2; 374 + contentTable.Add( enableGroupBackground );
383 375
384 { 376 {
385 Toolkit::PushButton button = Toolkit::PushButton::New(); 377 Toolkit::PushButton button = Toolkit::PushButton::New();
386 button.SetName( ENABLE_BUTTON_ID ); 378 button.SetName( ENABLE_BUTTON_ID );
387 button.SetLabel( ENABLE_BUTTON_TEXT ); 379 button.SetLabel( ENABLE_BUTTON_TEXT );
388 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
389 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
390 - button.SetPosition( buttonXDP, 0 );  
391 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 380 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  381 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
392 382
393 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 383 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
394 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 384 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -400,15 +390,11 @@ class LoggingController: public ConnectionTracker @@ -400,15 +390,11 @@ class LoggingController: public ConnectionTracker
400 } 390 }
401 391
402 { 392 {
403 - buttonXDP += DP(MARGIN_SIZE) + buttonWidthDP;  
404 -  
405 Toolkit::PushButton button = Toolkit::PushButton::New(); 393 Toolkit::PushButton button = Toolkit::PushButton::New();
406 button.SetName( DISABLE_BUTTON_ID ); 394 button.SetName( DISABLE_BUTTON_ID );
407 button.SetLabel( DISABLE_BUTTON_TEXT ); 395 button.SetLabel( DISABLE_BUTTON_TEXT );
408 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
409 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
410 - button.SetPosition( buttonXDP, 0 );  
411 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 396 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  397 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
412 398
413 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 399 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
414 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 400 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -419,47 +405,37 @@ class LoggingController: public ConnectionTracker @@ -419,47 +405,37 @@ class LoggingController: public ConnectionTracker
419 enableGroupBackground.Add( button ); 405 enableGroupBackground.Add( button );
420 } 406 }
421 407
422 - yPos += LOGGER_GROUP_HEIGHT + MARGIN_SIZE;  
423 -  
424 // Logger selector radio group 408 // Logger selector radio group
425 - unsigned int groupHeight = LOGGER_GROUP_HEIGHT + 30; 409 + Toolkit::TableView frequencyRadioGroupBackground = Toolkit::TableView::New( 2, 1 );
  410 + frequencyRadioGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  411 + frequencyRadioGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  412 + frequencyRadioGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  413 + frequencyRadioGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE * 0.5f ) );
  414 + frequencyRadioGroupBackground.SetFitHeight( 0 );
  415 + frequencyRadioGroupBackground.SetFitHeight( 1 );
426 416
427 - Actor frequencyRadioGroupBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
428 - frequencyRadioGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
429 - frequencyRadioGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
430 - frequencyRadioGroupBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
431 - frequencyRadioGroupBackground.SetSize( stageSize.width - 2 * DP(MARGIN_SIZE), DP(groupHeight) );  
432 - mContentLayer.Add( frequencyRadioGroupBackground ); 417 + contentTable.Add( frequencyRadioGroupBackground );
433 418
434 // Label 419 // Label
435 { 420 {
436 Toolkit::TextLabel label = Toolkit::TextLabel::New( FREQUENCY_TEXT ); 421 Toolkit::TextLabel label = Toolkit::TextLabel::New( FREQUENCY_TEXT );
437 - label.SetParentOrigin( ParentOrigin::TOP_LEFT );  
438 - label.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
439 - label.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );  
440 422
441 frequencyRadioGroupBackground.Add( label ); 423 frequencyRadioGroupBackground.Add( label );
442 } 424 }
443 425
444 // Radio group 426 // Radio group
445 - Actor frequencyRadioButtonsGroup = Actor::New();  
446 - frequencyRadioButtonsGroup.SetParentOrigin( ParentOrigin::TOP_LEFT );  
447 - frequencyRadioButtonsGroup.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
448 - frequencyRadioButtonsGroup.SetPosition( DP(MARGIN_SIZE), DP(40) ); 427 + Toolkit::TableView frequencyRadioButtonsGroup = Toolkit::TableView::New( 1, 3 );
  428 + frequencyRadioButtonsGroup.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  429 + frequencyRadioButtonsGroup.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  430 + frequencyRadioButtonsGroup.SetFitHeight( 0 );
  431 + frequencyRadioButtonsGroup.SetPadding( Padding( 0.0f, 0.0f, MARGIN_SIZE, 0.0f ) );
449 432
450 frequencyRadioGroupBackground.Add( frequencyRadioButtonsGroup ); 433 frequencyRadioGroupBackground.Add( frequencyRadioButtonsGroup );
451 434
452 - radioX = 0;  
453 - radioY = 0;  
454 - const int frequencyRadioWidth = 100;  
455 -  
456 // Radio 1 435 // Radio 1
457 { 436 {
458 Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_1_RADIO_TEXT ); 437 Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_1_RADIO_TEXT );
459 radioButton.SetName( FREQUENCY_1_RADIO_ID ); 438 radioButton.SetName( FREQUENCY_1_RADIO_ID );
460 - radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT );  
461 - radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
462 - radioButton.SetPosition( DP(radioX), DP(radioY) );  
463 439
464 radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); 440 radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect );
465 441
@@ -469,13 +445,9 @@ class LoggingController: public ConnectionTracker @@ -469,13 +445,9 @@ class LoggingController: public ConnectionTracker
469 445
470 // Radio 2 446 // Radio 2
471 { 447 {
472 - radioX += frequencyRadioWidth;  
473 -  
474 Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_2_RADIO_TEXT ); 448 Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_2_RADIO_TEXT );
475 radioButton.SetName( FREQUENCY_2_RADIO_ID ); 449 radioButton.SetName( FREQUENCY_2_RADIO_ID );
476 - radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT );  
477 - radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
478 - radioButton.SetPosition( DP(radioX), DP(radioY) ); 450 +
479 radioButton.SetSelected( true ); 451 radioButton.SetSelected( true );
480 452
481 radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); 453 radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect );
@@ -486,13 +458,8 @@ class LoggingController: public ConnectionTracker @@ -486,13 +458,8 @@ class LoggingController: public ConnectionTracker
486 458
487 // Radio 3 459 // Radio 3
488 { 460 {
489 - radioX += frequencyRadioWidth;  
490 -  
491 Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_3_RADIO_TEXT ); 461 Toolkit::RadioButton radioButton = Toolkit::RadioButton::New( FREQUENCY_3_RADIO_TEXT );
492 radioButton.SetName( FREQUENCY_3_RADIO_ID ); 462 radioButton.SetName( FREQUENCY_3_RADIO_ID );
493 - radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT );  
494 - radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
495 - radioButton.SetPosition( DP(radioX), DP(radioY) );  
496 463
497 radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); 464 radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect );
498 465
@@ -501,26 +468,21 @@ class LoggingController: public ConnectionTracker @@ -501,26 +468,21 @@ class LoggingController: public ConnectionTracker
501 } 468 }
502 469
503 // Vsync group 470 // Vsync group
504 - yPos += groupHeight + MARGIN_SIZE;  
505 -  
506 - Actor vsyncGroupBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );  
507 - vsyncGroupBackground.SetAnchorPoint( AnchorPoint::TOP_LEFT );  
508 - vsyncGroupBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );  
509 - vsyncGroupBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );  
510 - vsyncGroupBackground.SetSize( stageSize.width - 2 * DP(MARGIN_SIZE), DP(LOGGER_GROUP_HEIGHT) );  
511 - mContentLayer.Add( vsyncGroupBackground ); 471 + Toolkit::TableView vsyncGroupBackground = Toolkit::TableView::New( 1, 1 );
  472 + vsyncGroupBackground.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  473 + vsyncGroupBackground.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  474 + vsyncGroupBackground.SetBackgroundColor( BACKGROUND_COLOUR );
  475 + vsyncGroupBackground.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
  476 + vsyncGroupBackground.SetFitHeight( 0 );
512 477
513 - buttonXDP = DP(MARGIN_SIZE);  
514 - buttonWidthDP = vsyncGroupBackground.GetTargetSize().width - DP(MARGIN_SIZE) * 2; 478 + contentTable.Add( vsyncGroupBackground );
515 479
516 { 480 {
517 Toolkit::PushButton button = Toolkit::PushButton::New(); 481 Toolkit::PushButton button = Toolkit::PushButton::New();
518 button.SetName( VSYNC_BUTTON_ID ); 482 button.SetName( VSYNC_BUTTON_ID );
519 button.SetLabel( VSYNC_BUTTON_TEXT ); 483 button.SetLabel( VSYNC_BUTTON_TEXT );
520 - button.SetParentOrigin( ParentOrigin::CENTER_LEFT );  
521 - button.SetAnchorPoint( AnchorPoint::CENTER_LEFT );  
522 - button.SetPosition( buttonXDP, 0 );  
523 - button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); 484 + button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  485 + button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
524 486
525 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 487 button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
526 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 488 button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
@@ -720,6 +682,34 @@ class LoggingController: public ConnectionTracker @@ -720,6 +682,34 @@ class LoggingController: public ConnectionTracker
720 return true; 682 return true;
721 } 683 }
722 684
  685 + bool OnTouchEvent( Actor actor, const TouchEvent& event )
  686 + {
  687 + if( 1u == event.GetPointCount() )
  688 + {
  689 + const TouchPoint::State state = event.GetPoint(0u).state;
  690 +
  691 + // Clamp to integer values; this is to reduce flicking due to pixel misalignment
  692 + const float localPoint = static_cast<float>( static_cast<int>( event.GetPoint( 0 ).local.y ) );
  693 +
  694 + if( TouchPoint::Down == state )
  695 + {
  696 + mLastPoint = localPoint;
  697 + mAnimation = Animation::New( 0.25f );
  698 + }
  699 + else if( TouchPoint::Motion == state )
  700 + {
  701 + if( mAnimation )
  702 + {
  703 + mAnimation.AnimateBy( Property(actor, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunctions::Linear );
  704 + mAnimation.Play();
  705 + mLastPoint = localPoint;
  706 + }
  707 + }
  708 + }
  709 +
  710 + return true;
  711 + }
  712 +
723 private: 713 private:
724 714
725 struct LoggerState 715 struct LoggerState
@@ -736,6 +726,9 @@ class LoggingController: public ConnectionTracker @@ -736,6 +726,9 @@ class LoggingController: public ConnectionTracker
736 Toolkit::ToolBar mToolBar; ///< The View's Toolbar. 726 Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
737 Layer mContentLayer; ///< Content layer 727 Layer mContentLayer; ///< Content layer
738 728
  729 + Animation mAnimation;
  730 + float mLastPoint;
  731 +
739 typedef std::vector< std::string > Strings; 732 typedef std::vector< std::string > Strings;
740 Strings mPerformanceLoggerNames; 733 Strings mPerformanceLoggerNames;
741 734
examples/path-animation/path-animation.cpp
@@ -65,8 +65,8 @@ public: @@ -65,8 +65,8 @@ public:
65 Actor CreateVectorComponentControl( const std::string& label, const Vector3& size, bool(PathController::*callback)(Slider,float) ) 65 Actor CreateVectorComponentControl( const std::string& label, const Vector3& size, bool(PathController::*callback)(Slider,float) )
66 { 66 {
67 TextLabel text = TextLabel::New(label); 67 TextLabel text = TextLabel::New(label);
68 - text.SetResizePolicy( USE_NATURAL_SIZE, WIDTH );  
69 - text.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 68 + text.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH );
  69 + text.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
70 text.SetColor( Vector4(0.0f,0.0f,0.0f,1.0f)); 70 text.SetColor( Vector4(0.0f,0.0f,0.0f,1.0f));
71 71
72 Slider slider = Slider::New(); 72 Slider slider = Slider::New();
examples/radial-menu/radial-menu-example.cpp
@@ -167,7 +167,7 @@ void RadialMenuExample::OnInit(Application&amp; app) @@ -167,7 +167,7 @@ void RadialMenuExample::OnInit(Application&amp; app)
167 167
168 Image dial = ResourceImage::New( TEST_DIAL_FILENAME ); 168 Image dial = ResourceImage::New( TEST_DIAL_FILENAME );
169 mDialActor = ImageActor::New( dial ); 169 mDialActor = ImageActor::New( dial );
170 - mDialActor.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS ); 170 + mDialActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
171 mDialActor.SetPositionInheritanceMode(USE_PARENT_POSITION); 171 mDialActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
172 mDialActor.SetScale(scale); 172 mDialActor.SetScale(scale);
173 Layer dialLayer = Layer::New(); 173 Layer dialLayer = Layer::New();
@@ -245,7 +245,7 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName, @@ -245,7 +245,7 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName,
245 mImageActor = ImageActor::New(image); 245 mImageActor = ImageActor::New(image);
246 mImageActor.SetParentOrigin(ParentOrigin::CENTER); 246 mImageActor.SetParentOrigin(ParentOrigin::CENTER);
247 mImageActor.SetAnchorPoint(AnchorPoint::CENTER); 247 mImageActor.SetAnchorPoint(AnchorPoint::CENTER);
248 - mImageActor.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS ); 248 + mImageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
249 249
250 // Create the stencil 250 // Create the stencil
251 Vector2 imageSize = ResourceImage::GetImageSize(imageName); 251 Vector2 imageSize = ResourceImage::GetImageSize(imageName);
examples/scroll-view/scroll-view-example.cpp
@@ -302,7 +302,7 @@ private: @@ -302,7 +302,7 @@ private:
302 { 302 {
303 Actor page = Actor::New(); 303 Actor page = Actor::New();
304 page.SetRelayoutEnabled( true ); 304 page.SetRelayoutEnabled( true );
305 - page.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 305 + page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
306 page.SetParentOrigin( ParentOrigin::CENTER ); 306 page.SetParentOrigin( ParentOrigin::CENTER );
307 page.SetAnchorPoint( AnchorPoint::CENTER ); 307 page.SetAnchorPoint( AnchorPoint::CENTER );
308 308
@@ -455,7 +455,7 @@ private: @@ -455,7 +455,7 @@ private:
455 { 455 {
456 page.RemoveConstraints(); 456 page.RemoveConstraints();
457 page.SetRelayoutEnabled( true ); 457 page.SetRelayoutEnabled( true );
458 - page.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 458 + page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
459 459
460 switch( mEffectMode ) 460 switch( mEffectMode )
461 { 461 {
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
@@ -201,7 +201,7 @@ public: @@ -201,7 +201,7 @@ public:
201 mShadowView.SetParentOrigin(ParentOrigin::CENTER); 201 mShadowView.SetParentOrigin(ParentOrigin::CENTER);
202 mShadowView.SetAnchorPoint(AnchorPoint::CENTER); 202 mShadowView.SetAnchorPoint(AnchorPoint::CENTER);
203 mShadowView.SetRelayoutEnabled( true ); 203 mShadowView.SetRelayoutEnabled( true );
204 - mShadowView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 204 + mShadowView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
205 mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f); 205 mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f);
206 mContents.Add(mShadowView); 206 mContents.Add(mShadowView);
207 207
@@ -233,6 +233,8 @@ public: @@ -233,6 +233,8 @@ public:
233 mCastingLight.SetPosition( Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor ); 233 mCastingLight.SetPosition( Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor );
234 234
235 TextLabel text = TextLabel::New( "Light" ); 235 TextLabel text = TextLabel::New( "Light" );
  236 + text.SetProperty( TextLabel::Property::POINT_SIZE, 20.0f );
  237 + text.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
236 text.SetColor( Color::BLUE ); 238 text.SetColor( Color::BLUE );
237 239
238 mCastingLight.Add(text); 240 mCastingLight.Add(text);
@@ -253,9 +255,9 @@ public: @@ -253,9 +255,9 @@ public:
253 mImageActor2 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_2) ); 255 mImageActor2 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_2) );
254 mImageActor3 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_3) ); 256 mImageActor3 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_3) );
255 257
256 - mImageActor1.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );  
257 - mImageActor2.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );  
258 - mImageActor3.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS ); 258 + mImageActor1.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
  259 + mImageActor2.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
  260 + mImageActor3.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
259 261
260 mImageActor2.SetParentOrigin(ParentOrigin::CENTER); 262 mImageActor2.SetParentOrigin(ParentOrigin::CENTER);
261 263
examples/size-negotiation/size-negotiation-example.cpp
@@ -40,7 +40,7 @@ namespace @@ -40,7 +40,7 @@ namespace
40 const char* const BACKGROUND_IMAGE = DALI_IMAGE_DIR "background-gradient.jpg"; 40 const char* const BACKGROUND_IMAGE = DALI_IMAGE_DIR "background-gradient.jpg";
41 const char* const TOOLBAR_IMAGE = DALI_IMAGE_DIR "top-bar.png"; 41 const char* const TOOLBAR_IMAGE = DALI_IMAGE_DIR "top-bar.png";
42 42
43 -const char* const TOOLBAR_TITLE = "Size Negotiation"; 43 +const char* const TOOLBAR_TITLE = "Negotiate Size";
44 const int TOOLBAR_HEIGHT = 62; 44 const int TOOLBAR_HEIGHT = 62;
45 45
46 const char* MENU_ICON_IMAGE = DALI_IMAGE_DIR "icon-cluster-none.png"; 46 const char* MENU_ICON_IMAGE = DALI_IMAGE_DIR "icon-cluster-none.png";
@@ -190,7 +190,7 @@ public: @@ -190,7 +190,7 @@ public:
190 mItemView = Toolkit::ItemView::New( *this ); 190 mItemView = Toolkit::ItemView::New( *this );
191 mItemView.SetParentOrigin( ParentOrigin::CENTER ); 191 mItemView.SetParentOrigin( ParentOrigin::CENTER );
192 mItemView.SetAnchorPoint( AnchorPoint::CENTER ); 192 mItemView.SetAnchorPoint( AnchorPoint::CENTER );
193 - mItemView.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 193 + mItemView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
194 194
195 // Use a grid layout for tests 195 // Use a grid layout for tests
196 Toolkit::GridLayoutPtr gridLayout = Toolkit::GridLayout::New(); 196 Toolkit::GridLayoutPtr gridLayout = Toolkit::GridLayout::New();
@@ -254,11 +254,11 @@ public: @@ -254,11 +254,11 @@ public:
254 mMenu.HideTail(); 254 mMenu.HideTail();
255 mMenu.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::HideMenu ); 255 mMenu.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::HideMenu );
256 mMenu.SetSize( popupWidth, 0.0f ); 256 mMenu.SetSize( popupWidth, 0.0f );
257 - mMenu.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 257 + mMenu.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
258 258
259 Toolkit::TableView tableView = Toolkit::TableView::New( 0, 0 ); 259 Toolkit::TableView tableView = Toolkit::TableView::New( 0, 0 );
260 - tableView.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
261 - tableView.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 260 + tableView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  261 + tableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
262 mMenu.Add( tableView ); 262 mMenu.Add( tableView );
263 263
264 for( unsigned int i = 0; i < MENU_ITEMS_COUNT; ++i ) 264 for( unsigned int i = 0; i < MENU_ITEMS_COUNT; ++i )
@@ -430,7 +430,8 @@ public: @@ -430,7 +430,8 @@ public:
430 text.SetProperty( TextLabel::Property::MULTI_LINE, true ); 430 text.SetProperty( TextLabel::Property::MULTI_LINE, true );
431 text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 431 text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
432 text.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 432 text.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
433 - text.SetResizePolicy( FILL_TO_PARENT, Dali::HEIGHT ); 433 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  434 + text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
434 text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); 435 text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
435 436
436 mPopup.Add( text ); 437 mPopup.Add( text );
@@ -442,8 +443,8 @@ public: @@ -442,8 +443,8 @@ public:
442 mPopup = CreatePopup(); 443 mPopup = CreatePopup();
443 444
444 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 445 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
445 - image.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
446 - image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 446 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  447 + image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
447 image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); 448 image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
448 449
449 mPopup.Add( image ); 450 mPopup.Add( image );
@@ -454,11 +455,11 @@ public: @@ -454,11 +455,11 @@ public:
454 { 455 {
455 mPopup = CreatePopup(); 456 mPopup = CreatePopup();
456 457
457 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 458 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
458 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 459 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
459 460
460 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 461 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
461 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 462 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
462 463
463 mPopup.Add( image ); 464 mPopup.Add( image );
464 465
@@ -468,12 +469,12 @@ public: @@ -468,12 +469,12 @@ public:
468 { 469 {
469 mPopup = CreatePopup(); 470 mPopup = CreatePopup();
470 471
471 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 472 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
472 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 473 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
473 474
474 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 475 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
475 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
476 - image.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 476 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  477 + image.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
477 478
478 mPopup.Add( image ); 479 mPopup.Add( image );
479 480
@@ -483,12 +484,12 @@ public: @@ -483,12 +484,12 @@ public:
483 { 484 {
484 mPopup = CreatePopup(); 485 mPopup = CreatePopup();
485 486
486 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 487 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
487 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 488 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
488 489
489 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 490 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
490 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
491 - image.SetSizeScalePolicy( FILL_WITH_ASPECT_RATIO ); 491 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  492 + image.SetSizeScalePolicy( SizeScalePolicy::FILL_WITH_ASPECT_RATIO );
492 493
493 mPopup.Add( image ); 494 mPopup.Add( image );
494 495
@@ -501,8 +502,9 @@ public: @@ -501,8 +502,9 @@ public:
501 502
502 Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT ); 503 Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT );
503 text.SetName( "POPUP_CONTENT_TEXT" ); 504 text.SetName( "POPUP_CONTENT_TEXT" );
504 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
505 - text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 505 + text.SetProperty( TextLabel::Property::MULTI_LINE, true );
  506 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  507 + text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
506 text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); 508 text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
507 509
508 mPopup.Add( text ); 510 mPopup.Add( text );
@@ -516,8 +518,9 @@ public: @@ -516,8 +518,9 @@ public:
516 518
517 Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT ); 519 Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT );
518 text.SetName( "POPUP_CONTENT_TEXT" ); 520 text.SetName( "POPUP_CONTENT_TEXT" );
519 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
520 - text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 521 + text.SetProperty( TextLabel::Property::MULTI_LINE, true );
  522 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  523 + text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
521 text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); 524 text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
522 525
523 mPopup.Add( text ); 526 mPopup.Add( text );
@@ -552,8 +555,8 @@ public: @@ -552,8 +555,8 @@ public:
552 // Content 555 // Content
553 Toolkit::TableView content = Toolkit::TableView::New( 2, 2 ); 556 Toolkit::TableView content = Toolkit::TableView::New( 2, 2 );
554 content.SetName( "COMPLEX_TABLEVIEW" ); 557 content.SetName( "COMPLEX_TABLEVIEW" );
555 - content.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
556 - content.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 558 + content.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  559 + content.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
557 content.SetFitHeight( 0 ); 560 content.SetFitHeight( 0 );
558 content.SetFitHeight( 1 ); 561 content.SetFitHeight( 1 );
559 content.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 0.0f ) ); 562 content.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 0.0f ) );
@@ -561,8 +564,9 @@ public: @@ -561,8 +564,9 @@ public:
561 // Text 564 // Text
562 { 565 {
563 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Do you really want to quit?" ); 566 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Do you really want to quit?" );
564 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
565 - text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 567 + text.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true );
  568 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  569 + text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
566 570
567 content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) ); 571 content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) );
568 } 572 }
@@ -571,8 +575,8 @@ public: @@ -571,8 +575,8 @@ public:
571 { 575 {
572 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) ); 576 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) );
573 image.SetName( "COMPLEX_IMAGE" ); 577 image.SetName( "COMPLEX_IMAGE" );
574 - image.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
575 - image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 578 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  579 + image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
576 image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) ); 580 image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
577 content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) ); 581 content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) );
578 } 582 }
@@ -580,8 +584,8 @@ public: @@ -580,8 +584,8 @@ public:
580 // Text 2 584 // Text 2
581 { 585 {
582 Toolkit::TableView root = Toolkit::TableView::New( 1, 2 ); 586 Toolkit::TableView root = Toolkit::TableView::New( 1, 2 );
583 - root.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
584 - root.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 587 + root.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  588 + root.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
585 root.SetFitHeight( 0 ); 589 root.SetFitHeight( 0 );
586 root.SetFitWidth( 0 ); 590 root.SetFitWidth( 0 );
587 root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); 591 root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) );
@@ -632,12 +636,12 @@ public: @@ -632,12 +636,12 @@ public:
632 else if( button.GetName() == TABLEVIEW_BUTTON_EMPTY_ID ) 636 else if( button.GetName() == TABLEVIEW_BUTTON_EMPTY_ID )
633 { 637 {
634 mPopup = CreatePopup(); 638 mPopup = CreatePopup();
635 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 639 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
636 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 640 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
637 641
638 642
639 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); 643 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
640 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 644 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
641 645
642 mPopup.Add( table ); 646 mPopup.Add( table );
643 647
@@ -646,16 +650,16 @@ public: @@ -646,16 +650,16 @@ public:
646 else if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID ) 650 else if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID )
647 { 651 {
648 mPopup = CreatePopup(); 652 mPopup = CreatePopup();
649 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 653 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
650 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 654 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
651 655
652 656
653 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); 657 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
654 table.SetName( "TABLEVIEW_BUTTON_1CELL_ID" ); 658 table.SetName( "TABLEVIEW_BUTTON_1CELL_ID" );
655 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 659 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
656 660
657 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 661 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
658 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 662 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
659 table.Add( backing ); 663 table.Add( backing );
660 664
661 mPopup.Add( table ); 665 mPopup.Add( table );
@@ -665,26 +669,26 @@ public: @@ -665,26 +669,26 @@ public:
665 else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID ) 669 else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID )
666 { 670 {
667 mPopup = CreatePopup(); 671 mPopup = CreatePopup();
668 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 672 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
669 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 673 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
670 674
671 675
672 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); 676 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
673 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 677 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
674 678
675 { 679 {
676 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 680 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
677 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 681 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
678 table.Add( backing ); 682 table.Add( backing );
679 } 683 }
680 { 684 {
681 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 685 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
682 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 686 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
683 table.Add( backing ); 687 table.Add( backing );
684 } 688 }
685 { 689 {
686 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 690 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
687 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 691 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
688 table.Add( backing ); 692 table.Add( backing );
689 } 693 }
690 694
@@ -695,61 +699,61 @@ public: @@ -695,61 +699,61 @@ public:
695 else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID ) 699 else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID )
696 { 700 {
697 mPopup = CreatePopup(); 701 mPopup = CreatePopup();
698 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 702 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
699 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 703 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
700 704
701 705
702 Toolkit::TableView table = Toolkit::TableView::New( 3, 3 ); 706 Toolkit::TableView table = Toolkit::TableView::New( 3, 3 );
703 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 707 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
704 708
705 // Column 0 709 // Column 0
706 { 710 {
707 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 711 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
708 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 712 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
709 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 0 ) ); 713 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 0 ) );
710 } 714 }
711 { 715 {
712 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 716 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
713 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 717 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
714 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 0 ) ); 718 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 0 ) );
715 } 719 }
716 { 720 {
717 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 721 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
718 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 722 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
719 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 0 ) ); 723 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 0 ) );
720 } 724 }
721 725
722 // Column 1 726 // Column 1
723 { 727 {
724 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); 728 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
725 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 729 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
726 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 1 ) ); 730 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 1 ) );
727 } 731 }
728 { 732 {
729 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) ); 733 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
730 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 734 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
731 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 1 ) ); 735 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 1 ) );
732 } 736 }
733 { 737 {
734 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 0.0f, 1.0f, 1.0f ) ); 738 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 0.0f, 1.0f, 1.0f ) );
735 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 739 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
736 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 1 ) ); 740 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 1 ) );
737 } 741 }
738 742
739 // Column 2 743 // Column 2
740 { 744 {
741 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 0.0f, 0.0f, 1.0f ) ); 745 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 0.0f, 0.0f, 1.0f ) );
742 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 746 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
743 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 2 ) ); 747 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 2 ) );
744 } 748 }
745 { 749 {
746 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.5f, 0.5f, 0.5f, 1.0f ) ); 750 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.5f, 0.5f, 0.5f, 1.0f ) );
747 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 751 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
748 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 2 ) ); 752 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 2 ) );
749 } 753 }
750 { 754 {
751 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.5f, 0.0f, 1.0f ) ); 755 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.5f, 0.0f, 1.0f ) );
752 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 756 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
753 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 2 ) ); 757 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 2 ) );
754 } 758 }
755 759
@@ -760,38 +764,44 @@ public: @@ -760,38 +764,44 @@ public:
760 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID ) 764 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID )
761 { 765 {
762 mPopup = CreatePopup(); 766 mPopup = CreatePopup();
763 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 767 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
764 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 768 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
765 769
766 770
767 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 771 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
768 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 772 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
769 table.SetFixedHeight( 0, 50.0f ); 773 table.SetFixedHeight( 0, 50.0f );
770 774
771 { 775 {
772 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 776 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
773 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 777 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
774 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 778 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
775 - text.SetAnchorPoint( AnchorPoint::CENTER );  
776 text.SetParentOrigin( ParentOrigin::CENTER ); 779 text.SetParentOrigin( ParentOrigin::CENTER );
  780 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  781 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  782 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
777 backing.Add( text ); 783 backing.Add( text );
778 table.Add( backing ); 784 table.Add( backing );
779 } 785 }
780 { 786 {
781 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 787 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
782 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 788 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
783 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 789 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
784 - text.SetAnchorPoint( AnchorPoint::CENTER ); 790 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
785 text.SetParentOrigin( ParentOrigin::CENTER ); 791 text.SetParentOrigin( ParentOrigin::CENTER );
  792 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  793 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
786 backing.Add( text ); 794 backing.Add( text );
787 table.Add( backing ); 795 table.Add( backing );
788 } 796 }
789 { 797 {
790 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 798 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
791 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 799 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
792 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 800 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
793 - text.SetAnchorPoint( AnchorPoint::CENTER ); 801 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
794 text.SetParentOrigin( ParentOrigin::CENTER ); 802 text.SetParentOrigin( ParentOrigin::CENTER );
  803 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  804 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
795 backing.Add( text ); 805 backing.Add( text );
796 table.Add( backing ); 806 table.Add( backing );
797 } 807 }
@@ -803,39 +813,51 @@ public: @@ -803,39 +813,51 @@ public:
803 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID ) 813 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID )
804 { 814 {
805 mPopup = CreatePopup(); 815 mPopup = CreatePopup();
806 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 816 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
807 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 817 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
808 818
809 819
810 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 820 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
811 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 821 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
812 table.SetFixedHeight( 0, 50.0f ); 822 table.SetFixedHeight( 0, 50.0f );
813 table.SetFixedHeight( 2, 50.0f ); 823 table.SetFixedHeight( 2, 50.0f );
814 824
815 { 825 {
816 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 826 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
817 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 827 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
818 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 828 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
819 text.SetAnchorPoint( AnchorPoint::CENTER ); 829 text.SetAnchorPoint( AnchorPoint::CENTER );
820 text.SetParentOrigin( ParentOrigin::CENTER ); 830 text.SetParentOrigin( ParentOrigin::CENTER );
  831 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  832 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  833 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  834 +
821 backing.Add( text ); 835 backing.Add( text );
822 table.Add( backing ); 836 table.Add( backing );
823 } 837 }
824 { 838 {
825 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 839 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
826 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 840 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
827 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 841 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
828 text.SetAnchorPoint( AnchorPoint::CENTER ); 842 text.SetAnchorPoint( AnchorPoint::CENTER );
829 text.SetParentOrigin( ParentOrigin::CENTER ); 843 text.SetParentOrigin( ParentOrigin::CENTER );
  844 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  845 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  846 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  847 +
830 backing.Add( text ); 848 backing.Add( text );
831 table.Add( backing ); 849 table.Add( backing );
832 } 850 }
833 { 851 {
834 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 852 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
835 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 853 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
836 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 854 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
837 text.SetAnchorPoint( AnchorPoint::CENTER ); 855 text.SetAnchorPoint( AnchorPoint::CENTER );
838 text.SetParentOrigin( ParentOrigin::CENTER ); 856 text.SetParentOrigin( ParentOrigin::CENTER );
  857 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  858 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  859 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  860 +
839 backing.Add( text ); 861 backing.Add( text );
840 table.Add( backing ); 862 table.Add( backing );
841 } 863 }
@@ -847,46 +869,58 @@ public: @@ -847,46 +869,58 @@ public:
847 else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID ) 869 else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID )
848 { 870 {
849 mPopup = CreatePopup(); 871 mPopup = CreatePopup();
850 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 872 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
851 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 873 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
852 874
853 875
854 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 876 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
855 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 877 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
856 table.SetFitHeight( 0 ); 878 table.SetFitHeight( 0 );
857 table.SetFitHeight( 2 ); 879 table.SetFitHeight( 2 );
858 880
859 { 881 {
860 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 882 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
861 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 883 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
862 backing.SetSize( 0.0f, 100.0f ); 884 backing.SetSize( 0.0f, 100.0f );
863 885
864 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 886 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
865 text.SetAnchorPoint( AnchorPoint::CENTER ); 887 text.SetAnchorPoint( AnchorPoint::CENTER );
866 text.SetParentOrigin( ParentOrigin::CENTER ); 888 text.SetParentOrigin( ParentOrigin::CENTER );
  889 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  890 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  891 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  892 +
867 backing.Add( text ); 893 backing.Add( text );
868 894
869 table.Add( backing ); 895 table.Add( backing );
870 } 896 }
871 { 897 {
872 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 898 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
873 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 899 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
874 900
875 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 901 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
876 text.SetAnchorPoint( AnchorPoint::CENTER ); 902 text.SetAnchorPoint( AnchorPoint::CENTER );
877 text.SetParentOrigin( ParentOrigin::CENTER ); 903 text.SetParentOrigin( ParentOrigin::CENTER );
  904 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  905 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  906 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  907 +
878 backing.Add( text ); 908 backing.Add( text );
879 909
880 table.Add( backing ); 910 table.Add( backing );
881 } 911 }
882 { 912 {
883 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 913 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
884 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 914 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
885 backing.SetSize( 0.0f, 100.0f ); 915 backing.SetSize( 0.0f, 100.0f );
886 916
887 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 917 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
888 text.SetAnchorPoint( AnchorPoint::CENTER ); 918 text.SetAnchorPoint( AnchorPoint::CENTER );
889 text.SetParentOrigin( ParentOrigin::CENTER ); 919 text.SetParentOrigin( ParentOrigin::CENTER );
  920 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  921 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  922 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  923 +
890 backing.Add( text ); 924 backing.Add( text );
891 925
892 table.Add( backing ); 926 table.Add( backing );
@@ -899,30 +933,38 @@ public: @@ -899,30 +933,38 @@ public:
899 else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID ) 933 else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID )
900 { 934 {
901 mPopup = CreatePopup(); 935 mPopup = CreatePopup();
902 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 936 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
903 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 937 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
904 938
905 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 939 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
906 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 940 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
907 table.SetFitHeight( 1 ); 941 table.SetFitHeight( 1 );
908 942
909 { 943 {
910 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 944 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
911 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 945 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
912 946
913 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 947 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
914 text.SetAnchorPoint( AnchorPoint::CENTER ); 948 text.SetAnchorPoint( AnchorPoint::CENTER );
915 text.SetParentOrigin( ParentOrigin::CENTER ); 949 text.SetParentOrigin( ParentOrigin::CENTER );
  950 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  951 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  952 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  953 +
916 backing.Add( text ); 954 backing.Add( text );
917 955
918 table.Add( backing ); 956 table.Add( backing );
919 } 957 }
920 { 958 {
921 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 959 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
922 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 960 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
923 backing.SetSize( 0.0f, 200.0f ); 961 backing.SetSize( 0.0f, 200.0f );
924 962
925 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 963 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
  964 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  965 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  966 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  967 +
926 text.SetAnchorPoint( AnchorPoint::CENTER ); 968 text.SetAnchorPoint( AnchorPoint::CENTER );
927 text.SetParentOrigin( ParentOrigin::CENTER ); 969 text.SetParentOrigin( ParentOrigin::CENTER );
928 backing.Add( text ); 970 backing.Add( text );
@@ -931,11 +973,15 @@ public: @@ -931,11 +973,15 @@ public:
931 } 973 }
932 { 974 {
933 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 975 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
934 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 976 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
935 977
936 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 978 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
937 text.SetAnchorPoint( AnchorPoint::CENTER ); 979 text.SetAnchorPoint( AnchorPoint::CENTER );
938 text.SetParentOrigin( ParentOrigin::CENTER ); 980 text.SetParentOrigin( ParentOrigin::CENTER );
  981 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  982 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  983 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  984 +
939 backing.Add( text ); 985 backing.Add( text );
940 986
941 table.Add( backing ); 987 table.Add( backing );
@@ -948,49 +994,61 @@ public: @@ -948,49 +994,61 @@ public:
948 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID ) 994 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID )
949 { 995 {
950 mPopup = CreatePopup(); 996 mPopup = CreatePopup();
951 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 997 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
952 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 998 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
953 - mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 999 + mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
954 1000
955 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 1001 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
956 - table.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
957 - table.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 1002 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1003 + table.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
958 table.SetFitHeight( 0 ); 1004 table.SetFitHeight( 0 );
959 table.SetFitHeight( 1 ); 1005 table.SetFitHeight( 1 );
960 table.SetFitHeight( 2 ); 1006 table.SetFitHeight( 2 );
961 1007
962 { 1008 {
963 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 1009 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
964 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1010 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
965 backing.SetSize( 0.0f, 100.0f ); 1011 backing.SetSize( 0.0f, 100.0f );
966 1012
967 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1013 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
968 text.SetAnchorPoint( AnchorPoint::CENTER ); 1014 text.SetAnchorPoint( AnchorPoint::CENTER );
969 text.SetParentOrigin( ParentOrigin::CENTER ); 1015 text.SetParentOrigin( ParentOrigin::CENTER );
  1016 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1017 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1018 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1019 +
970 backing.Add( text ); 1020 backing.Add( text );
971 1021
972 table.Add( backing ); 1022 table.Add( backing );
973 } 1023 }
974 { 1024 {
975 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); 1025 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
976 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1026 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
977 backing.SetSize( 0.0f, 200.0f ); 1027 backing.SetSize( 0.0f, 200.0f );
978 1028
979 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1029 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
980 text.SetAnchorPoint( AnchorPoint::CENTER ); 1030 text.SetAnchorPoint( AnchorPoint::CENTER );
981 text.SetParentOrigin( ParentOrigin::CENTER ); 1031 text.SetParentOrigin( ParentOrigin::CENTER );
  1032 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1033 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1034 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1035 +
982 backing.Add( text ); 1036 backing.Add( text );
983 1037
984 table.Add( backing ); 1038 table.Add( backing );
985 } 1039 }
986 { 1040 {
987 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 1041 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
988 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1042 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
989 backing.SetSize( 0.0f, 300.0f ); 1043 backing.SetSize( 0.0f, 300.0f );
990 1044
991 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1045 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
992 text.SetAnchorPoint( AnchorPoint::CENTER ); 1046 text.SetAnchorPoint( AnchorPoint::CENTER );
993 text.SetParentOrigin( ParentOrigin::CENTER ); 1047 text.SetParentOrigin( ParentOrigin::CENTER );
  1048 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1049 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1050 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1051 +
994 backing.Add( text ); 1052 backing.Add( text );
995 1053
996 table.Add( backing ); 1054 table.Add( backing );
@@ -1003,37 +1061,45 @@ public: @@ -1003,37 +1061,45 @@ public:
1003 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID ) 1061 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID )
1004 { 1062 {
1005 mPopup = CreatePopup(); 1063 mPopup = CreatePopup();
1006 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 1064 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
1007 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 1065 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
1008 - mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 1066 + mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
1009 1067
1010 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 1068 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
1011 - table.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1012 - table.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 1069 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1070 + table.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
1013 table.SetFitHeight( 0 ); 1071 table.SetFitHeight( 0 );
1014 table.SetFitHeight( 1 ); 1072 table.SetFitHeight( 1 );
1015 1073
1016 { 1074 {
1017 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 1075 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
1018 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1019 - backing.SetResizePolicy( FIXED, HEIGHT ); 1076 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1077 + backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
1020 backing.SetSize( 0.0f, 100.0f ); 1078 backing.SetSize( 0.0f, 100.0f );
1021 1079
1022 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1080 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1023 text.SetAnchorPoint( AnchorPoint::CENTER ); 1081 text.SetAnchorPoint( AnchorPoint::CENTER );
1024 text.SetParentOrigin( ParentOrigin::CENTER ); 1082 text.SetParentOrigin( ParentOrigin::CENTER );
  1083 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1084 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1085 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1086 +
1025 backing.Add( text ); 1087 backing.Add( text );
1026 1088
1027 table.Add( backing ); 1089 table.Add( backing );
1028 } 1090 }
1029 { 1091 {
1030 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 1092 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
1031 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1093 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1032 backing.SetSize( 0.0f, 200.0f ); 1094 backing.SetSize( 0.0f, 200.0f );
1033 1095
1034 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1096 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1035 text.SetAnchorPoint( AnchorPoint::CENTER ); 1097 text.SetAnchorPoint( AnchorPoint::CENTER );
1036 text.SetParentOrigin( ParentOrigin::CENTER ); 1098 text.SetParentOrigin( ParentOrigin::CENTER );
  1099 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1100 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1101 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1102 +
1037 backing.Add( text ); 1103 backing.Add( text );
1038 1104
1039 table.Add( backing ); 1105 table.Add( backing );
@@ -1046,35 +1112,43 @@ public: @@ -1046,35 +1112,43 @@ public:
1046 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID ) 1112 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID )
1047 { 1113 {
1048 mPopup = CreatePopup(); 1114 mPopup = CreatePopup();
1049 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 1115 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
1050 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 1116 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
1051 - mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 1117 + mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
1052 1118
1053 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 1119 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
1054 - table.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1055 - table.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 1120 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1121 + table.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
1056 table.SetFixedHeight( 0, 20.0f ); 1122 table.SetFixedHeight( 0, 20.0f );
1057 table.SetFitHeight( 1 ); 1123 table.SetFitHeight( 1 );
1058 1124
1059 { 1125 {
1060 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); 1126 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
1061 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1127 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1062 1128
1063 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 1129 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
1064 text.SetAnchorPoint( AnchorPoint::CENTER ); 1130 text.SetAnchorPoint( AnchorPoint::CENTER );
1065 text.SetParentOrigin( ParentOrigin::CENTER ); 1131 text.SetParentOrigin( ParentOrigin::CENTER );
  1132 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1133 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1134 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1135 +
1066 backing.Add( text ); 1136 backing.Add( text );
1067 1137
1068 table.Add( backing ); 1138 table.Add( backing );
1069 } 1139 }
1070 { 1140 {
1071 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); 1141 Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
1072 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1142 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1073 backing.SetSize( 0.0f, 200.0f ); 1143 backing.SetSize( 0.0f, 200.0f );
1074 1144
1075 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1145 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1076 text.SetAnchorPoint( AnchorPoint::CENTER ); 1146 text.SetAnchorPoint( AnchorPoint::CENTER );
1077 text.SetParentOrigin( ParentOrigin::CENTER ); 1147 text.SetParentOrigin( ParentOrigin::CENTER );
  1148 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  1149 + text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
  1150 + text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
  1151 +
1078 backing.Add( text ); 1152 backing.Add( text );
1079 1153
1080 table.Add( backing ); 1154 table.Add( backing );
@@ -1179,7 +1253,7 @@ public: // From ItemFactory @@ -1179,7 +1253,7 @@ public: // From ItemFactory
1179 Toolkit::PushButton popupButton = Toolkit::PushButton::New(); 1253 Toolkit::PushButton popupButton = Toolkit::PushButton::New();
1180 popupButton.SetName( buttonDataArray[ itemId ].name ); 1254 popupButton.SetName( buttonDataArray[ itemId ].name );
1181 popupButton.SetLabel( buttonDataArray[ itemId ].text ); 1255 popupButton.SetLabel( buttonDataArray[ itemId ].text );
1182 - popupButton.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS ); 1256 + popupButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
1183 1257
1184 popupButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 1258 popupButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
1185 popupButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); 1259 popupButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
examples/text-field/text-field-example.cpp
@@ -74,7 +74,6 @@ public: @@ -74,7 +74,6 @@ public:
74 mContainer = Control::New(); 74 mContainer = Control::New();
75 mContainer.SetName( "Container" ); 75 mContainer.SetName( "Container" );
76 mContainer.SetParentOrigin( ParentOrigin::CENTER ); 76 mContainer.SetParentOrigin( ParentOrigin::CENTER );
77 - mContainer.SetResizePolicy( FIXED, ALL_DIMENSIONS );  
78 mContainer.SetSize( Vector2(stageSize.width*0.6f, stageSize.width*0.6f) ); 77 mContainer.SetSize( Vector2(stageSize.width*0.6f, stageSize.width*0.6f) );
79 mContainer.SetBackgroundImage( ResourceImage::New( BACKGROUND_IMAGE ) ); 78 mContainer.SetBackgroundImage( ResourceImage::New( BACKGROUND_IMAGE ) );
80 mContainer.GetChildAt(0).SetZ(-1.0f); 79 mContainer.GetChildAt(0).SetZ(-1.0f);
@@ -82,8 +81,8 @@ public: @@ -82,8 +81,8 @@ public:
82 81
83 TextField field = TextField::New(); 82 TextField field = TextField::New();
84 field.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 83 field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
85 - field.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
86 - field.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 84 + field.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  85 + field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
87 86
88 mContainer.Add( field ); 87 mContainer.Add( field );
89 88
examples/text-label-emojis/text-label-emojis.cpp
@@ -59,8 +59,8 @@ public: @@ -59,8 +59,8 @@ public:
59 stage.KeyEventSignal().Connect(this, &EmojiExample::OnKeyEvent); 59 stage.KeyEventSignal().Connect(this, &EmojiExample::OnKeyEvent);
60 60
61 mTableView = Toolkit::TableView::New( NUMBER_OF_EMOJIS, 1 ); 61 mTableView = Toolkit::TableView::New( NUMBER_OF_EMOJIS, 1 );
62 - mTableView.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
63 - mTableView.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 62 + mTableView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  63 + mTableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
64 mTableView.SetParentOrigin( ParentOrigin::TOP_LEFT ); 64 mTableView.SetParentOrigin( ParentOrigin::TOP_LEFT );
65 mTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 65 mTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
66 mTableView.TouchedSignal().Connect( this, &EmojiExample::OnTouchEvent ); 66 mTableView.TouchedSignal().Connect( this, &EmojiExample::OnTouchEvent );
examples/text-label-multi-language/text-label-multi-language-example.cpp
@@ -64,8 +64,8 @@ public: @@ -64,8 +64,8 @@ public:
64 stage.KeyEventSignal().Connect(this, &TextLabelMultiLanguageExample::OnKeyEvent); 64 stage.KeyEventSignal().Connect(this, &TextLabelMultiLanguageExample::OnKeyEvent);
65 65
66 mTableView = Toolkit::TableView::New( NUMBER_OF_LANGUAGES, 1 ); 66 mTableView = Toolkit::TableView::New( NUMBER_OF_LANGUAGES, 1 );
67 - mTableView.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
68 - mTableView.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 67 + mTableView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  68 + mTableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
69 mTableView.SetParentOrigin( ParentOrigin::TOP_LEFT ); 69 mTableView.SetParentOrigin( ParentOrigin::TOP_LEFT );
70 mTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 70 mTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
71 mTableView.TouchedSignal().Connect( this, &TextLabelMultiLanguageExample::OnTouchEvent ); 71 mTableView.TouchedSignal().Connect( this, &TextLabelMultiLanguageExample::OnTouchEvent );
examples/text-label/text-label-example.cpp
@@ -38,6 +38,7 @@ namespace @@ -38,6 +38,7 @@ namespace
38 38
39 const unsigned int KEY_ZERO = 10; 39 const unsigned int KEY_ZERO = 10;
40 const unsigned int KEY_ONE = 11; 40 const unsigned int KEY_ONE = 11;
  41 + const unsigned int KEY_F = 41;
41 const unsigned int KEY_H = 43; 42 const unsigned int KEY_H = 43;
42 const unsigned int KEY_V = 55; 43 const unsigned int KEY_V = 55;
43 const unsigned int KEY_M = 58; 44 const unsigned int KEY_M = 58;
@@ -106,11 +107,8 @@ public: @@ -106,11 +107,8 @@ public:
106 mContainer = Control::New(); 107 mContainer = Control::New();
107 mContainer.SetName( "Container" ); 108 mContainer.SetName( "Container" );
108 mContainer.SetParentOrigin( ParentOrigin::CENTER ); 109 mContainer.SetParentOrigin( ParentOrigin::CENTER );
109 - mContainer.SetResizePolicy( FIXED, ALL_DIMENSIONS );  
110 mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f); 110 mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f);
111 mContainer.SetSize( mLayoutSize ); 111 mContainer.SetSize( mLayoutSize );
112 - mContainer.SetBackgroundImage( ResourceImage::New( BACKGROUND_IMAGE ) );  
113 - mContainer.GetChildAt(0).SetZ(-1.0f);  
114 stage.Add( mContainer ); 112 stage.Add( mContainer );
115 113
116 // Resize the center layout when the corner is grabbed 114 // Resize the center layout when the corner is grabbed
@@ -118,9 +116,9 @@ public: @@ -118,9 +116,9 @@ public:
118 mGrabCorner.SetName( "GrabCorner" ); 116 mGrabCorner.SetName( "GrabCorner" );
119 mGrabCorner.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); 117 mGrabCorner.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
120 mGrabCorner.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT ); 118 mGrabCorner.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT );
121 - mGrabCorner.SetResizePolicy( FIXED, ALL_DIMENSIONS );  
122 mGrabCorner.SetSize( Vector2(stageSize.width*0.1f, stageSize.width*0.1f) ); 119 mGrabCorner.SetSize( Vector2(stageSize.width*0.1f, stageSize.width*0.1f) );
123 mGrabCorner.SetZ(1.0f); 120 mGrabCorner.SetZ(1.0f);
  121 + mGrabCorner.SetBackgroundColor( Color::YELLOW );
124 mContainer.Add( mGrabCorner ); 122 mContainer.Add( mGrabCorner );
125 123
126 mPanGestureDetector = PanGestureDetector::New(); 124 mPanGestureDetector = PanGestureDetector::New();
@@ -130,11 +128,12 @@ public: @@ -130,11 +128,12 @@ public:
130 mLabel = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" ); 128 mLabel = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" );
131 mLabel.SetName( "TextLabel" ); 129 mLabel.SetName( "TextLabel" );
132 mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 130 mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
133 - mLabel.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
134 - mLabel.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 131 + mLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  132 + mLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
135 mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); 133 mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
136 mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) ); 134 mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) );
137 mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK ); 135 mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );
  136 + mLabel.SetBackgroundColor( Vector4(0.3f,0.3f,0.6f,1.0f) );
138 mContainer.Add( mLabel ); 137 mContainer.Add( mLabel );
139 138
140 Property::Value labelText = mLabel.GetProperty( TextLabel::Property::TEXT ); 139 Property::Value labelText = mLabel.GetProperty( TextLabel::Property::TEXT );
@@ -173,13 +172,26 @@ public: @@ -173,13 +172,26 @@ public:
173 { 172 {
174 switch( event.keyCode ) 173 switch( event.keyCode )
175 { 174 {
  175 + // Select rendering back-end
176 case KEY_ZERO: // fall through 176 case KEY_ZERO: // fall through
177 case KEY_ONE: 177 case KEY_ONE:
178 { 178 {
179 mLabel.SetProperty( TextLabel::Property::RENDERING_BACKEND, event.keyCode - 10 ); 179 mLabel.SetProperty( TextLabel::Property::RENDERING_BACKEND, event.keyCode - 10 );
180 break; 180 break;
181 } 181 }
182 - case KEY_H: 182 + case KEY_F: // Fill vertically
  183 + {
  184 + if( ResizePolicy::DIMENSION_DEPENDENCY == mLabel.GetResizePolicy(Dimension::HEIGHT) )
  185 + {
  186 + mLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
  187 + }
  188 + else
  189 + {
  190 + mLabel.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
  191 + }
  192 + break;
  193 + }
  194 + case KEY_H: // Horizontal alignment
183 { 195 {
184 if( ++mAlignment >= H_ALIGNMENT_STRING_COUNT ) 196 if( ++mAlignment >= H_ALIGNMENT_STRING_COUNT )
185 { 197 {
@@ -189,7 +201,7 @@ public: @@ -189,7 +201,7 @@ public:
189 mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, H_ALIGNMENT_STRING_TABLE[ mAlignment ] ); 201 mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, H_ALIGNMENT_STRING_TABLE[ mAlignment ] );
190 break; 202 break;
191 } 203 }
192 - case KEY_V: 204 + case KEY_V: // Vertical alignment
193 { 205 {
194 if( ++mAlignment >= V_ALIGNMENT_STRING_COUNT ) 206 if( ++mAlignment >= V_ALIGNMENT_STRING_COUNT )
195 { 207 {
@@ -199,13 +211,13 @@ public: @@ -199,13 +211,13 @@ public:
199 mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, V_ALIGNMENT_STRING_TABLE[ mAlignment ] ); 211 mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, V_ALIGNMENT_STRING_TABLE[ mAlignment ] );
200 break; 212 break;
201 } 213 }
202 - case KEY_M: 214 + case KEY_M: // Multi-line
203 { 215 {
204 bool multiLine = mLabel.GetProperty<bool>( TextLabel::Property::MULTI_LINE ); 216 bool multiLine = mLabel.GetProperty<bool>( TextLabel::Property::MULTI_LINE );
205 mLabel.SetProperty( TextLabel::Property::MULTI_LINE, !multiLine ); 217 mLabel.SetProperty( TextLabel::Property::MULTI_LINE, !multiLine );
206 break; 218 break;
207 } 219 }
208 - case KEY_L: 220 + case KEY_L: // Language
209 { 221 {
210 const Language& language = LANGUAGES[ mLanguageId ]; 222 const Language& language = LANGUAGES[ mLanguageId ];
211 223
@@ -217,7 +229,7 @@ public: @@ -217,7 +229,7 @@ public:
217 } 229 }
218 break; 230 break;
219 } 231 }
220 - case KEY_S: 232 + case KEY_S: // Shadow color
221 { 233 {
222 if( Color::BLACK == mLabel.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ) ) 234 if( Color::BLACK == mLabel.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ) )
223 { 235 {
@@ -229,12 +241,12 @@ public: @@ -229,12 +241,12 @@ public:
229 } 241 }
230 break; 242 break;
231 } 243 }
232 - case KEY_PLUS: 244 + case KEY_PLUS: // Increase shadow offset
233 { 245 {
234 mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) + Vector2( 1.0f, 1.0f ) ); 246 mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) + Vector2( 1.0f, 1.0f ) );
235 break; 247 break;
236 } 248 }
237 - case KEY_MINUS: 249 + case KEY_MINUS: // Decrease shadow offset
238 { 250 {
239 mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) - Vector2( 1.0f, 1.0f ) ); 251 mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) - Vector2( 1.0f, 1.0f ) );
240 break; 252 break;
@@ -252,7 +264,7 @@ private: @@ -252,7 +264,7 @@ private:
252 TextLabel mLabel; 264 TextLabel mLabel;
253 265
254 Control mContainer; 266 Control mContainer;
255 - Actor mGrabCorner; 267 + Control mGrabCorner;
256 268
257 PanGestureDetector mPanGestureDetector; 269 PanGestureDetector mPanGestureDetector;
258 270
packaging/com.samsung.dali-demo.spec
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 Name: com.samsung.dali-demo 3 Name: com.samsung.dali-demo
4 Summary: The OpenGLES Canvas Core Demo 4 Summary: The OpenGLES Canvas Core Demo
5 -Version: 1.0.37 5 +Version: 1.0.38
6 Release: 1 6 Release: 1
7 Group: System/Libraries 7 Group: System/Libraries
8 License: Apache-2.0 8 License: Apache-2.0
resources/style/mobile/demo-theme.json
@@ -51,7 +51,7 @@ distributing this software or its derivatives. @@ -51,7 +51,7 @@ distributing this software or its derivatives.
51 51
52 "launcherlabel": 52 "launcherlabel":
53 { 53 {
54 - "point-size":10 54 + "point-size":8
55 }, 55 },
56 56
57 "toolbarlabel": 57 "toolbarlabel":
shared/dali-demo-strings.h
@@ -53,6 +53,9 @@ extern &quot;C&quot; @@ -53,6 +53,9 @@ extern &quot;C&quot;
53 #define DALI_DEMO_STR_TITLE_EMOJI_TEXT dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_EMOJI_TEXT") 53 #define DALI_DEMO_STR_TITLE_EMOJI_TEXT dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_EMOJI_TEXT")
54 #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES dgettext(DALI_DEMO_STR_TITLE_ANIMATED_SHAPES) 54 #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES dgettext(DALI_DEMO_STR_TITLE_ANIMATED_SHAPES)
55 #define DALI_DEMO_STR_TITLE_PATH_ANIMATION dgettext(DALI_DEMO_STR_TITLE_PATH_ANIMATION) 55 #define DALI_DEMO_STR_TITLE_PATH_ANIMATION dgettext(DALI_DEMO_STR_TITLE_PATH_ANIMATION)
  56 +#define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE dgettext(DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE)
  57 +#define DALI_DEMO_STR_TITLE_BUTTONS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BUTTONS")
  58 +#define DALI_DEMO_STR_TITLE_LOGGING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_LOGGING")
56 59
57 #else // !INTERNATIONALIZATION_ENABLED 60 #else // !INTERNATIONALIZATION_ENABLED
58 61
@@ -77,6 +80,9 @@ extern &quot;C&quot; @@ -77,6 +80,9 @@ extern &quot;C&quot;
77 #define DALI_DEMO_STR_TITLE_EMOJI_TEXT "Emoji Text" 80 #define DALI_DEMO_STR_TITLE_EMOJI_TEXT "Emoji Text"
78 #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES "Animated Shapes" 81 #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES "Animated Shapes"
79 #define DALI_DEMO_STR_TITLE_PATH_ANIMATION "Animated Path" 82 #define DALI_DEMO_STR_TITLE_PATH_ANIMATION "Animated Path"
  83 +#define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE "Negotiate Size"
  84 +#define DALI_DEMO_STR_TITLE_BUTTONS "Buttons"
  85 +#define DALI_DEMO_STR_TITLE_LOGGING "Logging"
80 86
81 #endif 87 #endif
82 88
shared/view.h
@@ -77,7 +77,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar, @@ -77,7 +77,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar,
77 toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); 77 toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
78 toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); 78 toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER );
79 toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); 79 toolBarLayer.SetSize( 0.0f, style.mToolBarHeight );
80 - toolBarLayer.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::WIDTH ); 80 + toolBarLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::WIDTH );
81 81
82 // Raise tool bar layer to the top. 82 // Raise tool bar layer to the top.
83 toolBarLayer.RaiseToTop(); 83 toolBarLayer.RaiseToTop();
@@ -86,13 +86,13 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar, @@ -86,13 +86,13 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar,
86 Dali::Image image = Dali::ResourceImage::New( toolbarImagePath ); 86 Dali::Image image = Dali::ResourceImage::New( toolbarImagePath );
87 Dali::ImageActor toolBarBackground = Dali::ImageActor::New( image ); 87 Dali::ImageActor toolBarBackground = Dali::ImageActor::New( image );
88 toolBarBackground.SetName( "TOOLBAR_BACKGROUND" ); 88 toolBarBackground.SetName( "TOOLBAR_BACKGROUND" );
89 - toolBarBackground.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::ALL_DIMENSIONS ); 89 + toolBarBackground.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
90 toolBar = Dali::Toolkit::ToolBar::New(); 90 toolBar = Dali::Toolkit::ToolBar::New();
91 toolBar.SetName( "TOOLBAR" ); 91 toolBar.SetName( "TOOLBAR" );
92 toolBar.SetBackground( toolBarBackground ); 92 toolBar.SetBackground( toolBarBackground );
93 toolBar.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); 93 toolBar.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER );
94 toolBar.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); 94 toolBar.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
95 - toolBar.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::ALL_DIMENSIONS ); 95 + toolBar.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
96 toolBarBackground.SetSortModifier(1.0f); 96 toolBarBackground.SetSortModifier(1.0f);
97 97
98 // Add the tool bar to the too bar layer. 98 // Add the tool bar to the too bar layer.
@@ -108,7 +108,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar, @@ -108,7 +108,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar,
108 label.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT, title ); 108 label.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT, title );
109 label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 109 label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
110 label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 110 label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
111 - label.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::HEIGHT ); 111 + label.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT );
112 label.SetColor( DEFAULT_TEXT_STYLE_COLOR ); 112 label.SetColor( DEFAULT_TEXT_STYLE_COLOR );
113 113
114 // Add title to the tool bar. 114 // Add title to the tool bar.
@@ -131,7 +131,7 @@ Dali::Layer CreateView( Dali::Application&amp; application, @@ -131,7 +131,7 @@ Dali::Layer CreateView( Dali::Application&amp; application,
131 131
132 // Create default View. 132 // Create default View.
133 view = Dali::Toolkit::View::New(); 133 view = Dali::Toolkit::View::New();
134 - view.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::ALL_DIMENSIONS ); 134 + view.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
135 135
136 // Add the view to the stage before setting the background. 136 // Add the view to the stage before setting the background.
137 stage.Add( view ); 137 stage.Add( view );
@@ -162,7 +162,7 @@ Dali::Layer CreateView( Dali::Application&amp; application, @@ -162,7 +162,7 @@ Dali::Layer CreateView( Dali::Application&amp; application,
162 Dali::Layer contentLayer = Dali::Layer::New(); 162 Dali::Layer contentLayer = Dali::Layer::New();
163 contentLayer.SetAnchorPoint( Dali::AnchorPoint::CENTER ); 163 contentLayer.SetAnchorPoint( Dali::AnchorPoint::CENTER );
164 contentLayer.SetParentOrigin( Dali::ParentOrigin::CENTER ); 164 contentLayer.SetParentOrigin( Dali::ParentOrigin::CENTER );
165 - contentLayer.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::ALL_DIMENSIONS ); 165 + contentLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
166 view.AddContentLayer( contentLayer ); 166 view.AddContentLayer( contentLayer );
167 contentLayer.LowerBelow( toolBarLayer ); 167 contentLayer.LowerBelow( toolBarLayer );
168 168
@@ -176,7 +176,7 @@ Dali::Toolkit::TextLabel CreateToolBarLabel( const std::string&amp; text ) @@ -176,7 +176,7 @@ Dali::Toolkit::TextLabel CreateToolBarLabel( const std::string&amp; text )
176 label.SetDrawMode( Dali::DrawMode::OVERLAY ); 176 label.SetDrawMode( Dali::DrawMode::OVERLAY );
177 label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 177 label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
178 label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 178 label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
179 - label.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::HEIGHT ); 179 + label.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT );
180 label.SetColor( DEFAULT_TEXT_STYLE_COLOR ); 180 label.SetColor( DEFAULT_TEXT_STYLE_COLOR );
181 181
182 return label; 182 return label;