if( !mIsShowing )
{
mIndicatorActor.SetVisible( false );
+
+ if( mObserver != NULL )
+ {
+ mObserver->IndicatorVisibilityChanged( mIsShowing ); // is showing?
+ }
}
}
* @param[in] indicator The indicator that has finished uploading.
*/
virtual void IndicatorClosed(Indicator* indicator) = 0;
+
+ /**
+ * Notify the observer when the indicator visible status is changed.
+ * @param[in] isShowing Whether the indicator is visible.
+ */
+ virtual void IndicatorVisibilityChanged( bool isVisible ) = 0;
};
protected:
class Window : public Dali::BaseObject, public Indicator::Observer, public LifeCycleObserver
{
public:
+ typedef Dali::Window::IndicatorSignalV2 IndicatorSignalV2;
+
/**
* Create a new Window. This should only be called once by the Application class
* @param[in] windowPosition The position and size of the window
*/
virtual void IndicatorClosed(Indicator* indicator);
+ /**
+ * @copydoc Dali::Internal::Adaptor::Indicator::Observer::IndicatorVisibilityChanged()
+ */
+ virtual void IndicatorVisibilityChanged( bool isVisible );
+
private: // Adaptor::Observer interface
/**
*/
virtual void OnDestroy();
+public: // Signals
+ /**
+ * The user should connect to this signal to get a timing when indicator was shown / hidden.
+ */
+ IndicatorSignalV2& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignalV2; }
+
private:
typedef std::vector<Indicator*> DiscardedIndicators;
OrientationPtr mOrientation;
std::vector<Dali::Window::WindowOrientation> mAvailableOrientations;
Dali::Window::WindowOrientation mPreferredOrientation;
+
+ // Signals
+ IndicatorSignalV2 mIndicatorVisibilityChangedSignalV2;
};
} // namespace Adaptor
GetImplementation(*this).ShowIndicator( visibleMode );
}
+Window::IndicatorSignalV2& Window::IndicatorVisibilityChangedSignal()
+{
+ return GetImplementation(*this).IndicatorVisibilityChangedSignal();
+}
+
void Window::SetIndicatorBgOpacity( IndicatorBgOpacity opacity )
{
GetImplementation(*this).SetIndicatorBgOpacity( opacity );
#include <dali/public-api/math/vector2.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/object/any.h>
+#include <dali/public-api/signals/dali-signal-v2.h>
namespace Dali
{
*/
class DALI_IMPORT_API Window : public BaseHandle
{
+public:
+ typedef SignalV2< void (bool) > IndicatorSignalV2;
+
public:
// Enumerations
Any GetNativeHandle() const;
+public: // Signals
+ /**
+ * The user should connect to this signal to get a timing when indicator was shown / hidden.
+ */
+ IndicatorSignalV2& IndicatorVisibilityChangedSignal();
+
public: // Not intended for application developers
/**
* @brief This constructor is used by Dali::Application::GetWindow().
}
}
+void Window::IndicatorVisibilityChanged(bool isVisible)
+{
+ mIndicatorVisibilityChangedSignalV2.Emit(isVisible);
+}
+
void Window::SetIndicatorActorRotation()
{
DALI_LOG_TRACE_METHOD( gWindowLogFilter );
}
}
+void Window::IndicatorVisibilityChanged(bool isVisible)
+{
+ mIndicatorVisibilityChangedSignalV2.Emit(isVisible);
+}
+
void Window::SetIndicatorActorRotation()
{
DALI_LOG_TRACE_METHOD( gWindowLogFilter );