====== IExternalDocument ====== Scriptable object, inherited from [[:scripting:api:base-document:start|IBaseDocument]] ===== Description ===== External document interface to be implemented (optionally) by File Handler plugins ===== Properties ===== ^Property^ Description^ |[[scripting:api:base-document:active-view|ActiveView]]| Returns active view of the document| |[[scripting:api:base-document:bookmarks|Bookmarks]]| Bookmark Collection| |[[scripting:api:base-document:can-redo|CanRedo]]| Checks if redo action possible| |[[scripting:api:base-document:can-undo|CanUndo]]| Checks if undo action possible| |[[scripting:api:base-document:changeable|Changeable]]| Changeable state of the document| |[[scripting:api:base-document:data|Data]]| Binary Content of the document| |[[scripting:api:base-document:locked|Locked]]| Locked state of the document| |[[scripting:api:base-document:modified|Modified]]| Modified state of the document| |[[scripting:api:base-document:path|Path]]| Path of the document| |[[scripting:api:external-document:plugin|Plugin]]| Return owning plugin| |[[scripting:api:base-document:read-only|ReadOnly]]| Read-Only state of the document| |[[scripting:api:base-document:title|Title]]| Title of the document| |[[scripting:api:base-document:type|Type]]| Document Type| |[[scripting:api:base-document:version|Version]]| Document version. Increased on every document change| |[[scripting:api:base-document:views|Views]]| Returns document view collection| ===== Methods ===== ^Method^ Description^ |[[scripting:api:base-document:close|Close]]| Closes the document| |[[scripting:api:external-document:create-view|CreateView]]| Returns view for drawing| |[[scripting:api:base-document:get-undo-item-description|GetUndoItemDescription]]| Returns description of Undo items| |[[scripting:api:base-document:get-undo-items|GetUndoItems]]| Returns Undo Items List| |[[scripting:api:base-document:get-undo-position|GetUndoPosition]]| Returns current Undo position| |[[scripting:api:base-document:init|Init]]| Initialize the document, unloading/saving old one if needed| |[[scripting:api:base-document:load|Load]]| Reloads the document from current path (source is empty), or loads from given path (source is string) or from stream (source is [[:scripting:api:stream:start|IStream]]). If bModifiedCheck set, use will be asked to confirm reload if changes exist| |[[scripting:api:external-document:load-info|LoadInfo]]| Called when document preferences shall to be loaded from workspace| |[[scripting:api:base-document:redo|Redo]]| Redo of the last editing steps until nNewPosition, if nNewPosition == -1 - until last begin of undo group| |[[scripting:api:base-document:remove-bookmark|RemoveBookmark]]| Removes specific bookmark| |[[scripting:api:base-document:reset-undo|ResetUndo]]| Resets Undo queue| |[[scripting:api:base-document:save|Save]]| Saves document under given path. If path is empty saves on current file name| |[[scripting:api:external-document:save-info|SaveInfo]]| Called when document preferences shall to be stored in workspace| |[[scripting:api:base-document:set-bookmark|SetBookmark]]| Sets bookmark on specific position| |[[scripting:api:base-document:undo|Undo]]| Undo of the last editing steps until nNewPosition, if nNewPosition == -1 - until last begin of undo group| ===== See Also ===== [[:scripting:api:file-handler:create|IFileHandler::Create]], [[:scripting:api:file-handler:load|IFileHandler::Load]] #API ~~NOTOC~~