Document View object is implemented by an editor window. If the document has several windows opened, each of them creates a separate document view object.
Document View object implements the IDocumentView interface, which inherits from IWindow interface. You may get a reference to a document object this view is attached to using the IDocumentView.document property and you can get all views of a document using the IDocument.views property.
Other read-write view properties include:
| Property | Description |
|---|---|
| insertMode | Current Insert Mode. |
| displayAs | Current View Type. |
| addressDisplayAs | Current address display type. |
| groupBy | Current Data Grouping mode. |
| columns | Current number of columns |
| bigEndian | Current Byte Order. |
| encoding | Current encoding. |
| codePane | Code pane visibility. |
| textPane | Text pane visibility. |
The view's cursor can be accessed using the read-only IDocumentView.cursor property. In addition, IDocumentView.goto can be used to execute the Edit » Go to Offset… command.
Current view's selection can be accessed using the read-only IDocumentView.selection property. The following methods may be used to control the current selection:
| Method | Description |
|---|---|
| selectAll | Select all data. |
| selectModifiedAsync | Select all modified data. |
| copySelectionRangesAsync | Copy a list of selected ranges into the Clipboard. |
| exportSelectionRangesAsync | Export a list of selected ranges to the external file. |
| saveSelectionAsync | Save current selection to a file. |
| loadSelectionAsync | Load current selection from a file. |
Clipboard methods allow the view to communicate with the Clipboard:
| Method | Description |
|---|---|
| cutAsync | Cut selected data. |
| copyAsync | Copy selected data. |
| pasteAsync | Paste data from the Clipboard. |
| clearAsync | Remove selected data. |
The following data modification methods are provided:
| Method | Description |
|---|---|
| fillAsync | Fill selection with a pattern. |
| insert | Insert pattern. |
| insertFile | Insert file. |
| insertHexAsync | Insert encoded hex file. |
| encryptAsync | Encrypt selection. |
| decryptAsync | Decrypt selection. |
| modifyBits | Modify bits. |
| gapAsync | Gap selection. |
The following methods may be used to search for a pattern in a document:
| Method | Description |
|---|---|
| findAsync | Find a pattern. |
| findRegExpAsync | Find a regular expression. |
| findNextAsync | Find next occurrence. |
| findPrevAsync | Find previous occurrence. |
| findAllAsync | Find all occurrences of a pattern. |
| findAllRegExpAsync | Find all occurrences of a regular expression. |
The following methods may be used to search and replace patterns:
| Method | Description |
|---|---|
| replaceAsync | Replace a pattern. |
| replaceRegExpAsync | Replace a regular expression. |
| replaceAllAsync | Replace all occurrences of a pattern. |
| replaceAllRegExpAsync | Replace all occurrences of a regular expression. |
The following data operations are provided:
| Method | Description |
|---|---|
| bitwiseOpAsync | Bitwise data operation. |
| arithmeticOpAsync | Arithmetic data operation. |
| shiftOpAsync | Shift data operation. |
| caseOpAsync | Case change data operation. |
| reverseOpAsync | Reverse data operation. |