/***************************************************************************
 *                          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 IHotkeysService
 *   Hotkeys service allows dynamic hotkeys be assigned to variouse tools.
 *   Service transparently inherits
 *   IZMEventHandler ::started
 *   ICommandEventHandler (with personal range of commands)
 *   IProfileable
 *   IConfigurable
 *--------------------------------------------------------------------------
 * @created: Tuesday, August 26, 2003 18:53:42
 */

#if !defined(IHotkeysService_h_included)
#define IHotkeysService_h_included
//forward declaration of this class might require
namespace services
{ class IHotkeysService; };
#include <zmodeler.h>
#include <core/coreTypes.h>
#include <services/zmServices.h>
#include <services/IService.h>
#include <core/events/ICommandEventHandler.h>
#include <core/tools/ITool.h>
#include <core/ui/IView.h>


namespace services
{
  
  class IHotkeysService : public services::IService
  {
  public:
    /* registers custom event */
    virtual ZRESULT registerEvent(ZString strTitle, core::events::ICommandEventHandler* pHandler, DWORD& dwID)=0;
    virtual ZRESULT registerTool(ZString strTitle, core::tools::ITool* pTool, long nToolID=-1)=0;
    virtual ZRESULT registerCommand(ZString strTitle, DWORD dwCommandID)=0;
    virtual ZRESULT getHotKey(ZString strTitle, DWORD& dwKey)=0;
    virtual ZRESULT getHotKeyString(ZString strTitle, ZString& strHotKey)=0;
    /* Provides accelerator table for hotkeys. The HACCEL is owned by the service
     * and if a caller deletes delete it, it have to set according pointer to NULL */
    virtual ZRESULT getAcceleratorsTable(HWND hWnd, HACCEL** ppAccel)=0;
    /* Multy-item hotkey which applies to activew view only. e.g. viewport menu items must set
     * atview view before registering tools. */
    virtual ZRESULT setActiveView(core::ui::IView* pView)=0;
  
  };//class IHotkeysService
};//services

#endif
