//---------------------------------------------------------------------------------------
// This file is part of the Lomse library.
// Copyright (c) 2010-present, Lomse Developers
//
// Licensed under the MIT license.
//
// See LICENSE and NOTICE.md files in the root directory of this source tree.
//---------------------------------------------------------------------------------------

#ifndef __LOMSE_VIEW_H__
#define __LOMSE_VIEW_H__

#include "lomse_basic.h"


///@cond INTERNALS
namespace lomse
{
///@endcond

//forward declarations
class Interactor;

/** Class %View is an abstract class from which all views must derive

    In the <i>Model/View/Controller</i> (MVC) model, maintaining the necessary
    relationships between the @IM and the @GM is a responsibility of the %View.

    %View main responsibility is to render the @GM on a device.

    Also, the %View:
    - Knows how to transform physical into logical coordinates, and vice-versa.
    - Does not generate events. All %View related events are generated by the Interactor.

*/
class View
{
protected:
    Interactor* m_pInteractor;

public:
    virtual ~View();

    virtual void new_viewport(Pixels UNUSED(x), Pixels UNUSED(y)) {}
    virtual void get_viewport(Pixels* UNUSED(x), Pixels* UNUSED(y)) {}


///@cond INTERNALS

    inline void set_interactor(Interactor* pIntor) { m_pInteractor = pIntor; }


protected:
    View();

};


}   //namespace lomse
///@endcond

#endif      //__LOMSE_VIEW_H__
