#include <dali/public-api/object/type-registry-helper.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/alignment/alignment.h>
+#include <dali-toolkit/devel-api/controls/alignment/alignment.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
namespace Dali
{
DALI_TYPE_REGISTRATION_END()
const float DEFAULT_RELATIVE_SIZE( 0.1f );
-const Toolkit::Alignment::Type DEFAULT_ALIGNMENT( Toolkit::Alignment::HorizontalLeft );
+const Toolkit::Alignment::Type DEFAULT_ALIGNMENT( Toolkit::Alignment::HORIZONTAL_LEFT );
} // namespace
Toolkit::ToolBar ToolBar::New()
unsigned int index = 0;
switch( alignment )
{
- case Toolkit::Alignment::HorizontalLeft:
+ case Toolkit::Alignment::HORIZONTAL_LEFT:
{
index = mLeftOffset;
++mLeftOffset;
++mRightBase;
break;
}
- case Toolkit::Alignment::HorizontalCenter:
+ case Toolkit::Alignment::HORIZONTAL_CENTER:
{
index = mCenterBase + mCenterOffset;
++mCenterOffset;
++mRightBase;
break;
}
- case Toolkit::Alignment::HorizontalRight:
+ case Toolkit::Alignment::HORIZONTAL_RIGHT:
{
index = mRightBase - mRightOffset;
++mRightBase;
// Update spaces between left, center and right groups of controls.
switch( alignment )
{
- case Toolkit::Alignment::HorizontalLeft:
+ case Toolkit::Alignment::HORIZONTAL_LEFT:
{
mLeftRelativeSpace -= relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalCenter:
+ case Toolkit::Alignment::HORIZONTAL_CENTER:
{
mLeftRelativeSpace -= 0.5f * relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalRight:
+ case Toolkit::Alignment::HORIZONTAL_RIGHT:
{
mRightRelativeSpace -= relativeSize;
if ( mRightRelativeSpace < 0.f )
// Update spaces between left, center and right groups of controls.
if( 1.0 > mAccumulatedRelativeSpace )
{
- Toolkit::Alignment::Type alignment = Toolkit::Alignment::HorizontalLeft;
+ Toolkit::Alignment::Type alignment = Toolkit::Alignment::HORIZONTAL_LEFT;
if( position.columnIndex < mLeftOffset )
{
- alignment = Toolkit::Alignment::HorizontalLeft;
+ alignment = Toolkit::Alignment::HORIZONTAL_LEFT;
}
else if( ( position.columnIndex > mLeftOffset ) && ( position.columnIndex < mCenterBase + mCenterOffset ) )
{
- alignment = Toolkit::Alignment::HorizontalCenter;
+ alignment = Toolkit::Alignment::HORIZONTAL_CENTER;
}
else if( position.columnIndex > mCenterBase + mCenterOffset )
{
- alignment = Toolkit::Alignment::HorizontalRight;
+ alignment = Toolkit::Alignment::HORIZONTAL_RIGHT;
}
else
{
switch( alignment )
{
- case Toolkit::Alignment::HorizontalLeft:
+ case Toolkit::Alignment::HORIZONTAL_LEFT:
{
mLeftRelativeSpace += relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalCenter:
+ case Toolkit::Alignment::HORIZONTAL_CENTER:
{
mLeftRelativeSpace += 0.5f * relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalRight:
+ case Toolkit::Alignment::HORIZONTAL_RIGHT:
{
mRightRelativeSpace += relativeSize;
if ( mRightRelativeSpace < 0.f )
mInitializing( false ),
mControls()
{
+ DevelControl::SetAccessibilityConstructor( Self(), []( Dali::Actor actor ) {
+ return std::unique_ptr< Dali::Accessibility::Accessible >(
+ new Control::Impl::AccessibleImpl( actor, Dali::Accessibility::Role::TOOL_BAR, true ) );
+ } );
}
ToolBar::~ToolBar()