/***************************************************************************
 *                          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 IUIControl
 *--------------------------------------------------------------------------
 * @created: Thursday, May 06, 2004 12:57:53
 */

#if !defined(IUIControl_h_included)
#define IUIControl_h_included
//forward declaration of this class might require
namespace core
{ namespace ui
  { namespace controls
    { class IUIControl; }; }; };
#include <zmodeler.h>
#include <core/ui/controls/uiControls.h>

namespace core
{
  namespace ui
  {
    namespace controls
    {
      
      class IUIControl : public ZUnknown
      {
      public:
        virtual ZRESULT embed(CWnd* pContainer)=0;
        virtual ZRESULT embedInRect(CWnd* pParent, ZRect rect)=0;
        /* Detaches from the nest and destroys itselves (if no references are held) */
        virtual ZRESULT detach(void)=0;
        /* Provides an underlying CWnd object of control. Non-CWnd
         * ui controls return ZRESULT_FALSE */
        virtual ZRESULT getControlWnd(CWnd** ppWnd)=0;
        virtual ZRESULT clear(void)=0;
        /* Midifies the style. Can be used to obtain current style (0, 0, !NULL) and/or
         * for repaint purpose (0, 0, NULL); */
        virtual ZRESULT modifyStyle(long dwAdd, long dwRemove, long* pdwCurrent=NULL)=0;
      
      };//class IUIControl
    };//controls
  };//ui
};//core

#endif
