#include "shared/view.h"
#include <dali/dali.h>
#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
const unsigned int NUMBER_OF_RESOURCES = sizeof(IMAGE_PATH) / sizeof(char*);
std::string EXAMPLE_INSTRUCTIONS = "Instructions: Change button cycles through different image visuals, "
- "on/off takes the ImageView and it's current visual on or off stage.";
+ "on/off takes the ImageView and it's current visual on or off window.";
const float CORNER_RADIUS_VALUE( 20.0f );
// The Init signal is received once (only) during the Application lifetime
// Creates a default view with a default tool bar.
- // The view is added to the stage.
+ // The view is added to the window.
mContentLayer = DemoHelper::CreateView( application,
mView,
mToolBar,
Toolkit::TextLabel instructions = Toolkit::TextLabel::New( EXAMPLE_INSTRUCTIONS );
instructions.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
instructions.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_CENTER);
- instructions.SetY(-50.0f);
+ instructions.SetProperty( Actor::Property::POSITION_Y, -50.0f);
instructions.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, true );
instructions.SetProperty( Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 10 );
mContentLayer.Add(instructions);
button.SetProperty( Toolkit::Button::Property::LABEL, "on/off" );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- button.ClickedSignal().Connect( this, &ImageViewController::ToggleImageOnStage );
+ button.ClickedSignal().Connect( this, &ImageViewController::ToggleImageOnWindow );
button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
std::string s = std::to_string(x);
mImageViewRoundedCornerStatus[x] = false;
}
- Stage::GetCurrent().KeyEventSignal().Connect(this, &ImageViewController::OnKeyEvent);
+ application.GetWindow().KeyEventSignal().Connect(this, &ImageViewController::OnKeyEvent);
}
private:
visual.Reset();
}
- bool ToggleImageOnStage( Toolkit::Button button )
+ bool ToggleImageOnWindow( Toolkit::Button button )
{
unsigned int buttonIndex = GetButtonIndex( button );
{
unsigned int buttonIndex = GetButtonIndex( button );
- if( mImageViews[buttonIndex].OnStage() )
+ if( mImageViews[buttonIndex].GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
++mImageViewImageIndexStatus[buttonIndex];
{
unsigned int buttonIndex = GetButtonIndex( button );
- if( mImageViews[buttonIndex].OnStage() )
+ if( mImageViews[buttonIndex].GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
mImageViewRoundedCornerStatus[ buttonIndex ] = !mImageViewRoundedCornerStatus[ buttonIndex ];