/***************************************************************************
 *                          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 IVisualControl
 *   Visual control
 *--------------------------------------------------------------------------
 * @created: Saturday, January 18, 2003 16:53:00
 */

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


namespace core
{
  namespace ui
  {
    
    class IVisualControl : public ZUnknown
    {
    public:
      virtual ZRESULT redrawControl(CDC* pDC)=0;
      virtual ZRESULT showControl(CDC* pDC, core::ui::IView* pOwner)=0;
      /* Provides minimal rectange */
      virtual ZRESULT getMinimalRect(ZRect& rect)=0;
      /* Sets new layout rectangle for control */
      virtual ZRESULT setLayoutRect(ZRect& rect)=0;
      /* Provides current layout rectangle */
      virtual ZRESULT getLayoutRect(ZRect& rect)=0;
      /* Tells whether control allows stretching. returns ZRESULT_OK as true and ZRESULT_FALSE as false. */
      virtual ZRESULT canStretchControl(void)=0;
      virtual ZRESULT getControlPriority(core::ePriority& prior)=0;
    
    };//class IVisualControl
    
    //
    // collection template
    //
    class CVisualControlCol : public ZUnknown,
        public ZIntrCollection<IVisualControl>
    {
    public:
      INTERFACE_FUNCTIONS_DEFAULT(CVisualControlCol)
    };//class CVisualControlCol
  };//ui
};//core

#endif
