/***************************************************************************
 *                          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 IWorkspace
 *   Workspace interface: it managers all windows opened for current document
 *--------------------------------------------------------------------------
 * @created: Friday, October 25, 2002 15:59:23
 */

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


namespace core
{
  namespace ui
  {
    
    class IWorkspace : public ZUnknown
    {
    public:
      /* Performs intialization of workspace */
      virtual ZRESULT initialize(CWnd* pMainWnd)=0;
      /* Adds a view to workspace. Attaches IView to according splitwnd pane
       * (if strID is recognized) and, finally, raises EVENT_VIEW_CREATED */
      virtual ZRESULT addView(core::ui::IView* pView, ZString strID)=0;
      /* Raises EVENT_VIEW_CLOSED and removes view from workspace. */
      virtual ZRESULT deleteView(core::ui::IView* pView)=0;
      /* Provides collection of windows. nWhich specifies which windows should be provided */
      virtual ZRESULT getViews(CViewCol** ppCol, DWORD nHasState=0, DWORD nHasntState=0)=0;
      virtual ZRESULT redrawViews(bool bShowImmediately=true)=0;
      virtual ZRESULT showViews(void)=0;
      virtual ZRESULT recalcLayout(void)=0;
      virtual ZRESULT getViewLayoutID(core::ui::IView* pView, ZString& strID)=0;
      virtual ZRESULT getViewByLayoutID(ZString strID, core::ui::IView** ppView)=0;
      /* Provides split mode for supplied View-Pane ID */
      virtual ZRESULT getLayoutByID(LPCTSTR pszID, core::ui::eWorkspaceSplit& split)=0;
      virtual ZRESULT setLayoutForID(LPCTSTR pszID, core::ui::eWorkspaceSplit split, tCWndSeq& seqPanes)=0;
      virtual ZRESULT maximizeView(core::ui::IView* pView)=0;
      virtual ZRESULT isMaximizeMode(void)=0;
      virtual ZRESULT restoreFromMaximization(void)=0;
      virtual ZRESULT setForcedCursor(DWORD nFlags, HCURSOR hCur)=0;
    
    };//class IWorkspace
  };//ui
};//core

#endif
