/***************************************************************************
 *                          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 IViewport
 *--------------------------------------------------------------------------
 * @created: Monday, March 31, 2003 18:24:22
 */

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


namespace core
{
  namespace ui
  {
    
    class IViewport : public ZUnknown
    {
    public:
      /* Provides viewport's kind. */
      virtual ZRESULT getKind(eViewport& kind)=0;
      /* Sets initial kind of viewport. Attempt to re-assign initial kind will fail.
       * To change viewport kind use IViewportService routines. */
      virtual ZRESULT setInitialKind(eViewport kind)=0;
      virtual ZRESULT getView(core::ui::IView** ppView)=0;
      virtual ZRESULT setView(core::ui::IView* pView)=0;
      virtual ZRESULT removeWrapper(core::ui::IViewportDrawWrapper* pWrapper)=0;
      /* Adds "draw sequence" wrapper for single redraw call. beforeDraw is called before
       * drawing sequence begins. afterDraw is called after drawing sequence completed.
       * if bSinglePass is true, wrapper is removed after draw sequence is complete. */
      virtual ZRESULT addWrapper(core::ui::IViewportDrawWrapper* pWrapper, bool bSinglePass=false)=0;
      /* redraws content of viewport */
      virtual ZRESULT redraw(void)=0;
      /* Shows content of viewport on supplied dc */
      virtual ZRESULT show(CDC* pDC)=0;
      virtual ZRESULT getViewportExtents(ZRect& rectViewport)=0;
      virtual ZRESULT setViewportExtents(ZRect& rectViewport)=0;
      /* Standard _add_ routine */
      virtual ZRESULT addViewportLayer(core::ui::IViewportLayer* pLayer)=0;
      /* Provides collection of layers in viewport */
      virtual ZRESULT getViewportLayers(CViewportLayerCol** ppLayers)=0;
      virtual ZRESULT setViewportLayers(CViewportLayerCol* pLayers)=0;
    
    };//class IViewport
  };//ui
};//core

#endif
