/***************************************************************************
 *                          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 IToolBar
 *--------------------------------------------------------------------------
 * @created: Saturday, September 21, 2002 10:52:21
 */

#if !defined(IToolBar_h_included)
#define IToolBar_h_included
//forward declaration of this class might require
namespace core
{ namespace ui
  { class IToolBar; }; };
#include <zmodeler.h>
#include <core/ui/uiTypes.h>
#include <core/ui/IControlBar.h>
#include <core/tools/ITool.h>
#include <core/events/ICommandEventHandler.h>


namespace core
{
  namespace ui
  {
    
    class IToolBar : public core::ui::IControlBar
    {
    public:
      /* Performs CToolBar::CreateEx call. */
      virtual ZRESULT create(CWnd* pParent, DWORD dwTBStyle=TBSTYLE_FLAT, DWORD dwStyle=WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP)=0;
      virtual ZRESULT loadToolBar(DWORD dwResourceID)=0;
      /* Adds tool into toolbar. Button is added and displayed in
       * toolbar according to Layout information. */
      virtual ZRESULT addTool(core::tools::ITool* pTool, DWORD& dwID, long nIndex=-1)=0;
      virtual ZRESULT addGenericItem(DWORD nID, DWORD nStyle, core::events::ICommandEventHandler* pCommandHandler=NULL, bool bHoldHandlerRef=true, CImageList* pList=NULL, long nImage=0, LPCTSTR pszVariation=NULL)=0;
      virtual ZRESULT createCustomControl(CRuntimeClass* pClass, ZRect rect, bool bAutoDelete=true, core::events::ICommandEventHandler* pHandler=NULL, bool bHoldHandler=true, CWnd** ppWnd=NULL)=0;
      virtual ZRESULT addCustomControl(CWnd* pWnd, DWORD dwStyle, ZRect rect, bool bAutoDelete=false)=0;
      /* Allows to modify appearence of tool in toolbar: enable/disable,
       * show/hide, add/remove extension */
      virtual ZRESULT modifyTool(DWORD dwID, DWORD dwFlags)=0;
    
    };//class IToolBar
  };//ui
};//core

#endif
