function Open(const AFileName: WideString): Boolean;
Opens a file.
Result is True if file was successfully opened or False if file
was not found or other open error occured.
Pass the empty string to close the currently opened file.
|
function OpenFolder(const AFolderName: WideString): Boolean;
Opens a folder using Lister plugin.
Result is True if folder was opened using some plugin.
Pass the empty string to close the currently opened plugin
(you can also call Open('') for this).
Notes:
- Examples of Lister plugins which can show folders are VisualDirSize and IEView.
- Mode property cannot be changed while folder is opened: internal viewers cannot be used for folders.
|
procedure Reload;
Reloads the currently opened file or folder.
Note:
- This method just reassigns the old value of Mode property. As the result:
- when performed in Unicode mode, it switches between pure Unicode and Unicode/Hex modes;
- when performed in Plugins mode, it loads the next matched plugin.
|
function FindFirst_(const AText: WideString; AOptions: Integer): Boolean;
Starts text search.
AText: text to search.
AOptions: search options that are sum of flags:
- vfo_Words = 1: Search for whole words only
- vfo_Case = 2: Case-sensitive search
- vfo_Back = 4: Backward search (Note: not supported in RTF mode and for RegEx)
- vfo_RegEx = 8: RegEx search (Note: supported only in Text/Binary/Hex/Unicode modes)
- vfo_FromPage = 16: Starts search from the current page, otherwise in entire file
(Note: supported in all text modes)
- vfo_ShowAll = 32: Highlights all occurances of search string
(Note: supported in all text modes)
Result is True if text was found and highlighted.
|
function FindNext(AFindPrevious: Boolean = False): Boolean;
Continues text search.
AFindPrevious: continue search in reverse direction.
Result is the same as for FindFirst method.
Notes:
- AFindPrevious option can be used only in Text/Binary/Hex/Unicode modes
and cannot be used for RegEx search.
- After you change view mode or reload a file, you cannot continue search
immediately, you must first call FindFirst method.
|
function FindDialog(AFindNext: Boolean): Boolean;
Calls custom search dialog, specific to the current view mode or plugin.
This may be MSIE search dialog in Internet mode, or active plugin's
custom dialog.
AFindNext should be set to True for "Find next" command.
Result is True if custom dialog was successfully shown.
In this case you don't need to show your own dialog.
If Result is False, then you need to show your own dialog
and then call FindFirst / FindNext methods. |
procedure CopyToClipboard(AsHex: Boolean = False);
Copies data to Clipboard.
This method works differently in various view modes:
- Text/Binary/Hex: data is the current selection (AnsiString).
AsHex parameter may be True, in this case the hex-encoded string
(bytes in the hex form separated by spaces) will be copied.
- Unicode: data is the current selection (WideString).
- Multimedia: when an image is loaded (IsImage = True): data is the whole image.
- Internet: data is the current selection (usually HTML text).
- Plugins: data is the current selection; data type depends on plugin and
plugin is responsible for performing the copying operation.
- RTF: data is the current selection (plain or RTF text).
Note:
- This method may fail and show an error message if data size selected is too big.
|
procedure SelectAll;
procedure SelectNone;
- SelectAll: Selects all text. Works in text, Internet, Plugins modes.
- SelectNone: Deselects text. Works in text, Internet modes.
|
procedure PrintDialog;
procedure PrintSetup;
procedure PrintPreview;
- PrintDialog: Shows "Print" dialog. Works in all modes.
- PrintSetup: Shows "Page Setup" dialog. Works in all modes.
- PrintPreview: Shows "Print Preview" dialog. Works in Text/Binary/Hex/Unicode, Multimedia (IsImage = True), Internet modes.
Notes:
- PrintDialog / PrintPreview methods show preview form in text/Multimedia modes,
but only when ATPrintPreview component is used by enabling the "PREVIEW" define
in ATBinHexOptions.inc / ATViewerOptions.inc files.
- PrintSetup / PrintPreview methods show MSIE dialogs in Internet mode.
- PrintSetup does nothing in Delphi 5-6, because TPageSetupDialog is not available.
|
procedure FocusActiveControl;
Focuses the active embedded control (TATBinHex, TRichEdit, TWebBrowser etc).
Notes:
- If you have ATViewer as main form control, you should call FocusActiveControl
in your form's WM_ACTIVATE message handler to put focus back to ATViewer after some dialog
has been shown.
- See also IsFocused property.
|
procedure IncreaseScale(AIncrement: Boolean);
Increases (AIncrement = True) or decreases current font size or
image scale.
Works in text, Multimedia (IsImage = True), Internet modes.
|