/***************************************************************************
 *                          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: 20 февраля 2004 г. 15:20:25
 */

#if !defined(undoTypes_h_included)
#define undoTypes_h_included

#include <zmodeler.h>

namespace core
{
  namespace undo
  {
//
// Undo-block state modes
//
    
    enum eUndoBlockMode
    {
      UB_INIT, //initial state
      UB_UNDO,
      UB_REDO
    };
    
//
// Common Undo operations
//
    enum eCommonUndo
    {
      // INamed-changes
      // BBox Unk: 
      //    INamed 
      UNDO_INAMED=0,
      
      // IStatus-changes
      // BBox Unk: 
      //    IStatus
      UNDO_ISTATUS=4,
      
      // IBoundary-changes
      // BBox Unk: 
      //    IBoundary
      // INode is queried from IBoundary and 
      // changes(NC_BOUNDARY) is sent on success
      UNDO_IBOUNDARY=5,
      
      // Addition of new node to the scene
      // BBox Unk: 
      //    INode node 
      UNDO_ADD_NODE=10,
      
      // Node removed from the scene
      // BBox Unk: 
      //    INode node 
      UNDO_DROP_NODE=11,
      
      // Node relinking
      // BBox Unk: 
      //    INode node 
      UNDO_RELINK_NODE=12,
      
      // ITransformable matrix change
      // BBox Unk: 
      //    ITransformable trans
      UNDO_TRANSFORM=20,
      
      // multiple ITransformable changes.
      // BBox void: 
      //    ITransformable*[] - head of ITransformable* array.
      //    INode*[] - head of INode* array - affected nodes
      // BBox long:
      //    count1 - amount of ITransformable* in array.
      //    count2 - amount of INode* in array.
      // Array is copied(!), maintained and destroyed by 
      // IUndoBlock implementation. Each item in array
      // holds the reference. Don't forget to destroy
      // your original array.
      UNDO_MASS_TRANSFORM=22,
      
      // single ZEntity changes.
      // BBox void: 
      //    ZEntity*
      // BBox Unk: 
      //    INode owner (if possible)
      UNDO_ENTITY=30,

      // stores all vertex data
      // BBox Unk: 
      //    INode* pointer to owner. IMeshNode
      // vertex-data (including ZEntityBase) is
      // copied, maintained and released by 
      // IUndoBlock implementation
      UNDO_VERTEX_BUFFER=40,
      
      // stores vertex mapping data
      // BBox Unk: 
      //    INode* pointer to owner. IMeshNode
      // BBox long: 
      //    n_UV_chanel
      // vertex-mapping is copied, maintained and
      // released by IUndoBlock implementation
      UNDO_VERTEX_MAPPING=41,
      
      // stores vertex entities info (status, ext, user data)
      // BBox Unk: 
      //    IMeshNode* pointer to owner.
      // IPolyMesh is the must
      UNDO_VERTEX_ENTITY=42,
      
      // stores vertex color
      // BBox Unk: 
      //    IMeshNode* pointer to owner.
      // IPolyMesh is the must
      UNDO_VERTEX_COLOR=43,
      
      // stores vertex bonesID and weights
      // BBox Unk: 
      //    IMeshNode* pointer to owner.
      // IPolyMesh is the must
      UNDO_VERTEX_WEIGHTS=44,

      // stores all polygonal data
      // BBox Unk: 
      //    INode* pointer to owner. IMeshNode
      // polygon-data (including ZEntityBase) is
      // copied, maintained and released by 
      // IUndoBlock implementation
      UNDO_POLY_BUFFER=45,

      // stores polygonal material data
      // BBox Unk: 
      //    INode* pointer to owner. IMeshNode
      // polygon material data is copied, maintained
      // and released by IUndoBlock implementation
      UNDO_POLY_MATERIAL=46,

      // stores polygons entities info (status, ext, user data)
      // BBox Unk: 
      //    IMeshNode* pointer to owner.
      // IPolyMesh is the must
      UNDO_POLY_ENTITY=47,
      
      // stores IPolyMesh data
      // BBox Unk: 
      //    INode* pointer to owner.
      // IMeshNode, IPolyMesh is the must.
      UNDO_POLY_MESH=48,

      // stores spline chain info
      // BBox Unk: 
      //    ISplineNode* pointer to the node.
      UNDO_SPLINE_CHAIN=50,
      
      // stores spline geometry (control points)
      // BBox Unk: 
      //    ISplineNode* pointer to the node.
      UNDO_SPLINE_GEOMETRY=51,
      
      // stores whole spline (chain, geometry, entities)
      // BBox Unk: 
      //    ISplineNode* pointer to the node.
      UNDO_SPLINE_ALL=52,
      
      // stores ILight data
      // BBox Unk: 
      //    ILight* pointer to the light.
      UNDO_ILIGHT=60,
      
      // stores single IMaterial
      // BBox Unk: 
      //    IMaterial* pointer to material.
      UNDO_IMATERIAL=70,
      
      // material addition
      // BBox Unk: 
      //    IMaterial* pointer to material.
      // BBox long: 
      //    nIndex (opt) insertion position
      UNDO_ADD_MATERIAL=71,
      
      // material deletion
      // BBox Unk: 
      //    IMaterial* pointer to material.
      // default implementation does not
      // perform remapping of affected 
      // poly-mesh material indexes.
      UNDO_DROP_MATERIAL=72,
      
      // material basics
      // BBox Unk: 
      //    IMaterial* pointer to material.
      UNDO_MATERIAL_BASICS=73,
      
      // material alpha
      // BBox Unk: 
      //    IMaterial* pointer to material.
      UNDO_MATERIAL_ALPHA=74,
      
      // material texture layers
      // BBox Unk: 
      //    IMaterial* pointer to material.
      UNDO_MATERIAL_TEXTURES=75,
      
      // texture load
      // BBox Unk: 
      //    ITexture* pointer to texture.
      UNDO_TEXTURE_LOAD=80,
      
      // texture unload
      // BBox Unk: 
      //    ITexture* pointer to texture.
      // default implemenation affects
      // materials layers, where texture was
      // used.
      UNDO_TEXTURE_UNLOAD=81,
      
      // texture properties
      // BBox Unk: 
      //    ITexture* pointer to texture.
      // affects name, group and container
      UNDO_TEXTURE_PROPERTIES=82,
      
      // stores IDummyNode data
      // BBox Unk: 
      //    IDummyNode* pointer to the dummy node.
      UNDO_IDUMMYNODE=90,
      
      // stores user-defined options
      // BBox Unk: 
      //    core::ui::controls::IUserDefinedOptions*
      UNDO_IUSERDEFINED=91,
      
      // stores binding data
      // BBox Unk: 
      //    ZUnknown* source.
      //    ZUnknown* target.
      //    core::bind::IBindCondition* condition.
      UNDO_BIND=100,
      UNDO_UNBIND=101,

      // stores skeleton properties. mode, all bones IDs and matrices
      // BBox Unk: 
      //    ISkeletonNode* pointer to the skeleton node.
      UNDO_ISKELETIONNODE = 110,

      // stores bone properties. mode, ID and matrices
      // BBox Unk: 
      //    IBoneNode* pointer to the bone node.
      UNDO_IBONENODE = 120,
      
    };//eCommonUndo
  };//undo
};//core

#endif