#ifdef __PRIVATE__
//#
//#	File:		Undo.idl
//#
//#	Contains:	Class definition for ODUndo
//#
//#	Owned by:	Nick Pilch
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <4>	 8/19/94	NP		1181622: Ownership fix.
//#		 <3>	 7/27/94	NP		Changed all parameters to Peek. methods to
//#									out.
//#		 <2>	 6/16/94	RR		Added function prefix
//#		 <1>	  6/8/94	RR		first checked in
//#		 <1>	  6/8/94	RR		first checked in
//#		 <5>	  6/7/94	RR		Privatise change log
//#		 <1>	  5/9/94	VL		first checked in
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _UNDO_
#define _UNDO_

#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif

//==============================================================================
// Classes defined in this interface
//==============================================================================

interface  ODUndo;

//==============================================================================
// Classes used by this interface
//==============================================================================

interface  ODPart;

#ifdef __PRIVATE__
//=====================================================================================
// Implementation Types
//=====================================================================================

typedef somToken SystemUndo;
#endif

//==============================================================================
// ODUndo
//==============================================================================

interface ODUndo :  ODObject
{

#ifdef __PRIVATE__

	void InitUndo();
	
#endif

   void AddActionToHistory(in ODPart whichPart,
   						   in ODActionData actionData,
						   in ODActionType actionType,
						   in ODName undoActionLabel,
						   in ODName redoActionLabel);

   void Undo();

   void Redo();

   void MarkActionHistory();

   void ClearActionHistory(in ODRespectMarksChoices respectMarks);

   void ClearRedoHistory();

   ODBoolean PeekUndoHistory(out ODPart part,
   							 out ODActionData actionData,
							 out ODActionType actionType,
							 out ODName actionLabel);
  
   ODBoolean PeekRedoHistory(out ODPart part,
   							 out ODActionData actionData,
							 out ODActionType actionType,
							 out ODName actionLabel);
							 
#ifdef __SOMIDL__
	implementation
	{
  		functionprefix = ODUndo;

	override:
		somInit,
		somUninit,
		Purge;
	
  	releaseorder:
        InitUndo,
        AddActionToHistory,
        Undo,
        Redo,
        MarkActionHistory,
        ClearActionHistory,
        ClearRedoHistory,
        PeekUndoHistory,
        PeekRedoHistory;
		
    #ifdef __PRIVATE__
	passthru C_xih = "
	""
	"class SystemUndo;"
	"";

	SystemUndo*	fSystemUndo;

    #endif

  };
#endif
};

#endif // _UNDO_
