added some development tools
[windows-sources.git] / developer / VSSDK / VisualStudioIntegration / Common / IDL / undoredo.idl
blob7374b5dee7f0901b52e515635e313cfcb78a7cc1
1 //------------------------------------------------------------------------------
2 // UNDOREDO.IDL
3 //
4 // Interface definitions for undo/redo history management
5 //------------------------------------------------------------------------------
7 import "oaidl.idl";
8 import "ocidl.idl";
10 ////////////////////////////////////////////////////////////////////////////
11 // IAction interface
13 // Actions placed in the undo history of a text buffer expose this
14 // interface.
15 ////////////////////////////////////////////////////////////////////////////
17 object,
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);
50 HRESULT Reset ();
51 HRESULT Clone (IEnumActions **ppenum);
56 ////////////////////////////////////////////////////////////////////////////
57 // IActionHistory interface
59 // Objects with undo/redo capability expose this interface.
60 ////////////////////////////////////////////////////////////////////////////
62 object,
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();
73 HRESULT CanUndo();
74 HRESULT CanRedo();
75 HRESULT Undo();
76 HRESULT Redo();
77 HRESULT EnumUndoActions (IEnumActions **ppEnumUndoActions);
78 HRESULT EnumRedoActions (IEnumActions **ppEnumRedoActions);
79 HRESULT Reset ();
85 uuid(8D5DE84E-7D42-11D0-A8AA-00A0C921A4D2),
86 version(1.0),
87 helpstring("undoredo 1.0 Type Library")
89 library UNDOREDOLib
91 importlib("stdole32.tlb");
92 importlib("stdole2.tlb");
95 uuid(F5E7E71F-1401-11d1-883B-0000F87579D2),
96 helpstring("ActionHistory Class")
98 coclass ActionHistory
100 [default] interface IActionHistory;