InDesign SDK
20.5
InDesign SDK
Documentation
Bosses
Sample plug-ins
Class Index
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
IDocumentUIActions.h
1
//========================================================================================
2
//
3
// $File$
4
//
5
// Owner: Chris Parrish
6
//
7
// $Author$
8
//
9
// $DateTime$
10
//
11
// $Revision$
12
//
13
// $Change$
14
//
15
// Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16
//
17
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18
// with the terms of the Adobe license agreement accompanying it. If you have received
19
// this file from a source other than Adobe, then your use, modification, or
20
// distribution of it requires the prior written permission of Adobe.
21
//
22
//========================================================================================
23
24
#include "DocFrameworkID.h"
25
#include "DocumentID.h"
26
29
class
IDocumentUIActions
:
public
IPMUnknown
30
{
31
public
:
32
33
enum
{kDefaultIID = IID_IDOCUMENTUIACTIONS};
34
35
40
virtual
ClassID
GetDefaultDocFileHandlerID
() = 0;
41
42
/*
43
//----- From Document Utils
44
45
virtual ErrorCode DoSaveAs(IDocument *doc) = 0;
46
virtual ErrorCode DoSave(IDocument *doc) = 0;
47
virtual ErrorCode DoSaveACopy(IDocument *doc) = 0;
48
49
virtual bool16 SaveAll(void) = 0;
50
virtual bool16 SaveAllModified(bool16 abortOnErr = kFalse, bool16 reportErrs = kFalse, bool16 saveUntitled = kFalse) = 0;
51
52
virtual bool16 CloseAll(bool16 allowCancel = kTrue, bool16 prompt = kTrue) = 0;
53
virtual bool16 CloseFrontWindow(bool16 allowCancel = kTrue) = 0;
54
virtual bool16 CloseFrontDoc(bool16 allowCancel = kTrue) = 0;
55
56
virtual bool16 RevertFrontDoc(bool16 allowCancel = kTrue) = 0;
57
58
//----- From DocFileHandler
59
60
// Should return kTrue if the document is modified or unsaved.
61
virtual bool8 CanSave(const UIDRef& doc) = 0;
62
// Save the document.
63
// If it is unsaved Save should call SaveAs
64
virtual void Save(const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
65
66
// Can save as.
67
virtual bool8 CanSaveAs(const UIDRef& doc) = 0;
68
// Save the doc as destFile.
69
// If destFile is nil SaveAs should ask the user (if uiFlags allow) or fail.
70
// The asStationery flag should be considered as Mac only and will only be honored
71
// if destFile is not nil.
72
virtual void SaveAs(const UIDRef& doc, const IDFile *destFile = nil,
73
UIFlags uiFlags = kFullUI,
74
bool8 asStationery = kFalse) = 0;
75
76
// Can save a copy.
77
virtual bool8 CanSaveACopy(const UIDRef& doc) = 0;
78
// Save a copy of the doc as destFile.
79
// If destFile is nil SaveACopy should ask the user (if uiFlags allow) or fail.
80
// The asStationery flag should be considered as Mac only and will only be honored
81
// if destFile is not nil.
82
virtual void SaveACopy(const UIDRef& doc, const IDFile *destFile = nil,
83
UIFlags uiFlags = kFullUI,
84
bool8 asStationery = kFalse) = 0;
85
86
// Can revert should return kFalse if the doc is unmodified or unsaved.
87
virtual bool8 CanRevert(const UIDRef& doc) = 0;
88
// Revert should ask the user (if uiFlags allow).
89
virtual void Revert(const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
90
91
// Can close.
92
virtual bool8 CanClose(const UIDRef& doc) = 0;
93
// Close should close any open window and finaly the document.
94
// If uiFlags allow the user should get a chance to save a modified document.
95
96
typedef enum CloseCmdMode { kProcess, kSchedule };
97
virtual void Close(const UIDRef& doc, UIFlags uiFlags = kFullUI, bool8 allowCancel = kTrue, CloseCmdMode cmdMode = kSchedule) = 0;
98
99
100
// Methods implemented in a standard way by the default DocFileHandler. Other handlers
101
// should call these to insure consistent behavior.
102
103
// Check to see if the file is dirty on close and, if so, ask the user whether
104
// it should be saved.
105
enum CloseOptions { kSave, kDontSave, kCancel };
106
virtual CloseOptions CheckOnClose(const UIDRef& doc, UIFlags uiFlags, bool8 allowCancel) = 0;
107
// Get the appropriate default SaveAs file name.
108
virtual void GetCopyDefaultName(const UIDRef& doc, IDFile *name, bool16& useSystemDefaultDir) = 0;
109
*/
110
};
tmpdoxygeninput
IDocumentUIActions.h
Generated on Sat Jul 19 2025 02:54:13 for InDesign SDK by
1.8.3.1