27 #ifndef __IDocumentCommands__ 28 #define __IDocumentCommands__ 30 #include "IPMUnknown.h" 31 #include "IDocument.h" 32 #include "IOpenFileCmdData.h" 33 #include "IPageSetupPrefs.h" 35 #include "PMPageSize.h" 37 #include "DocFrameworkID.h" 42 enum {kDefaultIID = IID_IDOCUMENTCOMMANDS};
59 kBusinessCardLandscape,
61 kSurfacePro3Landscape,
68 fPageSize(kPMPageSizeEmpty),
69 fWideOrientation(kFalse),
70 fDocIntent(kUnchangedIntent),
72 fPrimaryTextFrame(kFalse)
76 bool16 fWideOrientation;
77 DocumentIntent fDocIntent;
79 bool16 fPrimaryTextFrame;
88 virtual ErrorCode New(
UIDRef *result, UIFlags uiFlags = kFullUI,
PMString* styleToUse = nil,
90 virtual ErrorCode Open(
UIDRef *result,
const IDFile &file, UIFlags uiFlags = kFullUI,
93 bool16 showInWindow = kTrue,
95 virtual ErrorCode Save(
const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
96 virtual ErrorCode SaveAs(
const UIDRef& doc,
const IDFile& destFile, UIFlags uiFlags = kFullUI) = 0;
97 virtual ErrorCode Close(
const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
100 virtual ICommand* CreateOpenCommand(
const IDFile &file, UIFlags uiFlags = kFullUI,
103 bool16 showInWindow = kTrue,
106 virtual ICommand* CreateSaveCommand(
const UIDRef& docToClose, UIFlags uiFlags = kFullUI) = 0;
107 virtual ICommand* CreateSaveAsCommand(
void) = 0;
108 virtual ICommand* CreateSaveACopyCommand(
void) = 0;
109 virtual ICommand* CreateCloseCommand(
const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
111 virtual ICommand* CreateOpenRevertedCommand(
void) = 0;
112 virtual ICommand* CreatePreRevertCommand(
void)= 0;
129 virtual bool8 IsOpenCommand(
ClassID commandID) = 0;
130 virtual bool8 IsNewCommand(
ClassID commandID) = 0;
131 virtual bool8 IsSaveCommand(
ClassID commandID) = 0;
132 virtual bool8 IsSaveAsCommand(
ClassID commandID) = 0;
133 virtual bool8 IsSaveACopyCommand(
ClassID commandID) = 0;
134 virtual bool8 IsCloseCommand(
ClassID commandID) = 0;
135 virtual bool8 IsRecoverCommand(
ClassID commandID) = 0;
136 virtual bool8 IsPreRevertCommand(
ClassID commandID) = 0;
137 virtual bool8 IsOpenRevertedCommand(
ClassID commandID) = 0;
143 #endif //__IDocumentCommands__