/***************************************************************************
 *                          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 IGraphManager
 *   Interface that manages graphical resources. It's implementation requires Gdiplus
 *--------------------------------------------------------------------------
 * @created: Thursday, October 10, 2002 23:06:52
 */

#if !defined(IGraphManager_h_included)
#define IGraphManager_h_included
//forward declaration of this class might require
namespace core
{ namespace ui
  { class IGraphManager; }; };
#include <zmodeler.h>
#include <core/ui/uiTypes.h>
#include <core/ui/IImage.h>
#include <core/ui/IBrush.h>
#include <core/ui/IPen.h>
#include <core/ui/IFont.h>


namespace core
{
  namespace ui
  {
    
    class IGraphManager : public ZUnknown
    {
    public:
      virtual ZRESULT initialize(void)=0;
      virtual ZRESULT terminate(void)=0;
      /* Provides an image for supplied resource. When dealing with user-defined
       * images, make sure to set resource handle before call. Also, pUserImgID is
       * an in-out argument. When passing it to the function, this is a resource ID
       * of your image, while on exit, it's an image ID in graphManager. */
      virtual ZRESULT getImage(eImageResource nKind, core::ui::IImage** ppImage, long* pUserImgID=NULL)=0;
      virtual ZRESULT setImage(eImageResource nKind, core::ui::IImage* pImage, long* pUserImgID=NULL)=0;
      virtual ZRESULT getBrush(eBrushResource nKind, core::ui::IBrush** ppBrush)=0;
      virtual ZRESULT setBrush(eBrushResource nKind, core::ui::IBrush* pBrush)=0;
      virtual ZRESULT getPen(ePenResource nKind, core::ui::IPen** ppPen)=0;
      virtual ZRESULT setPen(ePenResource nKind, core::ui::IPen* pPen)=0;
      virtual ZRESULT getFont(eFontResource nKind, core::ui::IFont** ppFont)=0;
      virtual ZRESULT setFont(eFontResource nKind, core::ui::IFont* pFont)=0;
      virtual ZRESULT getColor(eColorResource nKind, ZColor& col)=0;
      virtual ZRESULT setColor(eColorResource nKind, ZColor col)=0;
      virtual ZRESULT setCursor(core::ui::eCursorResource type, HCURSOR hCur)=0;
      virtual ZRESULT getCursor(core::ui::eCursorResource type, HCURSOR& hCur)=0;
    
    };//class IGraphManager
  };//ui
};//core

#endif
