/***************************************************************************
 *                          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: Monday, October 07, 2002 00:03:37
 */

#if !defined(eventsTypes_h_included)
#define eventsTypes_h_included

#include <zmodeler.h>

namespace core
{
  namespace events
  {
    //----------------------------------
    // events coming from zmodeler to 
    // IEventHandler interfaces
    typedef enum
    {
      EVENT_ZM                      = 1,
      EVENT_COMMAND                 = 2,
      EVENT_LEVEL_CHANGED           = 10,
      EVENT_EDITMODE_CHANGED        = 11,
    
      EVENT_RENDER                  = 20,
    
      EVENT_VIEW                    = 30,
      EVENT_TIMER                   = 31,

      EVENT_MOUSE_INPUT             = 40,
      EVENT_KEYBOARD_INPUT          = 41,
      EVENT_HITTEST                 = 42,

      EVENT_TOOL                    = 51,
      EVENT_SCENE                   = 52,
    
      EVENT_TEXTURE                 = 60,
      EVENT_MATERIAL                = 61,
    
      EVENT_LAST                    = 0x7FFFFF
    }tEvent;
    

    //---------------------------------------
    // IZM-specific events;
    enum eZMEvents
    {
      EVENT_ZM_CLOSE,
      EVENT_ZM_START,
      EVENT_ZM_STARTED,
      EVENT_ZM_OPEN,
      EVENT_ZM_OPENED,
      EVENT_ZM_SAVE,
      EVENT_ZM_SAVED,
      EVENT_ZM_IMPORT,
      EVENT_ZM_IMPORTED,
      EVENT_ZM_EXPORT,
      EVENT_ZM_EXPORTED,
      EVENT_ZM_NEW,
    };

    //---------------------------------------
    // Command IDs routing specific events;
    enum eCommandEvents
    {
      EVENT_COMMAND_REQUEST_RANGE,
      EVENT_COMMAND_OCCURE,
      EVENT_COMMAND_UPDATE,
      EVENT_COMMAND_GETHINT,
    };

    //---------------------------------------
    // IView-specific events;
    enum eViewEvents
    {
      EVENT_VIEW_ACTIVATE,
      EVENT_VIEW_DEACTIVATE,

      EVENT_VIEW_CREATE,
      EVENT_VIEW_CREATED,
      EVENT_VIEW_CLOSE,
      EVENT_VIEW_CLOSED,
      EVENT_VIEW_SHOW,
      EVENT_VIEW_HIDE,

      EVENT_VIEW_MAXIMIZE,
      EVENT_VIEW_MINIMIZE,
      EVENT_VIEW_RESTORE,

      EVENT_VIEW_BEGIN_RENDER,
      EVENT_VIEW_END_RENDER,
    };

    //---------------------------------------
    // Nodes-specific events;
    enum eSceneEvents
    {
      EVENT_SCENE_ADDNODE,    //BBox: [INode]
      EVENT_SCENE_DROPNODE,   //BBox: [INode]
      EVENT_SCENE_CHANGENODE, //BBox: [INode, DWORD NC_ bits]
      EVENT_SCENE_LINKNODE,   //BBox: [INode child, INode new parent, [opt] INode old parent]
      EVENT_SCENE_ACTIVATION, //BBox: [INode]
      EVENT_SCENE_SELECTION,  //BBox: [INode]
      EVENT_SCENE_VISIBILITY, //BBox: [INode]
    };

    //---------------------------------------
    // Tool-specific events;
    enum eToolEvents
    {
      EVENT_TOOL_SELECT,      //BBox: [IUnknown: ITool, long nIndex (if IMultyLayout)]
      EVENT_TOOL_END          //BBox: [IUnknown: ITool, long nIndex (if IMultyLayout)]
    };

    //---------------------------------------
    // Render-specific events;
    enum eRenderEvents
    {
      EVENT_RENDER_DEVICE_SELECT, //BBox: [void: IDevice]
      EVENT_RENDER_BEGIN,         //BBox: [void: IDevice] [IUnknown: IViewport]
      EVENT_RENDER_END            //BBox: [void: IDevice] [IUnknown: IViewport]
    };

    // type of the timer
    enum eTimerType
    {
      TT_ONETIME,
      TT_CONTINUOUS
    };

    //---------------------------------------
    // Textures events;
    enum eTextureEvents
    {
      EVENT_TEXTURE_LOAD,
      EVENT_TEXTURE_UNLOAD,
      EVENT_TEXTURE_UPDATE
    };

    //---------------------------------------
    // Material events:
    enum eMaterialEvents
    {
      EVENT_MATERIAL_ADD,
      EVENT_MATERIAL_REMOVE,
      EVENT_MATERIAL_CHANGE,
      EVENT_MATERIAL_RELINK
    };

  };//events
};//core

#endif