/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                Copyright (c) 2002-2008 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:  Declaration of the class IViewportLayer
 *   Viewport layer is an extention to viewport that renders or serves a "layer".
 *   The layers are usually a visual planes (background, grid, etc.). Each layer
 *   can request viewport for it's extents, renderer and current render target.
 *   IViewportLayer transparently inherits:
 *   - core::IStatus
 *   - core::INamed
 *--------------------------------------------------------------------------
 * @created: Wednesday, April 02, 2003 15:47:06
 */

#if !defined(IViewportLayer_h_included)
#define IViewportLayer_h_included
//forward declaration of this class might require
namespace core
{ namespace ui
  { class IViewportLayer; class CViewportLayerCol; }; };
#include <zmodeler.h>
#include <core/ui/uiTypes.h>
#include <core/IStatus.h>
#include <core/ui/IViewport.h>


namespace core
{
  namespace ui
  {
    
    class IViewportLayer : public core::IStatus
    {
    public:
      /* Provides layer's priority */
      virtual ZRESULT getPriority(core::ePriority& prior)=0;
      /* Sets layer's priority. Layer does not updates it's priority in viewport's collection. */
      virtual ZRESULT setPriority(core::ePriority prior)=0;
      /* Provides collection of sub-layers */
      virtual ZRESULT getSubLayers(CViewportLayerCol** ppCol)=0;
      virtual ZRESULT setSubLayers(CViewportLayerCol* pCol)=0;
      /* Called when viewport has closed. */
      virtual ZRESULT onCloseViewport(core::ui::IViewport* pVPort)=0;
    
    };//class IViewportLayer
    
    //
    // collection template
    //
    class CViewportLayerCol : public ZUnknown,
        public ZIntrCollection<IViewportLayer>
    {
    public:
      INTERFACE_FUNCTIONS_DEFAULT(CViewportLayerCol)
    };//class CViewportLayerCol
  };//ui
};//core

#endif
