1 //------------------------------------------------------------------------------
4 // Interface definitions for undo/redo history management
5 //------------------------------------------------------------------------------
10 ////////////////////////////////////////////////////////////////////////////
13 // Actions placed in the undo history of a text buffer expose this
15 ////////////////////////////////////////////////////////////////////////////
18 uuid(D8C8AB11
-7D4A
-11d0
-A8AA
-00A0C921A4D2
),
19 helpstring("IAction Interface"),
20 pointer_default(unique)
22 interface IAction
: IUnknown
24 HRESULT GetName
(BSTR *bstrName
, BOOL fLongName
);
25 HRESULT GetSize
(long *piSize
);
26 HRESULT Undo
(IUnknown
*pObject
);
27 HRESULT Redo
(IUnknown
*pObject
);
28 HRESULT Abort
(IUnknown
*pObject
);
29 HRESULT AddSibling
(IAction
*pAction
);
30 HRESULT GetNextSibling
(IAction
**ppAction
);
31 HRESULT AddChild
(IAction
*pAction
);
32 HRESULT GetFirstChild
(IAction
**ppAction
);
33 HRESULT CanMerge
(IAction
*pAction
);
34 HRESULT Merge
(IAction
*pAction
);
37 ////////////////////////////////////////////////////////////////////////////
38 // IEnumActions interface
40 // Standard type enumerator interface for IActions in either an undo
41 // or redo stack of a IActionHistory implementation
42 ////////////////////////////////////////////////////////////////////////////
44 uuid(7A6335C8
-7884-11d0
-A8A9
-00A0C921A4D2
)
46 interface IEnumActions
: IUnknown
48 HRESULT Next
(ULONG celt
, IAction
**rgelt
, ULONG
*pceltFetched
);
49 HRESULT Skip
(ULONG celt
);
51 HRESULT Clone
(IEnumActions
**ppenum
);
56 ////////////////////////////////////////////////////////////////////////////
57 // IActionHistory interface
59 // Objects with undo/redo capability expose this interface.
60 ////////////////////////////////////////////////////////////////////////////
63 uuid(8D5DE85B
-7D42
-11D0
-A8AA
-00A0C921A4D2
),
64 helpstring("IActionHistory Interface"),
65 pointer_default(unique)
67 interface IActionHistory
: IUnknown
69 HRESULT RecordAction
([in]IAction
*pAction
);
70 HRESULT OpenAction
([in]IAction
*pAction
);
71 HRESULT CloseAction
();
72 HRESULT AbortAction
();
77 HRESULT EnumUndoActions
(IEnumActions
**ppEnumUndoActions
);
78 HRESULT EnumRedoActions
(IEnumActions
**ppEnumRedoActions
);
85 uuid(8D5DE84E
-7D42
-11D0
-A8AA
-00A0C921A4D2
),
87 helpstring("undoredo 1.0 Type Library")
91 importlib
("stdole32.tlb");
92 importlib
("stdole2.tlb");
95 uuid(F5E7E71F
-1401-11d1
-883B
-0000F87579D2
),
96 helpstring("ActionHistory Class")
100 [default] interface IActionHistory
;