/***************************************************************************
 *                          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 ICommandBarNavigator
 *--------------------------------------------------------------------------
 * @created: Monday, January 06, 2003 14:42:41
 */

#if !defined(ICommandBarNavigator_h_included)
#define ICommandBarNavigator_h_included
//forward declaration of this class might require
namespace core
{ namespace layout
  { class ICommandBarNavigator; }; };
#include <zmodeler.h>
#include <core/layout/layoutTypes.h>
#include <core/layout/ITreeNavigator.h>
#include <core/tools/ITool.h>


namespace core
{
  namespace layout
  {
    
    class ICommandBarNavigator : public core::layout::ITreeNavigator
    {
    public:
      virtual ZRESULT getButton(CBarButton** ppButton)=0;
      virtual ZRESULT createBranch(ZString strTitle, core::layout::ICommandBarNavigator** ppNavigator)=0;
      virtual ZRESULT navigateLocation(ZStringSeq& seqBranches, core::layout::ICommandBarNavigator** ppNavigator, long nStartFrom=0, bool bAllowCreate=true, bool bPushButtons=false)=0;
      virtual ZRESULT addTool(core::tools::ITool* pTool, long nIndex=-1, core::layout::ICommandBarNavigator** ppNav=NULL)=0;
      virtual ZRESULT removeTool(core::tools::ITool* pTool, long nIndex=-1)=0;
      virtual ZRESULT pickTool(core::tools::ITool* pTool, long nIndex=-1)=0;
      /* Tries to obtain tool's pointer using it's title. The tool can only be
       * found among one-level _sub_ items. Use navigateLocation to
       * obtain a navigator to custom deep location */
      virtual ZRESULT findTool(ZString strTitle, core::tools::ITool** ppTool, long* pIndex=NULL)=0;
    
    };//class ICommandBarNavigator
  };//layout
};//core

#endif
