Show pageOld revisionsBacklinksAdd to bookBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== ITextDocument ====== Scriptable object, inherited from [[:scripting:api:base-document:start|IBaseDocument]] ===== Description ===== HippoEDIT Text Document object ===== Properties ===== ^Property^ Description^ |[[scripting:api:base-document:active-view|ActiveView]]| Returns active view of the document| |[[scripting:api:text-document:associative-color|AssociativeColor]]| Associative Color| |[[scripting:api:text-document:auto-reload|AutoReload]]| Document Auto-Reload property| |[[scripting:api:text-document:binary|Binary]]| Binary content property| |[[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:text-document:embedded-scopes|EmbeddedScopes]]| Embedded styles| |[[scripting:api:text-document:encoding|Encoding]]| Document encoding| |[[scripting:api:text-document:indent-size|IndentSize]]| Return default indent for document| |[[scripting:api:text-document:label-data-valid|LabelDataValid]]| True if label data is valid| |[[scripting:api:text-document:labels|Labels]]| Labels collection| |[[scripting:api:text-document:line-break|LineBreak]]| Default Line Break Style| |[[scripting:api:text-document:line-count|LineCount]]| Line count property| |[[scripting:api:base-document:locked|Locked]]| Locked state of the document| |[[scripting:api:text-document:markers|Markers]]| Markers Collection| |[[scripting:api:text-document:max-line-length|MaxLineLength]]| Return maximum line length| |[[scripting:api:base-document:modified|Modified]]| Modified state of the document| |[[scripting:api:text-document:not-closed-scopes|NotClosedScopes]]| Not Closed Scopes collection| |[[scripting:api:text-document:not-open-scopes|NotOpenScopes]]| Not Open Scopes collection| |[[scripting:api:text-document:overview-scopes|OverviewScopes]]| Embedded styles| |[[scripting:api:base-document:path|Path]]| Path of the document| |[[scripting:api:base-document:read-only|ReadOnly]]| Read-Only state of the document| |[[scripting:api:text-document:scope-data-valid|ScopeDataValid]]| True if scope data is valid| |[[scripting:api:text-document:scope-data-version|ScopeDataVersion]]| Scope data version| |[[scripting:api:text-document:scopes|Scopes]]| Scopes collection| |[[scripting:api:text-document:size|Size]]| Return document size in characters| |[[scripting:api:text-document:slow|Slow]]| Slow document property| |[[scripting:api:text-document:syntax|Syntax]]| Document active syntax property| |[[scripting:api:text-document:tab-size|TabSize]]| Document Tab Size| |[[scripting:api:text-document:tab-used|TabUsed]]| Indicates that tabs are used in 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:text-document:absolute-distance|AbsoluteDistance]]| Calculate absolute distance between text positions| |[[scripting:api:text-document:absolute-to-text|AbsoluteToText]]| Convert Absolute Position to Text Position| |[[scripting:api:text-document:activate|Activate]]| Activates the document| |[[scripting:api:text-document:add-marker|AddMarker]]| Add new marker to the document| |[[scripting:api:text-document:add-style-range|AddStyleRange]]| Add Style Range| |[[scripting:api:text-document:adopt-indent|AdoptIndent]]| Adopts indentation of selected range to fit desired level| |[[scripting:api:text-document:adopt-white-space|AdoptWhiteSpace]]| Adopts white space in provided text to correspond the document settings| |[[scripting:api:text-document:append|append]]| Appends text to the end of document| |[[scripting:api:text-document:appendln|appendln]]| Appends text and new line to the end of document| |[[scripting:api:text-document:begin-undo-group|BeginUndoGroup]]| Start undo group or merge with previous| |[[scripting:api:base-document:close|Close]]| Closes the document| |[[scripting:api:text-document:delete-text|DeleteText]]| Deletes text from specific range| |[[scripting:api:text-document:delete-text-block|DeleteTextBlock]]| Deletes text from specific range in Block Mode| |[[scripting:api:text-document:equals|equals]]| Compare, if objects are equal| |[[scripting:api:text-document:find|Find]]| Finds text in the document from the given start position| |[[scripting:api:text-document:find-all|FindAll]]| Finds all text matches in the document| |[[scripting:api:text-document:find-label|FindLabel]]| Find Label from point| |[[scripting:api:text-document:find-labels|FindLabels]]| Find Labels from range| |[[scripting:api:text-document:find-scope|FindScope]]| Find Scope from point| |[[scripting:api:text-document:find-scopes|FindScopes]]| Find Scopes from range| |[[scripting:api:text-document:flush-undo-group|FlushUndoGroup]]| Flush last undo group| |[[scripting:api:text-document:force-job|ForceJob]]| Forces re-start of the specific job. nLineFrom = 0, nLineTo = -1 - process whole document| |[[scripting:api:text-document:get-char|GetChar]]| Returns the character to the right of the position (absolute)| |[[scripting:api:text-document:get-desired-line-indent|GetDesiredLineIndent]]| Returns desired line indent| |[[scripting:api:text-document:get-line|GetLine]]| Returns copy of document line chars| |[[scripting:api:text-document:get-line-actual-length|GetLineActualLength]]| Returns line actual (expanded tabs) length| |[[scripting:api:text-document:get-line-break|GetLineBreak]]| Returns line break chars| |[[scripting:api:text-document:get-line-length|GetLineLength]]| Returns line length| |[[scripting:api:text-document:get-lines|GetLines]]| Returns lines of range with/without line breaks| |[[scripting:api:text-document:get-style-from-pos|GetStyleFromPos]]| Returns top style with ranges from position| |[[scripting:api:text-document:get-styles-from-pos|GetStylesFromPos]]| Returns style stack from position| |[[scripting:api:text-document:get-text|GetText]]| Returns copy of text, with actual line breaks| |[[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:text-document:insert-text|InsertText]]| Inserts text in specific position| |[[scripting:api:text-document:insert-text-block|InsertTextBlock]]| Inserts text in specific position in Block Mode| |[[scripting:api:text-document:insert-undo-record|InsertUndoRecord]]| Insert abstract undo step for informing registered listener| |[[scripting:api:text-document:is-job-running|IsJobRunning]]| Checks if specific is still running (so its results are not up-to-date)| |[[scripting:api:text-document:is-known-term|IsKnownTerm]]| Check, if word exist in document, using statistic data| |[[scripting:api:text-document:is-line-hidden|IsLineHidden]]| Returns true, if line is hidden (inside of collapsed area)| |[[scripting:api:text-document:is-line-modified|IsLineModified]]| Returns true, if line has been modified| |[[scripting:api:text-document:is-line-saved|IsLineSaved]]| Returns true, if line has been modified and saved| |[[scripting:api:text-document:is-protected|IsProtected]]| Check, if document point inside of protected area| |[[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:text-document:move-position|MovePosition]]| Moves position| |[[scripting:api:text-document:move-position-line|MovePositionLine]]| Moves position line| |[[scripting:api:text-document:offset-to-text|OffsetToText]]| Convert Line Offset to Text Position| |[[scripting:api:text-document:protect-line|ProtectLine]]| Mark lines as protected| |[[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:text-document:remove-markers|RemoveMarkers]]| Removes markers from the document or by marker reference or by range| |[[scripting:api:text-document:remove-style-ranges|RemoveStyleRanges]]| Remove Style Ranges| |[[scripting:api:text-document:replace-all|ReplaceAll]]| Replace all text matches in the document| |[[scripting:api:text-document:replace-text|ReplaceText]]| Replace text in specific range| |[[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:base-document:set-bookmark|SetBookmark]]| Sets bookmark on specific position| |[[scripting:api:text-document:text-to-absolute|TextToAbsolute]]| Convert Text Position to Absolute Position| |[[scripting:api:text-document:text-to-offset|TextToOffset]]| Convert Text Position to Line Offset| |[[scripting:api:base-document:undo|Undo]]| Undo of the last editing steps until nNewPosition, if nNewPosition == -1 - until last begin of undo group| |[[scripting:api:text-document:update|Update]]| Updates all connected views, cleaning all buffers from line nLine| |[[scripting:api:text-document:write|write]]| Inserts or overwrites a string at the current cursor position| |[[scripting:api:text-document:writeln|writeln]]| Inserts or overwrites a string and a new line at the current cursor position| ===== See Also ===== [[:scripting:api:application:navigate|IApplication::Navigate]], [[:scripting:api:application:new-file|IApplication::NewFile]], [[:scripting:api:application:open-file|IApplication::OpenFile]], [[:scripting:api:frame-events:on-job-finished|IFrameEvents::onJobFinished]], [[:scripting:api:frame-events:on-syntax-change|IFrameEvents::onSyntaxChange]], [[:scripting:api:frame-events:on-text-format|IFrameEvents::onTextFormat]], [[:scripting:api:frame-events:on-text-insert|IFrameEvents::onTextInsert]], [[:scripting:api:application:navigate|IScriptApplication::Navigate]], [[:scripting:api:application:new-file|IScriptApplication::NewFile]], [[:scripting:api:application:open-file|IScriptApplication::OpenFile]], [[:scripting:api:style-informer:on-job-start|IStyleInformer::OnJobStart]] #API ~~NOTOC~~