Commit 82ce98f2392846c669be20560d0697f502f47599

Authored by Kingsley Stephens
1 parent 373991cb

Size negotiation patch 3: Scope size negotiation enums

Fix buttons and logging examples

Change-Id: I21699757ea591f73d5a09393caa01fd2b621726c
demo/dali-demo.cpp
@@ -58,6 +58,8 @@ int main(int argc, char **argv) @@ -58,6 +58,8 @@ int main(int argc, char **argv)
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", DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE)); 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
@@ -234,8 +234,7 @@ public: @@ -234,8 +234,7 @@ public:
234 234
235 TextLabel text = TextLabel::New( "Light" ); 235 TextLabel text = TextLabel::New( "Light" );
236 text.SetProperty( TextLabel::Property::POINT_SIZE, 20.0f ); 236 text.SetProperty( TextLabel::Property::POINT_SIZE, 20.0f );
237 - text.SetResizePolicy( USE_NATURAL_SIZE, WIDTH );  
238 - text.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 237 + text.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
239 text.SetColor( Color::BLUE ); 238 text.SetColor( Color::BLUE );
240 239
241 mCastingLight.Add(text); 240 mCastingLight.Add(text);
@@ -256,9 +255,9 @@ public: @@ -256,9 +255,9 @@ public:
256 mImageActor2 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_2) ); 255 mImageActor2 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_2) );
257 mImageActor3 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_3) ); 256 mImageActor3 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_3) );
258 257
259 - mImageActor1.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );  
260 - mImageActor2.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );  
261 - 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 );
262 261
263 mImageActor2.SetParentOrigin(ParentOrigin::CENTER); 262 mImageActor2.SetParentOrigin(ParentOrigin::CENTER);
264 263
examples/size-negotiation/size-negotiation-example.cpp
@@ -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,6 +430,8 @@ public: @@ -430,6 +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( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  434 + text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
433 text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); 435 text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
434 436
435 mPopup.Add( text ); 437 mPopup.Add( text );
@@ -441,8 +443,8 @@ public: @@ -441,8 +443,8 @@ public:
441 mPopup = CreatePopup(); 443 mPopup = CreatePopup();
442 444
443 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 445 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
444 - image.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
445 - image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 446 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  447 + image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
446 image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); 448 image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
447 449
448 mPopup.Add( image ); 450 mPopup.Add( image );
@@ -453,11 +455,11 @@ public: @@ -453,11 +455,11 @@ public:
453 { 455 {
454 mPopup = CreatePopup(); 456 mPopup = CreatePopup();
455 457
456 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 458 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
457 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 459 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
458 460
459 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 461 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
460 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 462 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
461 463
462 mPopup.Add( image ); 464 mPopup.Add( image );
463 465
@@ -467,12 +469,12 @@ public: @@ -467,12 +469,12 @@ public:
467 { 469 {
468 mPopup = CreatePopup(); 470 mPopup = CreatePopup();
469 471
470 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 472 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
471 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 473 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
472 474
473 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 475 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
474 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
475 - image.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); 476 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  477 + image.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
476 478
477 mPopup.Add( image ); 479 mPopup.Add( image );
478 480
@@ -482,12 +484,12 @@ public: @@ -482,12 +484,12 @@ public:
482 { 484 {
483 mPopup = CreatePopup(); 485 mPopup = CreatePopup();
484 486
485 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 487 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
486 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 488 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
487 489
488 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) ); 490 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
489 - image.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );  
490 - image.SetSizeScalePolicy( FILL_WITH_ASPECT_RATIO ); 491 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  492 + image.SetSizeScalePolicy( SizeScalePolicy::FILL_WITH_ASPECT_RATIO );
491 493
492 mPopup.Add( image ); 494 mPopup.Add( image );
493 495
@@ -500,9 +502,9 @@ public: @@ -500,9 +502,9 @@ public:
500 502
501 Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT ); 503 Toolkit::TextLabel text = Toolkit::TextLabel::New( CONTENT_TEXT );
502 text.SetName( "POPUP_CONTENT_TEXT" ); 504 text.SetName( "POPUP_CONTENT_TEXT" );
503 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
504 - text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );  
505 text.SetProperty( TextLabel::Property::MULTI_LINE, true ); 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,9 +518,9 @@ public: @@ -516,9 +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 ); 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 );
522 text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); 524 text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
523 525
524 mPopup.Add( text ); 526 mPopup.Add( text );
@@ -553,8 +555,8 @@ public: @@ -553,8 +555,8 @@ public:
553 // Content 555 // Content
554 Toolkit::TableView content = Toolkit::TableView::New( 2, 2 ); 556 Toolkit::TableView content = Toolkit::TableView::New( 2, 2 );
555 content.SetName( "COMPLEX_TABLEVIEW" ); 557 content.SetName( "COMPLEX_TABLEVIEW" );
556 - content.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
557 - content.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 558 + content.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  559 + content.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
558 content.SetFitHeight( 0 ); 560 content.SetFitHeight( 0 );
559 content.SetFitHeight( 1 ); 561 content.SetFitHeight( 1 );
560 content.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 0.0f ) ); 562 content.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 0.0f ) );
@@ -562,9 +564,9 @@ public: @@ -562,9 +564,9 @@ public:
562 // Text 564 // Text
563 { 565 {
564 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?" );
565 - text.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
566 - text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );  
567 text.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true ); 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 );
568 570
569 content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) ); 571 content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) );
570 } 572 }
@@ -573,8 +575,8 @@ public: @@ -573,8 +575,8 @@ public:
573 { 575 {
574 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) ); 576 ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) );
575 image.SetName( "COMPLEX_IMAGE" ); 577 image.SetName( "COMPLEX_IMAGE" );
576 - image.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
577 - image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT ); 578 + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  579 + image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
578 image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) ); 580 image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
579 content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) ); 581 content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) );
580 } 582 }
@@ -582,8 +584,8 @@ public: @@ -582,8 +584,8 @@ public:
582 // Text 2 584 // Text 2
583 { 585 {
584 Toolkit::TableView root = Toolkit::TableView::New( 1, 2 ); 586 Toolkit::TableView root = Toolkit::TableView::New( 1, 2 );
585 - root.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
586 - root.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 587 + root.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  588 + root.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
587 root.SetFitHeight( 0 ); 589 root.SetFitHeight( 0 );
588 root.SetFitWidth( 0 ); 590 root.SetFitWidth( 0 );
589 root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); 591 root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) );
@@ -634,12 +636,12 @@ public: @@ -634,12 +636,12 @@ public:
634 else if( button.GetName() == TABLEVIEW_BUTTON_EMPTY_ID ) 636 else if( button.GetName() == TABLEVIEW_BUTTON_EMPTY_ID )
635 { 637 {
636 mPopup = CreatePopup(); 638 mPopup = CreatePopup();
637 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 639 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
638 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 640 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
639 641
640 642
641 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); 643 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
642 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 644 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
643 645
644 mPopup.Add( table ); 646 mPopup.Add( table );
645 647
@@ -648,16 +650,16 @@ public: @@ -648,16 +650,16 @@ public:
648 else if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID ) 650 else if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID )
649 { 651 {
650 mPopup = CreatePopup(); 652 mPopup = CreatePopup();
651 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 653 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
652 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 654 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
653 655
654 656
655 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); 657 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
656 table.SetName( "TABLEVIEW_BUTTON_1CELL_ID" ); 658 table.SetName( "TABLEVIEW_BUTTON_1CELL_ID" );
657 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 659 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
658 660
659 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 ) );
660 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 662 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
661 table.Add( backing ); 663 table.Add( backing );
662 664
663 mPopup.Add( table ); 665 mPopup.Add( table );
@@ -667,26 +669,26 @@ public: @@ -667,26 +669,26 @@ public:
667 else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID ) 669 else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID )
668 { 670 {
669 mPopup = CreatePopup(); 671 mPopup = CreatePopup();
670 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 672 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
671 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 673 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
672 674
673 675
674 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); 676 Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
675 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 677 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
676 678
677 { 679 {
678 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 ) );
679 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 681 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
680 table.Add( backing ); 682 table.Add( backing );
681 } 683 }
682 { 684 {
683 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 ) );
684 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 686 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
685 table.Add( backing ); 687 table.Add( backing );
686 } 688 }
687 { 689 {
688 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 ) );
689 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 691 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
690 table.Add( backing ); 692 table.Add( backing );
691 } 693 }
692 694
@@ -697,61 +699,61 @@ public: @@ -697,61 +699,61 @@ public:
697 else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID ) 699 else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID )
698 { 700 {
699 mPopup = CreatePopup(); 701 mPopup = CreatePopup();
700 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 702 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
701 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 703 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
702 704
703 705
704 Toolkit::TableView table = Toolkit::TableView::New( 3, 3 ); 706 Toolkit::TableView table = Toolkit::TableView::New( 3, 3 );
705 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 707 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
706 708
707 // Column 0 709 // Column 0
708 { 710 {
709 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 ) );
710 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 712 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
711 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 0 ) ); 713 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 0 ) );
712 } 714 }
713 { 715 {
714 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 ) );
715 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 717 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
716 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 0 ) ); 718 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 0 ) );
717 } 719 }
718 { 720 {
719 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 ) );
720 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 722 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
721 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 0 ) ); 723 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 0 ) );
722 } 724 }
723 725
724 // Column 1 726 // Column 1
725 { 727 {
726 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 ) );
727 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 729 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
728 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 1 ) ); 730 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 1 ) );
729 } 731 }
730 { 732 {
731 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 ) );
732 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 734 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
733 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 1 ) ); 735 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 1 ) );
734 } 736 }
735 { 737 {
736 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 ) );
737 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 739 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
738 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 1 ) ); 740 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 1 ) );
739 } 741 }
740 742
741 // Column 2 743 // Column 2
742 { 744 {
743 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 ) );
744 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 746 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
745 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 2 ) ); 747 table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 2 ) );
746 } 748 }
747 { 749 {
748 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 ) );
749 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 751 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
750 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 2 ) ); 752 table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 2 ) );
751 } 753 }
752 { 754 {
753 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 ) );
754 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 756 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
755 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 2 ) ); 757 table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 2 ) );
756 } 758 }
757 759
@@ -762,20 +764,20 @@ public: @@ -762,20 +764,20 @@ public:
762 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID ) 764 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID )
763 { 765 {
764 mPopup = CreatePopup(); 766 mPopup = CreatePopup();
765 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 767 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
766 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 768 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
767 769
768 770
769 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 771 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
770 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 772 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
771 table.SetFixedHeight( 0, 50.0f ); 773 table.SetFixedHeight( 0, 50.0f );
772 774
773 { 775 {
774 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 ) );
775 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 777 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
776 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 778 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
777 text.SetParentOrigin( ParentOrigin::CENTER ); 779 text.SetParentOrigin( ParentOrigin::CENTER );
778 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 780 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
779 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 781 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
780 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 782 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
781 backing.Add( text ); 783 backing.Add( text );
@@ -783,9 +785,9 @@ public: @@ -783,9 +785,9 @@ public:
783 } 785 }
784 { 786 {
785 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 ) );
786 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 788 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
787 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 789 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
788 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 790 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
789 text.SetParentOrigin( ParentOrigin::CENTER ); 791 text.SetParentOrigin( ParentOrigin::CENTER );
790 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 792 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
791 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 793 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -794,9 +796,9 @@ public: @@ -794,9 +796,9 @@ public:
794 } 796 }
795 { 797 {
796 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 ) );
797 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 799 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
798 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 800 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
799 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 801 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
800 text.SetParentOrigin( ParentOrigin::CENTER ); 802 text.SetParentOrigin( ParentOrigin::CENTER );
801 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 803 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
802 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 804 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -811,22 +813,22 @@ public: @@ -811,22 +813,22 @@ public:
811 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID ) 813 else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID )
812 { 814 {
813 mPopup = CreatePopup(); 815 mPopup = CreatePopup();
814 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 816 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
815 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 817 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
816 818
817 819
818 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 820 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
819 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 821 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
820 table.SetFixedHeight( 0, 50.0f ); 822 table.SetFixedHeight( 0, 50.0f );
821 table.SetFixedHeight( 2, 50.0f ); 823 table.SetFixedHeight( 2, 50.0f );
822 824
823 { 825 {
824 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 ) );
825 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 827 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
826 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 828 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
827 text.SetAnchorPoint( AnchorPoint::CENTER ); 829 text.SetAnchorPoint( AnchorPoint::CENTER );
828 text.SetParentOrigin( ParentOrigin::CENTER ); 830 text.SetParentOrigin( ParentOrigin::CENTER );
829 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 831 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
830 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 832 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
831 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 833 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
832 834
@@ -835,11 +837,11 @@ public: @@ -835,11 +837,11 @@ public:
835 } 837 }
836 { 838 {
837 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 ) );
838 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 840 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
839 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 841 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
840 text.SetAnchorPoint( AnchorPoint::CENTER ); 842 text.SetAnchorPoint( AnchorPoint::CENTER );
841 text.SetParentOrigin( ParentOrigin::CENTER ); 843 text.SetParentOrigin( ParentOrigin::CENTER );
842 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 844 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
843 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 845 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
844 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 846 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
845 847
@@ -848,11 +850,11 @@ public: @@ -848,11 +850,11 @@ public:
848 } 850 }
849 { 851 {
850 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 ) );
851 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 853 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
852 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 854 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
853 text.SetAnchorPoint( AnchorPoint::CENTER ); 855 text.SetAnchorPoint( AnchorPoint::CENTER );
854 text.SetParentOrigin( ParentOrigin::CENTER ); 856 text.SetParentOrigin( ParentOrigin::CENTER );
855 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 857 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
856 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 858 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
857 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 859 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
858 860
@@ -867,24 +869,24 @@ public: @@ -867,24 +869,24 @@ public:
867 else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID ) 869 else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID )
868 { 870 {
869 mPopup = CreatePopup(); 871 mPopup = CreatePopup();
870 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 872 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
871 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 873 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
872 874
873 875
874 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 876 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
875 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 877 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
876 table.SetFitHeight( 0 ); 878 table.SetFitHeight( 0 );
877 table.SetFitHeight( 2 ); 879 table.SetFitHeight( 2 );
878 880
879 { 881 {
880 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 ) );
881 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 883 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
882 backing.SetSize( 0.0f, 100.0f ); 884 backing.SetSize( 0.0f, 100.0f );
883 885
884 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 886 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
885 text.SetAnchorPoint( AnchorPoint::CENTER ); 887 text.SetAnchorPoint( AnchorPoint::CENTER );
886 text.SetParentOrigin( ParentOrigin::CENTER ); 888 text.SetParentOrigin( ParentOrigin::CENTER );
887 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 889 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
888 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 890 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
889 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 891 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
890 892
@@ -894,12 +896,12 @@ public: @@ -894,12 +896,12 @@ public:
894 } 896 }
895 { 897 {
896 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 ) );
897 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 899 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
898 900
899 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 901 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
900 text.SetAnchorPoint( AnchorPoint::CENTER ); 902 text.SetAnchorPoint( AnchorPoint::CENTER );
901 text.SetParentOrigin( ParentOrigin::CENTER ); 903 text.SetParentOrigin( ParentOrigin::CENTER );
902 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 904 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
903 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 905 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
904 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 906 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
905 907
@@ -909,13 +911,13 @@ public: @@ -909,13 +911,13 @@ public:
909 } 911 }
910 { 912 {
911 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 ) );
912 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 914 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
913 backing.SetSize( 0.0f, 100.0f ); 915 backing.SetSize( 0.0f, 100.0f );
914 916
915 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 917 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
916 text.SetAnchorPoint( AnchorPoint::CENTER ); 918 text.SetAnchorPoint( AnchorPoint::CENTER );
917 text.SetParentOrigin( ParentOrigin::CENTER ); 919 text.SetParentOrigin( ParentOrigin::CENTER );
918 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 920 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
919 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 921 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
920 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 922 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
921 923
@@ -931,21 +933,21 @@ public: @@ -931,21 +933,21 @@ public:
931 else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID ) 933 else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID )
932 { 934 {
933 mPopup = CreatePopup(); 935 mPopup = CreatePopup();
934 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS ); 936 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
935 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); 937 mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
936 938
937 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 939 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
938 - table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 940 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
939 table.SetFitHeight( 1 ); 941 table.SetFitHeight( 1 );
940 942
941 { 943 {
942 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 ) );
943 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 945 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
944 946
945 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 947 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
946 text.SetAnchorPoint( AnchorPoint::CENTER ); 948 text.SetAnchorPoint( AnchorPoint::CENTER );
947 text.SetParentOrigin( ParentOrigin::CENTER ); 949 text.SetParentOrigin( ParentOrigin::CENTER );
948 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 950 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
949 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 951 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
950 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 952 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
951 953
@@ -955,11 +957,11 @@ public: @@ -955,11 +957,11 @@ public:
955 } 957 }
956 { 958 {
957 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 ) );
958 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 960 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
959 backing.SetSize( 0.0f, 200.0f ); 961 backing.SetSize( 0.0f, 200.0f );
960 962
961 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 963 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
962 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 964 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
963 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 965 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
964 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 966 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
965 967
@@ -971,12 +973,12 @@ public: @@ -971,12 +973,12 @@ public:
971 } 973 }
972 { 974 {
973 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 ) );
974 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 976 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
975 977
976 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" ); 978 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
977 text.SetAnchorPoint( AnchorPoint::CENTER ); 979 text.SetAnchorPoint( AnchorPoint::CENTER );
978 text.SetParentOrigin( ParentOrigin::CENTER ); 980 text.SetParentOrigin( ParentOrigin::CENTER );
979 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 981 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
980 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 982 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
981 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 983 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
982 984
@@ -992,26 +994,26 @@ public: @@ -992,26 +994,26 @@ public:
992 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID ) 994 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID )
993 { 995 {
994 mPopup = CreatePopup(); 996 mPopup = CreatePopup();
995 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 997 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
996 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 998 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
997 - mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 999 + mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
998 1000
999 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 1001 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
1000 - table.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1001 - table.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 1002 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1003 + table.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
1002 table.SetFitHeight( 0 ); 1004 table.SetFitHeight( 0 );
1003 table.SetFitHeight( 1 ); 1005 table.SetFitHeight( 1 );
1004 table.SetFitHeight( 2 ); 1006 table.SetFitHeight( 2 );
1005 1007
1006 { 1008 {
1007 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 ) );
1008 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1010 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1009 backing.SetSize( 0.0f, 100.0f ); 1011 backing.SetSize( 0.0f, 100.0f );
1010 1012
1011 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1013 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1012 text.SetAnchorPoint( AnchorPoint::CENTER ); 1014 text.SetAnchorPoint( AnchorPoint::CENTER );
1013 text.SetParentOrigin( ParentOrigin::CENTER ); 1015 text.SetParentOrigin( ParentOrigin::CENTER );
1014 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1016 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1015 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1017 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1016 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1018 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1017 1019
@@ -1021,13 +1023,13 @@ public: @@ -1021,13 +1023,13 @@ public:
1021 } 1023 }
1022 { 1024 {
1023 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 ) );
1024 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1026 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1025 backing.SetSize( 0.0f, 200.0f ); 1027 backing.SetSize( 0.0f, 200.0f );
1026 1028
1027 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1029 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1028 text.SetAnchorPoint( AnchorPoint::CENTER ); 1030 text.SetAnchorPoint( AnchorPoint::CENTER );
1029 text.SetParentOrigin( ParentOrigin::CENTER ); 1031 text.SetParentOrigin( ParentOrigin::CENTER );
1030 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1032 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1031 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1033 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1032 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1034 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1033 1035
@@ -1037,13 +1039,13 @@ public: @@ -1037,13 +1039,13 @@ public:
1037 } 1039 }
1038 { 1040 {
1039 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 ) );
1040 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1042 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1041 backing.SetSize( 0.0f, 300.0f ); 1043 backing.SetSize( 0.0f, 300.0f );
1042 1044
1043 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1045 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1044 text.SetAnchorPoint( AnchorPoint::CENTER ); 1046 text.SetAnchorPoint( AnchorPoint::CENTER );
1045 text.SetParentOrigin( ParentOrigin::CENTER ); 1047 text.SetParentOrigin( ParentOrigin::CENTER );
1046 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1048 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1047 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1049 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1048 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1050 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1049 1051
@@ -1059,26 +1061,26 @@ public: @@ -1059,26 +1061,26 @@ public:
1059 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID ) 1061 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID )
1060 { 1062 {
1061 mPopup = CreatePopup(); 1063 mPopup = CreatePopup();
1062 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 1064 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
1063 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 1065 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
1064 - mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 1066 + mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
1065 1067
1066 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 1068 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
1067 - table.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1068 - table.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 1069 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1070 + table.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
1069 table.SetFitHeight( 0 ); 1071 table.SetFitHeight( 0 );
1070 table.SetFitHeight( 1 ); 1072 table.SetFitHeight( 1 );
1071 1073
1072 { 1074 {
1073 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 ) );
1074 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1075 - backing.SetResizePolicy( FIXED, HEIGHT ); 1076 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1077 + backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
1076 backing.SetSize( 0.0f, 100.0f ); 1078 backing.SetSize( 0.0f, 100.0f );
1077 1079
1078 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1080 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1079 text.SetAnchorPoint( AnchorPoint::CENTER ); 1081 text.SetAnchorPoint( AnchorPoint::CENTER );
1080 text.SetParentOrigin( ParentOrigin::CENTER ); 1082 text.SetParentOrigin( ParentOrigin::CENTER );
1081 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1083 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1082 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1084 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1083 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1085 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1084 1086
@@ -1088,13 +1090,13 @@ public: @@ -1088,13 +1090,13 @@ public:
1088 } 1090 }
1089 { 1091 {
1090 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 ) );
1091 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1093 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1092 backing.SetSize( 0.0f, 200.0f ); 1094 backing.SetSize( 0.0f, 200.0f );
1093 1095
1094 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1096 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1095 text.SetAnchorPoint( AnchorPoint::CENTER ); 1097 text.SetAnchorPoint( AnchorPoint::CENTER );
1096 text.SetParentOrigin( ParentOrigin::CENTER ); 1098 text.SetParentOrigin( ParentOrigin::CENTER );
1097 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1099 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1098 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1100 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1099 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1101 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1100 1102
@@ -1110,24 +1112,24 @@ public: @@ -1110,24 +1112,24 @@ public:
1110 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID ) 1112 else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID )
1111 { 1113 {
1112 mPopup = CreatePopup(); 1114 mPopup = CreatePopup();
1113 - mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH ); 1115 + mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
1114 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); 1116 mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
1115 - mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT ); 1117 + mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
1116 1118
1117 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); 1119 Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
1118 - table.SetResizePolicy( FILL_TO_PARENT, WIDTH );  
1119 - table.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT ); 1120 + table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
  1121 + table.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
