image.Add( stencil );
}
- TextView text = TextView::New( title );
- text.SetAnchorPoint( AnchorPoint::CENTER );
- text.SetParentOrigin( ParentOrigin::CENTER );
- text.SetWidthExceedPolicy( Toolkit::TextView::ShrinkToFit );
- text.SetMultilinePolicy( Toolkit::TextView::SplitByWord );
- text.SetLineJustification( Toolkit::TextView::Center );
- text.SetTextAlignment( Toolkit::Alignment::Type( Alignment::HorizontalCenter | Alignment::VerticalCenter ) );
- text.SetColor( Color::WHITE );
- text.SetZ( 1 );
- // make the text 90% of tile
- text.SetSize( 0.9f * parentSize.width, 0.9f * parentSize.height );
- text.SetStyleToCurrentText( GetTableTextStyle() );
- text.SetSnapshotModeEnabled( false );
- tile.Add( text );
+ TextLabel label = TextLabel::New();
+ label.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ label.SetProperty( TextLabel::PROPERTY_MULTI_LINE, true );
+ label.SetProperty( TextLabel::PROPERTY_TEXT, title );
+ label.SetColor( Color::BLACK );
- content.Add( label );
++ tile.Add( label );
+
+ // FIXME - This is a kludge because size negotiation is not finished
+ label.SetSize( parentSize );
// Set the tile to be keyboard focusable
tile.SetKeyboardFocusable(true);
Toolkit::TableView tableView = Toolkit::TableView::New( 1, 2 );
tableView.SetSize( DP(260), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
- ImageActor imageActor = ImageActor::New( Image::New( ENABLED_IMAGE ) );
- Toolkit::TextView textView = Toolkit::TextView::New( "Select enabled" );
- Toolkit::Alignment alignment = Toolkit::Alignment::New( Toolkit::Alignment::HorizontalLeft );
- alignment.Add( textView );
- tableView.AddChild( alignment, Toolkit::TableView::CellPosition( 0, 0 ) );
-
+ ImageActor imageActor = ImageActor::New( ResourceImage::New( ENABLED_IMAGE ) );
imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
tableView.AddChild( imageActor, Toolkit::TableView::CellPosition( 0, 1 ) );
tableView.SetFixedWidth( 1, DP(RADIO_LABEL_THUMBNAIL_SIZE) );
checkBoxBackground.Add( checkBox );
}
- // Create toggle button
- mCheckBox3State = Toolkit::TextView::New( "CheckBox3 is unselected" );
-
- mCheckBox3State.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mCheckBox3State.SetPosition( DP(80), DP(checkYPos) );
-
- checkBoxBackground.Add( mCheckBox3State );
-
- // Create togglabe button
yPos += GROUP3_HEIGHT + MARGIN_SIZE;
Actor toggleBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );
return true;
}
- bool OnCheckBoxesToggled( Toolkit::Button button, bool state )
+ bool OnCheckBoxesSelected( Toolkit::Button button )
{
- if( button.GetName() == "checkbox1" )
- {
- if( button.IsSelected() )
- {
- mCheckBox1State.SetText("CheckBox1 is selected");
- }
- else
- {
- mCheckBox1State.SetText("CheckBox1 is unselected");
- }
- }
-
- if( button.GetName() == "checkbox2" )
- {
- if( button.IsSelected() )
- {
- mCheckBox2State.SetText("CheckBox2 is selected");
- }
- else
- {
- mCheckBox2State.SetText("CheckBox2 is unselected");
- }
- }
-
- if( button.GetName() == "checkbox3" )
- {
- if( button.IsSelected() )
- {
- mCheckBox3State.SetText("CheckBox3 is selected");
- }
- else
- {
- mCheckBox3State.SetText("CheckBox3 is unselected");
- }
- }
-
return true;
}
void WriteConsole()
{
- for( unsigned int i = 0; i < NUM_LOGGERS; ++i)
- {
- std::stringstream ss;
- ss << (i + 1) << ") " << ((mPerformanceLoggers[i]) ? "Created" : "Deleted")
- << ", " << ((mLoggerStates[i].isTiming) ? "Started" : "Stopped")
- << ", " << ((mLoggerStates[i].isEnabled) ? "Enabled" : "Disabled");
-
- Dali::TextStyle textStyle;
- textStyle.SetFontName( "HelveticaNue" );
- textStyle.SetFontStyle( "Regular" );
- textStyle.SetFontPointSize( Dali::PointSize( DemoHelper::ScalePointSize( 7.0f ) ) );
- textStyle.SetWeight( Dali::TextStyle::REGULAR );
-
- Toolkit::TextView textView = Toolkit::TextView::New( ss.str() );
- textView.SetStyleToCurrentText( textStyle );
-
- mLogRadioButtons[i].SetLabel( textView );
- }
+ // TODO
}
- bool LoggingRadioSelect( Toolkit::Button button, bool state )
+ bool LoggingRadioSelect( Toolkit::Button button )
{
- if( button.GetName() == LOGGER_1_RADIO_ID && state == true )
+ if( button.GetName() == LOGGER_1_RADIO_ID && button.IsSelected() == true )
{
mCurrentLogger = 0;
}
Toolkit::View mView;
Toolkit::ToolBar mToolBar;
Layer mContent;
- Toolkit::TextView mTitleActor;
+ Actor mParent;
ImageActor mCurrentImage;
ImageActor mNextImage;
mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
// Add title to the tool bar.
- mTitleActor = Toolkit::TextView::New();
- mTitleActor.SetText( APPLICATION_TITLE_HIGHP );
- mTitleActor.SetStyleToCurrentText(DemoHelper::GetDefaultTextStyle());
- mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter );
+ // TODO
// Add an slide-show button on the right of the title
- mIconPlay = Image::New( PLAY_ICON );
- mIconStop = Image::New( STOP_ICON );
+ mIconPlay = ResourceImage::New( PLAY_ICON );
+ mIconStop = ResourceImage::New( STOP_ICON );
mPlayStopButton = Toolkit::PushButton::New();
mPlayStopButton.SetBackgroundImage( mIconPlay );
mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked );
toolBar.AddControl( effectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
// Add title to the tool bar.
- mTitleActor = Toolkit::TextView::New();
- toolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter );
-
- // Set Title text
- mTitleActor.SetText( APPLICATION_TITLE_PAN_SCENE );
- mTitleActor.SetSize( Font::New().MeasureText( APPLICATION_TITLE_PAN_SCENE ) );
- mTitleActor.SetStyleToCurrentText( DemoHelper::GetDefaultTextStyle() );
+ // TODO
//Add a reset button
- Image resetImage = Image::New( RESET_ICON );
+ Image resetImage = ResourceImage::New( RESET_ICON );
Toolkit::PushButton resetButton = Toolkit::PushButton::New();
resetButton.SetBackgroundImage( resetImage );
resetButton.ClickedSignal().Connect( this, &TestApp::OnResetPressed );
float mPinchScale;
float mScaleAtPinchStart;
- Toolkit::TextView mTitleActor;
-
+ Property::Index mAngle1Index;
+ Property::Index mAngle3Index;
+
enum PanState
{
PAN_SCENE,
mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked );
mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
- // Add title to the tool bar.
- mTitleActor = Toolkit::TextView::New();
- mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter );
-
//Add an slideshow icon on the right of the title
- mIconSlideshowStart = Image::New( SLIDE_SHOW_START_ICON );
- mIconSlideshowStop = Image::New( SLIDE_SHOW_STOP_ICON );
+ mIconSlideshowStart = ResourceImage::New( SLIDE_SHOW_START_ICON );
+ mIconSlideshowStop = ResourceImage::New( SLIDE_SHOW_STOP_ICON );
mSlideshowButton = Toolkit::PushButton::New();
mSlideshowButton.SetBackgroundImage( mIconSlideshowStart );
mSlideshowButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnSildeshowButtonClicked );