/***************************************************************************
 *                          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 Zanoza Software.                   *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:
   *--------------------------------------------------------------------------
 * @created: Sunday, October 13, 2002 23:24:27
 */

#if !defined(toolTypes_h_included)
#define toolTypes_h_included

#include <zmodeler.h>

namespace core
{
  namespace tools
  {
//
// Tool's requirements. Each tool might require variouse user input.
//
#define TOOL_REQUIRES_MOUSEL          0x00000001
#define TOOL_REQUIRES_MOUSER          0x00000002
#define TOOL_REQUIRES_MOUSEM          0x00000004
#define TOOL_REQUIRES_MOUSEW          0x00000008
#define TOOL_ALTERNATIVE_BIT          0x10000000
#define TOOL_REQUIRES_LEV_NODE        0x20000000
#define TOOL_REQUIRES_LEV_MANIPULATOR 0x40000000

#define TOOL_ALTERNATIVE(_code)       ((_code) | TOOL_ALTERNATIVE_BIT)
#define TOOL_CODEMASK(_code)          ((_code) & 0xFFFFFF)
#define IS_ALTERNATE(_code)           (TOOL_ALTERNATIVE_BIT == ((_code) & TOOL_ALTERNATIVE_BIT))
#define IS_TOOL_OVERLAP(_c1, _c2)                   \
    ((IS_ALTERNATE(_c1) == IS_ALTERNATE(_c2)) &&    \
    (0!=(TOOL_CODEMASK(_c1) & TOOL_CODEMASK(_c2))))

  };//tools
};//core

#endif