1120 table.SetFixedHeight( 0, 20.0f ); 1122 table.SetFixedHeight( 0, 20.0f );
1121 table.SetFitHeight( 1 ); 1123 table.SetFitHeight( 1 );
1122 1124
1123 { 1125 {
1124 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 ) );
1125 - backing.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1127 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1126 1128
1127 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" ); 1129 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
1128 text.SetAnchorPoint( AnchorPoint::CENTER ); 1130 text.SetAnchorPoint( AnchorPoint::CENTER );
1129 text.SetParentOrigin( ParentOrigin::CENTER ); 1131 text.SetParentOrigin( ParentOrigin::CENTER );
1130 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1132 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1131 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1133 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1132 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1134 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1133 1135
@@ -1137,13 +1139,13 @@ public: @@ -1137,13 +1139,13 @@ public:
1137 } 1139 }
1138 { 1140 {
1139 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 ) );
1140 - backing.SetResizePolicy( FILL_TO_PARENT, WIDTH ); 1142 + backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
1141 backing.SetSize( 0.0f, 200.0f ); 1143 backing.SetSize( 0.0f, 200.0f );
1142 1144
1143 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); 1145 Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
1144 text.SetAnchorPoint( AnchorPoint::CENTER ); 1146 text.SetAnchorPoint( AnchorPoint::CENTER );
1145 text.SetParentOrigin( ParentOrigin::CENTER ); 1147 text.SetParentOrigin( ParentOrigin::CENTER );
1146 - text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); 1148 + text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1147 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 1149 text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
1148 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); 1150 text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
1149 1151
@@ -1251,7 +1253,7 @@ public: // From ItemFactory @@ -1251,7 +1253,7 @@ public: // From ItemFactory
1251 Toolkit::PushButton popupButton = Toolkit::PushButton::New(); 1253 Toolkit::PushButton popupButton = Toolkit::PushButton::New();
1252 popupButton.SetName( buttonDataArray[ itemId ].name ); 1254 popupButton.SetName( buttonDataArray[ itemId ].name );
1253 popupButton.SetLabel( buttonDataArray[ itemId ].text ); 1255 popupButton.SetLabel( buttonDataArray[ itemId ].text );
1254 - popupButton.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS ); 1256 + popupButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
1255 1257
1256 popupButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); 1258 popupButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
1257 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
@@ -106,7 +106,6 @@ public: @@ -106,7 +106,6 @@ public:
106 mContainer = Control::New(); 106 mContainer = Control::New();
107 mContainer.SetName( "Container" ); 107 mContainer.SetName( "Container" );
108 mContainer.SetParentOrigin( ParentOrigin::CENTER ); 108 mContainer.SetParentOrigin( ParentOrigin::CENTER );
109 - mContainer.SetResizePolicy( FIXED, ALL_DIMENSIONS );  
110 mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f); 109 mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f);
111 mContainer.SetSize( mLayoutSize ); 110 mContainer.SetSize( mLayoutSize );
112 mContainer.SetBackgroundImage( ResourceImage::New( BACKGROUND_IMAGE ) ); 111 mContainer.SetBackgroundImage( ResourceImage::New( BACKGROUND_IMAGE ) );
@@ -118,7 +117,6 @@ public: @@ -118,7 +117,6 @@ public:
118 mGrabCorner.SetName( "GrabCorner" ); 117 mGrabCorner.SetName( "GrabCorner" );
119 mGrabCorner.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); 118 mGrabCorner.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
120 mGrabCorner.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT ); 119 mGrabCorner.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT );
121 - mGrabCorner.SetResizePolicy( FIXED, ALL_DIMENSIONS );  
122 mGrabCorner.SetSize( Vector2(stageSize.width*0.1f, stageSize.width*0.1f) ); 120 mGrabCorner.SetSize( Vector2(stageSize.width*0.1f, stageSize.width*0.1f) );
123 mGrabCorner.SetZ(1.0f); 121 mGrabCorner.SetZ(1.0f);
124 mContainer.Add( mGrabCorner ); 122 mContainer.Add( mGrabCorner );
@@ -130,8 +128,8 @@ public: @@ -130,8 +128,8 @@ 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::DIMENSION_DEPENDENCY, 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 );
shared/dali-demo-strings.h
@@ -54,6 +54,8 @@ extern &quot;C&quot; @@ -54,6 +54,8 @@ extern &quot;C&quot;
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) 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")
57 59
58 #else // !INTERNATIONALIZATION_ENABLED 60 #else // !INTERNATIONALIZATION_ENABLED
59 61
@@ -79,6 +81,8 @@ extern &quot;C&quot; @@ -79,6 +81,8 @@ extern &quot;C&quot;
79 #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES "Animated Shapes" 81 #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES "Animated Shapes"
80 #define DALI_DEMO_STR_TITLE_PATH_ANIMATION "Animated Path" 82 #define DALI_DEMO_STR_TITLE_PATH_ANIMATION "Animated Path"
81 #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE "Negotiate Size" 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"
82 86
83 #endif 87 #endif
84 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;