#include <fstream>
#include <streambuf>
#include <sstream>
-#include <boost/scoped_ptr.hpp>
#include <dirent.h>
#include <stdio.h>
#include <iostream>
-//#include <boost/regex.hpp>
#include "sys/stat.h"
#include <ctime>
#include <dali/integration-api/debug.h>
-#include "../shared/view.h"
+#include "shared/view.h"
#define TOKEN_STRING(x) #x
'stage': \
[ \
{ \
- 'type':'TextView', \
+ 'type':'TextLabel', \
'size': [50,50,1], \
'parent-origin': 'CENTER', \
'text':'COULD NOT LOAD JSON FILE' \
void SetTitle(const std::string& title)
{
- // TODO
+ if(!mTitleActor)
+ {
+ mTitleActor = DemoHelper::CreateToolBarLabel( "" );
+ // Add title to the tool bar.
+ mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
+ }
+
+ mTitleActor.SetProperty( TextLabel::Property::TEXT, title );
}
bool OnToolSelectLayout( Toolkit::Button button )
void EnterSelection()
{
Stage stage = Stage::GetCurrent();
+ stage.SetBackgroundColor( Color::WHITE );
mTapDetector = TapGestureDetector::New();
mTapDetector.DetectedSignal().Connect( this, &ExampleApp::OnTap );
Actor MenuItem(const std::string& text)
{
- return Actor();
+ TextLabel label = TextLabel::New( ShortName( text ) );
+ label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "builderlabel" );
+ label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
+
+ // Hook up tap detector
+ mTapDetector.Attach( label );
+
+ return label;
}
bool OnTimer()
}
builder.AddActors( layer );
-
}
void Create(Application& app)
{
+ DemoHelper::RequestThemeChange();
+
Stage stage = Stage::GetCurrent();
Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleApp::OnKeyEvent);
GridLayoutPtr mGridLayout;
ItemView mItemView;
- Toolkit::View mView;
+ Toolkit::Control mView;
unsigned int mOrientation;
Toolkit::ToolBar mToolBar;
+ TextLabel mTitleActor; ///< The Toolbar's Title.
Layer mBuilderLayer;