// Indicator orientation
const char* ELM_INDICATOR_PORTRAIT("elm_indicator_portrait");
const char* ELM_INDICATOR_LANDSCAPE("elm_indicator_landscape");
+const char* ELM_INDICATOR_PORTRAIT_FIXED_COLOR_STYLE("elm_indicator_portrait_fixed");
+const char* ELM_INDICATOR_LANDSCAPE_FIXED_COLOR_STYLE("elm_indicator_landscape_fixed");
const char* MESH_VERTEX_SHADER =
"attribute lowp vec3 aColor;\n"
return mLocked;
}
-Indicator::Indicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, Observer* observer )
+Indicator::Indicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, Dali::Window::IndicatorStyle style, Observer* observer )
: mPixmap( 0 ),
mConnection( this ),
+ mStyle( style ),
mOpacityMode( Dali::Window::OPAQUE ),
mState( DISCONNECTED ),
mAdaptor(adaptor),
switch( orientation )
{
case Dali::Window::PORTRAIT:
- connected = Connect( ELM_INDICATOR_PORTRAIT );
+ if(mStyle == Dali::Window::FIXED_COLOR)
+ {
+ connected = Connect( ELM_INDICATOR_PORTRAIT_FIXED_COLOR_STYLE );
+ }
+ else
+ {
+ connected = Connect( ELM_INDICATOR_PORTRAIT );
+ }
break;
case Dali::Window::PORTRAIT_INVERSE:
- connected = Connect( ELM_INDICATOR_PORTRAIT );
+ if(mStyle == Dali::Window::FIXED_COLOR)
+ {
+ connected = Connect( ELM_INDICATOR_PORTRAIT_FIXED_COLOR_STYLE );
+ }
+ else
+ {
+ connected = Connect( ELM_INDICATOR_PORTRAIT );
+ }
break;
case Dali::Window::LANDSCAPE:
- connected = Connect( ELM_INDICATOR_LANDSCAPE );
+ if(mStyle == Dali::Window::FIXED_COLOR)
+ {
+ connected = Connect( ELM_INDICATOR_LANDSCAPE_FIXED_COLOR_STYLE );
+ }
+ else
+ {
+ connected = Connect( ELM_INDICATOR_LANDSCAPE );
+ }
break;
case Dali::Window::LANDSCAPE_INVERSE:
- connected = Connect( ELM_INDICATOR_LANDSCAPE );
+ if(mStyle == Dali::Window::FIXED_COLOR)
+ {
+ connected = Connect( ELM_INDICATOR_LANDSCAPE_FIXED_COLOR_STYLE );
+ }
+ else
+ {
+ connected = Connect( ELM_INDICATOR_LANDSCAPE );
+ }
break;
}
*/
Indicator( Adaptor* adaptor,
Dali::Window::WindowOrientation orientation,
+ Dali::Window::IndicatorStyle style,
Observer* observer );
/**
Dali::Timer mReconnectTimer; ///< Reconnection timer
SlotDelegate< Indicator > mConnection;
+ Dali::Window::IndicatorStyle mStyle; ///< Style of the indicator
Dali::Window::IndicatorBgOpacity mOpacityMode; ///< Opacity enum for background
Indicator::State mState; ///< The connection state
return mSurface;
}
+void Window::SetIndicatorStyle( Dali::Window::IndicatorStyle style )
+{
+ mIndicatorStyle = style;
+}
+
void Window::ShowIndicator( bool show )
{
DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "%s\n", show?"SHOW":"HIDE" );
Window::Window()
: mSurface(NULL),
+ mIndicatorStyle(Dali::Window::CHANGEABLE_COLOR),
mIndicatorVisible(Dali::Window::VISIBLE),
mIndicatorIsShown(false),
mShowRotatedIndicatorOnClose(false),
{
if( mIndicatorVisible != Dali::Window::INVISIBLE )
{
- mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, this );
+ mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, mIndicatorStyle, this );
mIndicator->SetOpacityMode( mIndicatorOpacityMode );
Dali::Actor actor = mIndicator->GetActor();
SetIndicatorActorRotation();
*/
RenderSurface* GetSurface();
+ /**
+ * @copydoc Dali::Window::SetIndicatorStyle()
+ */
+ void SetIndicatorStyle( Dali::Window::IndicatorStyle style );
+
/**
* @copydoc Dali::Window::ShowIndicator()
*/
typedef std::vector<Indicator*> DiscardedIndicators;
RenderSurface* mSurface;
+ Dali::Window::IndicatorStyle mIndicatorStyle; ///< indicator style
Dali::Window::IndicatorVisibleMode mIndicatorVisible; ///< public state
bool mIndicatorIsShown:1; ///< private state
bool mShowRotatedIndicatorOnClose:1;
{
}
+void Window::SetIndicatorStyle( IndicatorStyle style )
+{
+ GetImplementation(*this).SetIndicatorStyle( style );
+}
+
void Window::ShowIndicator( bool show )
{
GetImplementation(*this).ShowIndicator( show );
AUTO = 2 // hide in default, will show when necessary
};
+ /**
+ * @brief Style of the indicator.
+ */
+ enum IndicatorStyle
+ {
+ FIXED_COLOR = 0, // fixed color style
+ CHANGEABLE_COLOR // changeable color style
+ };
// Methods
*/
using BaseHandle::operator=;
+ /**
+ * @brief This sets the style of indicator
+ * @param[in] style style type of the indicator
+ *
+ * @note This should be called before ShowIndicator()
+ */
+ void SetIndicatorStyle( IndicatorStyle style );
+
/**
* @brief This sets whether the indicator bar should be shown or not.
* @param[in] show - true if the indicator bar should be shown