/*============================================================================== 
 * Copyright (c) 2012-2014 Qualcomm Connected Experiences, Inc. All Rights Reserved. 
 * ==============================================================================*/

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

/// <summary>
/// All handler classes that wants to register for the events generated by ISampleAppUIView must extend this class
/// It ensures proper binding and unbinding of event listeners and other initialization and cleanup
/// </summary>
public abstract class ISampleAppUIEventHandler : MonoBehaviour {
    
    /// <summary>
    /// Everytime user taps on a ISampleAppUIElement, handler class dispatches this event, so that other classes like AppManager 
    /// can subsribe to this event and handle.
    /// </summary>
    public abstract event System.Action CloseView;
    
    /// <summary>
    /// Dispaches an event for AppManager to handle the navigation between ISampleAppUIView and AboutView
    /// </summary>
    public abstract event System.Action GoToAboutPage;
    
    /// <summary>
    /// Register all event listeners to the events dispatched by ISampleAppUIView here.
    /// Also, do all your class initializations here
    /// </summary>
    public abstract void Bind();
    
    /// <summary>
    /// Unregister all event listeners here.
    /// Also, do all your cleanups here
    /// </summary>
    public abstract void UnBind();
    
    /// <summary>
    /// All UIElements get drawn here
    /// </param>
    public abstract void UpdateView(bool tf);
    
    /// <summary>
    /// The following methods are exposed here for AppManager
    /// </summary>
    public abstract void TriggerAutoFocus();
    public abstract void SetToDefault(bool tf);
}

