+ /**
+ * Invoked on create
+ */
+ void CreateRadioButtons()
+ {
+ Stage stage = Stage::GetCurrent();
+
+ Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 4, 1 );
+ modeSelectTableView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ modeSelectTableView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ modeSelectTableView.SetFitHeight( 0 );
+ modeSelectTableView.SetFitHeight( 1 );
+ modeSelectTableView.SetFitHeight( 2 );
+ modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+ modeSelectTableView.SetProperty( Actor::Property::SCALE, Vector3( 0.8f, 0.8f, 0.8f ));
+
+ const char* labels[] =
+ {
+ "LINES",
+ "LINE_LOOP",
+ "LINE_STRIP"
+ };
+
+ for( int i = 0; i < 3; ++i )
+ {
+ Dali::Toolkit::RadioButton radio = Dali::Toolkit::RadioButton::New();
+
+ radio.SetProperty( Toolkit::Button::Property::LABEL,
+ Property::Map()
+ .Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
+ .Add( Toolkit::TextVisual::Property::TEXT, labels[i] )
+ .Add( Toolkit::TextVisual::Property::TEXT_COLOR, Vector4( 0.8f, 0.8f, 0.8f, 1.0f ) )
+ );
+
+ radio.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ radio.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ radio.SetProperty( Toolkit::Button::Property::SELECTED, i == 0 );
+ radio.PressedSignal().Connect( this, &ExampleController::OnButtonPressed );
+ mButtons[i] = radio;
+ modeSelectTableView.AddChild( radio, Toolkit::TableView::CellPosition( i, 0 ) );
+ }
+
+ Toolkit::TableView elementCountTableView = Toolkit::TableView::New( 1, 3 );
+ elementCountTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+ elementCountTableView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
+ elementCountTableView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
+ elementCountTableView.SetFitHeight( 0 );
+ elementCountTableView.SetFitWidth( 0 );
+ elementCountTableView.SetFitWidth( 1 );
+ elementCountTableView.SetFitWidth( 2 );
+ mMinusButton = Toolkit::PushButton::New();
+ mMinusButton.SetProperty( Toolkit::Button::Property::LABEL, "<<" );
+ mMinusButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ mMinusButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
+
+ Toolkit::PushButton mPlusButton = Toolkit::PushButton::New();
+ mPlusButton.SetProperty( Toolkit::Button::Property::LABEL, ">>" );
+ mPlusButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ mPlusButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_RIGHT );
+
+ mMinusButton.ClickedSignal().Connect( this, &ExampleController::OnButtonClicked );
+ mPlusButton.ClickedSignal().Connect( this, &ExampleController::OnButtonClicked );
+
+ mIndicesCountLabel = Toolkit::TextLabel::New();
+ mIndicesCountLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mIndicesCountLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+ std::stringstream str;
+ str << mCurrentIndexCount;
+ mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() );
+ mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Vector4( 1.0, 1.0, 1.0, 1.0 ) );
+ mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "BOTTOM");
+ mIndicesCountLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH );
+ mIndicesCountLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
+
+ elementCountTableView.AddChild( mMinusButton, Toolkit::TableView::CellPosition( 0, 0 ) );
+ elementCountTableView.AddChild( mIndicesCountLabel, Toolkit::TableView::CellPosition( 0, 1 ) );
+ elementCountTableView.AddChild( mPlusButton, Toolkit::TableView::CellPosition( 0, 2 ) );
+
+ stage.Add(modeSelectTableView);
+ stage.Add(elementCountTableView);