All Units

Name | Description
MPHexEditor | TMPHexEditor displays and edits binary files in hexadecimal notation
MPHexEditorEx | TMPHexEditorEx, an enhanced TMPHexEditor: print and preview, ole drag and drop, ole clipboard handling, file backups...
Generated by DIPasDoc 0.8.7 on So 30. Sep 2007 17:23:21


MPHexEditor

Unit MPHexEditor

Description

TMPHexEditor displays and edits binary files in hexadecimal notation

TMPHexEditor v 09-30-2007
credits to :

- John Hamm, http://users.snapjax.com/john/

- Christophe Le Corfec for introducing the EBCDIC format and the nice idea about half byte insert/delete

- Philippe Chessa for his suggestions about AsText, AsHex and better support for the french keyboard layout

- Daniel Jensen for octal offset display and the INS-key recognition stuff

- Shmuel Zeigerman for introducing more flexible offset display formats

- Vaf, http://carradio.al.ru for reporting missing delver.inc and suggesting OnChange

- Eugene Tarasov for reporting that setting the BytesPerColumn value to 4 at design time didn't work

- FuseBurner for BytesPerUnit/RulerBytesPerUnit related suggestions

- Motzi for SyncView/ShowPositionIfNotFocused related suggestions

- Martin Hsiao for bcb compatibility and reporting some bugs when moving cursor beyond eof

- Miyu for delphi 7 defines

- Nils Hoyer for bcb testing, his help on creating a BCB6 package and standard actions support

- Skamnitsly S.V for reporting a bug when doubleclicking the ruler bar

- Pete Fraser for reporting problems with array properties under BCB

- Andrew Novikov for bug reports and suggestions

- Al for bug reports

- Dieter Köhler for reporting the delphi vcl related CanFocus bug

- Piotr Likus for reporting a cardinal<->integer related bug in the Undo method

- Marc Girod for bug reports

- Gerd Schwartz for reporting a bug with printing headers/footers that contain long texts (MPHexEditorEx only)

- Bogdan Ureche for reporting an integer overflow when moving the cursor over a large selection

- Heybirder for reporting that delphi 6 has not TStringList.ValueFromIndex property

- Magnus Flysjö for his Delphi2006 package and the updated MPDELVER.INC file

history:

  • v 09-30-2007: september 30, 2007

    - different calculation of textheight and charwidth to better support e.g. chinese unicode characters
    - When changing HexLowerCase, the ruler has not been drawn correctly

  • v 12-06-2006: december 06, 2006

    - changed SelectionChanged method, so the OnSelectionChanged event should work when the editor control is put on a TFrame component
    - added delphi2006 package
    - added AutoBytesPerRow property
    - the SelCount property is writeable now
    - standard actions support in TMPHexEditorEx

  • v 05-24-2006: may 24, 2006

    - fixed painting bug when drawing solid "secondary" cursor frames (if FocusFrame = False)
    - restored compatibility of mphexeditorex.pas with delphi 6

  • v 02-06-2006: february 06, 2006

    - changed key handling (VK_INSERT, no action if a control key is pressed)
    - fixed an access violation in CursorOverSelection when moving the cursor over a large selection
    - added conditional defines for delphi 8 and delphi 2005 in MPDELVER.INC
    - removed FastPointer property, use the GetFastPointer function instead (it checks boundaries)

  • v 05-23-2005: may 23, 2005

    - fixed an access violation in the undo storage code when reallocating memory during storing of undo data
    - the secondary focus frame on the hex pane now is painted around the whole actual data value (4 digits if unicode, 2 digits otherwise)
    - added procedure CenterCursorPosition
    - in InsertBuffer and Replace now the position parameter is checked

  • v 12-29-2004: december 29, 2004

    - initialized Result to '' in some string functions/methods to avoid non empty Result vars at function startup due to compiler optimizations (particularly on d4), e.g. printing did not work correctly under d4
    - updated some of the sample projects (fixed the broken bcb6 sample, added printing to the hex viewer and the bcb6 editor sample)

  • v 12-28-2004: december 28, 2004

    - changed the progress event calling part in Find and FindWithWildcard to avoid a division by zero error when working on files < 500 bytes

  • v 12-21-2004: december 21, 2004

    - changed PrepareFindReplaceData to avoid an exception when the string parameter is empty

  • v 11-12-2004: november 12, 2004

    - changed mouse selection in insert mode, now it's more text editor-like
    - Undo and Redo disabled when ReadOnlyView is True
    - some small other modifications

  • v 10-26-2004: october 26, 2004

    - fixed a typecasting bug in the Undo method (integer overflow)
    - added some utility functions for unsigned int64 arithmetics (AddU64, TryAddU64, SubtractU64, TrySubtractU64, MultiplyU64, TryMultiplyU64, DivideU64, TryDivideU64, ModuloU64, TryModuloU64)

  • v 08-29-2004: august 29, 2004

    - Added ActiveFieldBackground color property

  • v 08-14-2004: august 14, 2004

    - the caret was not set properly when switching from hex to char pane if no data was in the editor
    - Added MaskedChars property

  • v 06-15-2004: june 15, 2004

    - Added DrawDataPosition and IsDrawDataSelected properties
    - changes in drawing/invalidating to avoid unnecessary painting
    - OnMouseDown is now called also if offset pane or ruler are clicked
    - if BytesPerUnit is changed, the selection is reset if (SelCount mod BytesPerUnit) <> 0
    - if CaretKind is ckAuto, the caret is a bottom line if ReadOnlyView is True

  • v 06-10-2004: june 10, 2004

    - added RulerNumberBase property
    - overwritten CanFocus method due to vcl bug (see http://info.borland.com/devsupport/delphi/fixes/delphi4/vcl.html, ref 279

  • v 06-07-2004: june 07, 2004

    - fixed a crash ("Grid index out of range") when switching from unicode
    - SyncView modified to be able to synchronize the view of editors with different data sizes/layouts, also with offset
    - on changing TopRow/LeftCol the caret is repositionned
    - overwritten mouse wheel handling to allow page scrolling
    - manual handling of MaskChar property streaming due to bug reports ("Invalid Property Value")

  • v 05-30-2004: may 30, 2004

    - fixed broken CanOpenFile routine (files were always marked read-only)

  • v 05-27-2004: may 27, 2004

    - added IsMaxOffset property
    - the control gets focused when the mouse is clicked even when the mouse is over the selection

  • v 05-13-2004: may 13, 2004

    - OnDrawCell is now also called for the top left cell
    - setting UnicodeChars to False now correctly sets BytesPerUnit to 1

  • v 04-18-2004: april 18, 2004

    - parameters aBuffer and bBuffer were interchanged in the CopyMemory call in TranslateBufferFromAnsi
    - GetOffsetString can now be called in OnGetOffsetText without crashing (infinite recursion = stack overflow)

  • v 01-08-2004: january 08, 2004

    - added some explicit pointer typecasts for {$T+} compatibility
    - removed FindTable and FindTableI properties under BCB (doesn't compile)

  • v 12-16-2003: december 16, 2003

    - Setting the DataSize property is now undoable
    - Added the public SetDataSizeFillByte property to be able to control what byte is used to enlarge the data
    - Now checking NoSizeChange before allowing to set DataSize
    - CreateUndo is no longer a function, but a procedure. Now an exception is raised when no undo record can be created

  • v 12-10-2003: december 10, 2003

    - Renamed OnLoadSaveProgress to OnProgress
    - Added property FindProgress
    - Added custom find methods (OnFind, OnWildcardFind
    - Find and FindWithWildcard speeded up by using precompiled character tables
    - Find and FindWithWildcard now also fire the OnProgress event if FindProgress is set to true
    - fixed a bug in mouse handling (weird selection or line offsets when doublecklicking ruler bar/offset panel)
    - modified selectioncode to better support double byte selection (unicode)

  • v 09-24-2003: september 24, 2003

    - modified the BCB6 package

  • v 09-09-2003: september 09, 2003

    - changed some constants, classes and types from MPTH... to MPH...
    - changed MPHCustTransFieldFrom/To to MPHCustomCharConv
    - BytesPerBlock and SeparateBlocksInCharField properties added
    - DataSize property is writeable now
    - Page down key now also reaches the last row
    - added OnGetOffsetText property
    - added AddSelectionUndo procedure
    - added defines for delphi7, renamed delver.inc to mpdelver.inc
    - added wildcard search (FindWithWildcard)
    - added SeekToEOF
    - changed keyboard handling, so OnKeyDown should work better
    - added GotoBookmark method to set cursor to a bookmarked position
    - added OnBookmarkChanged property
    - support for unsigned int64 radix conversions
    - Replace method added

  • v 07-05-2003: july 05, 2003

    - better handling of odd sized files when BytesPerUnit <> 1
    - added support for pasting clipboard data in fixed filesize mode in TMPHexEditorEx
    - added RegEdit_HexData clipboard support in TMPHexEditorEx

  • v 05-25-2003-b: may 25, 2003

    - fixed a bug (moving the cursor beyond eof)

  • v 05-25-2003: may 25, 2003

    - added some kind of ownerdraw (see OnDrawCell)

  • v 05-20-2003: may 20, 2003

    - renamed, added and changed some methods, classes and properties
    - fixed some bugs in the ruler display (e.g. when BytesPerRow is changed)
    - fixed some bugs when BytesPerUnit <> 1
    - added some unicode support (UnicodeChars and UnicodeBigEndian)
    - fixed some half byte (nibble) related bugs

  • v 05-17-2003: may 17, 2003

    - added DisplayStart and DisplayEnd functions to retrieve the data bounds currently displayed
    - added BytesPerUnit and RulerBytesPerUnit properties to treat words/dwords/qwords as a unit
    - added SyncView procedure and OnSelectionChanged property to synchronize position and selection with another editor
    - added ShowPositionIfNotFocused property to show the current position if the editor is not focused

  • v 10-25-2002: october 25, 2002

    - corrected the BytesPerColumn default value

  • v 08-18-2002: august 18, 2002

    - modified painting and selection
    - implemented an additional ruler bar at the top
    - new properties: ShowRuler, DrawGutter3D

  • v 08-12-2002: august 12, 2002

    - modified Changed calls to get correct Modified property in OnChange handler

  • v 08-09-2002: august 09, 2002

    - included missing include file delver.inc
    - added OnChange event

  • v 07-21-2002: july 21, 2002

    too many changes to mention here (completely rewritten, basic and advanced versions TMPHexEditor and TMPHexEditorEx), plz read the documentation included with this package for more information

Classes, Interfaces and Objects

Name | Description
Class EMPHexEditor |
Class TCustomMPHexEditor |
Class TMPHColors |
Class TMPHexEditor |

Functions and Procedures

Overview

function AddU64(const Addend1, Addend2: int64): int64;
function CheckRadixToInt(Value: string): integer;
function CheckRadixToInt64(Value: string): int64;
function ConvertBinToHex(aFrom, aTo: PChar; const aCount: integer; const SwapNibbles: boolean): PChar;
function ConvertHexToBin(aFrom, aTo: PChar; const aCount: integer; const SwapNibbles: boolean; var BytesTranslated: integer): PChar;
function DivideU64(const Dividend, Divisor: int64): int64;
function GetTempName: string;
function GridCoord(aX, aY: longint): TGridCoord;
function IntToOctal(const Value: integer): string;
function IntToRadix(Value: integer; Radix: byte): string;
function IntToRadix64(Value: int64; Radix: byte): string;
function IntToRadixLen(Value: integer; Radix, Len: byte): string;
function IntToRadixLen64(Value: int64; Radix, Len: byte): string;
function IsKeyDown(aKey: integer): boolean;
function Max(a1, a2: integer): integer;
function Min(a1, a2: integer): integer;
function ModuloU64(const Dividend, Divisor: int64): int64;
function MultiplyU64(const Multiplier, Multiplicator: int64): int64;
function OctalToInt(const Value: string): integer;
function RadixToInt(Value: string; Radix: byte): integer;
function RadixToInt64(Value: string; Radix: byte): int64;
function SubtractU64(const Minuend, Subtrahend: int64): int64;
procedure SwapWideChar(var WChar: WideChar);
procedure TranslateBufferFromAnsi(const TType: TMPHTranslationKind; aBuffer, bBuffer: PChar; const aCount: integer);
procedure TranslateBufferToAnsi(const TType: TMPHTranslationKind; aBuffer, bBuffer: PChar; const aCount: integer);
function TryAddU64(const Addend1, Addend2: int64; var Val: int64): boolean;
function TryDivideU64(const Dividend, Divisor: int64; var Val: int64): boolean;
function TryModuloU64(const Dividend, Divisor: int64; var Val: int64): boolean;
function TryMultiplyU64(const Multiplier, Multiplicator: int64; var Val: int64): boolean;
function TrySubtractU64(const Minuend, Subtrahend: int64; var Val: int64): boolean;

Description

function AddU64(const Addend1, Addend2: int64): int64;

addition of two unsigned int64 values, may raise an exception on error

function CheckRadixToInt(Value: string): integer;

try to find the correct radix (based on prefix/suffix) and return the number, known prefixes/suffixes are:
0x<number>, 0X<number>, $<number>, <number>h, <number>H: radix 16
o<number>, O<number>, 0<number>, <number>o, <number>O: radix 8
%<number>, <number>%: radix 2
otherwise: radix 10

function CheckRadixToInt64(Value: string): int64;

function ConvertBinToHex(aFrom, aTo: PChar; const aCount: integer; const SwapNibbles: boolean): PChar;

translate binary data to its hex representation (see ConvertHexToBin), (see SwapNibbles for the meaning of the SwapNibbles value)

function ConvertHexToBin(aFrom, aTo: PChar; const aCount: integer; const SwapNibbles: boolean; var BytesTranslated: integer): PChar;

translate a hexadecimal data representation ("a000 cc45 d3 42"...) to binary data (see SwapNibbles for the meaning of the SwapNibbles value)

function DivideU64(const Dividend, Divisor: int64): int64;

division of two unsigned int64 values, may raise an exception on error

function GetTempName: string;

get a unique filename in the temporary directory

function GridCoord(aX, aY: longint): TGridCoord;

convert X and Y into a TGridCoord record

function IntToOctal(const Value: integer): string;

translate an integer to an octal string (see also IntToRadix)

function IntToRadix(Value: integer; Radix: byte): string;

translate an integer to a radix (base) coded string, e.g.
- IntToRadix(100,16) converts into a hexadecimal (number) string
- IntToRadix(100,2) converts into a string consisting only of 0 and 1
- IntToRadix(100,8) means IntToOctal

hint: Radix must be in the range of 2..16

function IntToRadix64(Value: int64; Radix: byte): string;

function IntToRadixLen(Value: integer; Radix, Len: byte): string;

translate an integer to a radix coded string and left fill with 0 (see also IntToRadix)

function IntToRadixLen64(Value: int64; Radix, Len: byte): string;

function IsKeyDown(aKey: integer): boolean;

check whether the given key (VK_...) is currently down

function Max(a1, a2: integer): integer;

returns the higer of the two numbers

function Min(a1, a2: integer): integer;

returns the lower of the two numbers

function ModuloU64(const Dividend, Divisor: int64): int64;

modulo of two unsigned int64 values, may raise an exception on error

function MultiplyU64(const Multiplier, Multiplicator: int64): int64;

multiplication of two unsigned int64 values, may raise an exception on error

function OctalToInt(const Value: string): integer;

translate an number string built on radix 8 into an integer (see also RadixToInt)

function RadixToInt(Value: string; Radix: byte): integer;

translate a radix coded number string into an integer, e.g.
- RadixToInt('0f', 16) => 15
- RadixToInt('755', 8) => 493

function RadixToInt64(Value: string; Radix: byte): int64;

function SubtractU64(const Minuend, Subtrahend: int64): int64;

subtraction of two unsigned int64 values, may raise an exception on error

procedure SwapWideChar(var WChar: WideChar);

swap lo and high byte of a widechar

procedure TranslateBufferFromAnsi(const TType: TMPHTranslationKind; aBuffer, bBuffer: PChar; const aCount: integer);

translate data from Ansi to a different character set (see also TMPHTranslationKind)
- TType: translate to this character set
- aBuffer: pointer to source data
- bBuffer: pointer to target data, must be allocated (may equal to aBuffer)
- aCount: number of bytes to translate

procedure TranslateBufferToAnsi(const TType: TMPHTranslationKind; aBuffer, bBuffer: PChar; const aCount: integer);

translate data from a different character set to Ansi (see also TranslateBufferFromAnsi)

function TryAddU64(const Addend1, Addend2: int64; var Val: int64): boolean;

addition of two unsigned int64 values, returns false if an error occurred

function TryDivideU64(const Dividend, Divisor: int64; var Val: int64): boolean;

division of two unsigned int64 values, returns false if an error occurred

function TryModuloU64(const Dividend, Divisor: int64; var Val: int64): boolean;

modulo of two unsigned int64 values, returns false if an error occurred

function TryMultiplyU64(const Multiplier, Multiplicator: int64; var Val: int64): boolean;

multiplication of two unsigned int64 values, returns false if an error occurred

function TrySubtractU64(const Minuend, Subtrahend: int64; var Val: int64): boolean;

subtraction of two unsigned int64 values, returns false if an error occurred

Types

Overview

PMPHFindTable = ^TMPHFindTable
TMPHBookmark = record mPosition: integer; mInCharField: boolean; end
TMPHBookmarks = array[0..9] of TMPHBookmark
TMPHCharConv = array[TMPHCharConvType] of TMPHCharConvTable
TMPHCharConvTable = array[0..255] of Char
TMPHDrawCellEvent = procedure(Sender: TObject; ACanvas: TCanvas; ACol, ARow: Integer; var AWideText: WideString; ARect: TRect; var ADefaultDraw: Boolean) of object
TMPHFindEvent = procedure(Sender: TObject; const Pattern: PChar; const PatLength: integer; const SearchFrom, SearchUntil: integer; const IgnoreCase: boolean; const Wildcard: Char; var FoundPos: Integer) of object
TMPHFindTable = array[#0..#255] of Char
TMPHGetOffsetTextEvent = procedure(Sender: TObject; const Number: int64; var OffsetText: string) of object
TMPHOffsetFormat = record Format: string; Prefix, Suffix: string; MinWidth: integer; Flags: TMPHOffsetFormatFlags; Radix, _BytesPerUnit: byte; end
TMPHOffsetFormatFlags = set of TMPHOffsetFormatFlag
TMPHProgressEvent = procedure(Sender: TObject; const ProgressType: TMPHProgressKind; const aName: TFileName; const Percent: byte; var Cancel: boolean) of object
TMPHUndoFlags = set of TMPHUndoFlag

Description

PMPHFindTable = ^TMPHFindTable

precompiled converted character table types for faster data search

TMPHBookmark = record mPosition: integer; mInCharField: boolean; end

bookmark record:
defined by pressing SHIFT+CTRL+[0..9], goto bookmark by pressing CTRL+[0..9]

- mPosition: file position
- mInCharField: cursor in character pane (True) or hex number pane

TMPHBookmarks = array[0..9] of TMPHBookmark

array of bookmarks, representing keys 0..9

TMPHCharConv = array[TMPHCharConvType] of TMPHCharConvTable

character conversion data storage

TMPHCharConvTable = array[0..255] of Char

character conversion table

TMPHDrawCellEvent = procedure(Sender: TObject; ACanvas: TCanvas; ACol, ARow: Integer; var AWideText: WideString; ARect: TRect; var ADefaultDraw: Boolean) of object

owner draw event type. parameters:

- Sender: the hex editor
- ACanvas: the editor's canvas
- ACol, ARow: the position to be drawn
- AWideText: the text to be drawn
- ARect: the cell rectangle
- ADefaultDraw: if set to True (default), default drawing isperformed after the event handler returns. if set to false, the event handler must do all cell painting.

TMPHFindEvent = procedure(Sender: TObject; const Pattern: PChar; const PatLength: integer; const SearchFrom, SearchUntil: integer; const IgnoreCase: boolean; const Wildcard: Char; var FoundPos: Integer) of object

handler for custom search routines

- Pattern: the data to find - PatLength: length of the data to find - SearchFrom: first search position - SearchUntil: last search position - IgnoreCase: case sensitive? - Wilcard: Wildcard character (only used by FindWithWildcard) - FoundPos: result, set to -1 if data was not found

TMPHFindTable = array[#0..#255] of Char

TMPHGetOffsetTextEvent = procedure(Sender: TObject; const Number: int64; var OffsetText: string) of object

retrieve the "line number" to display by the application

- Number: the number to convert to text - OffsetText: the resulting text output

TMPHOffsetFormat = record Format: string; Prefix, Suffix: string; MinWidth: integer; Flags: TMPHOffsetFormatFlags; Radix, _BytesPerUnit: byte; end

offset format record

TMPHOffsetFormatFlags = set of TMPHOffsetFormatFlag

set of the above flags

TMPHProgressEvent = procedure(Sender: TObject; const ProgressType: TMPHProgressKind; const aName: TFileName; const Percent: byte; var Cancel: boolean) of object

progress event handler, used in OnProgress

- ProgressType: am i loading or saving? (see TMPHProgressKind)
- aName: name of file to be load from/saved to
- Percent: current progress (0..100)
- Cancel: if set to true, the load/save procedure will abort (no meaning in Find* methods)

TMPHUndoFlags = set of TMPHUndoFlag

set of undo flags

Enumerations

TMPHCaretKind
look of the editor's caret: - ckFull: full block - ckLeft: left line - ckBottom: bottom line - ckAuto: left line if InsertMode, full block if overwrite, bottom line if ReadOnlyView
 | ckFull
 | ckLeft
 | ckBottom
 | ckAuto
TMPHCharConvType
character conversion type
 | cctFromAnsi
 | cctToAnsi
TMPHOffsetFormatFlag
offset format flags
 | offCalcWidth |
 | offCalcRow | calculate minwidth depending on data size (width field = '-')
 | offCalcColumn | calculate _BytesPerUnit depending on bytes per row (=real line numbers)
 | offBytesPerUnit | " bytes per column (= column numbers)
TMPHProgressKind
action indicator used in OnProgress event handler: - pkLoad: loading data - pkSave: saving data - pkFind: finding
 | pkLoad
 | pkSave
 | pkFind
TMPHTranslationKind
how to show a file's content in the character pane of the editor: - tkAsIs: leave as is (current windows code page) - tkDos8: current dos codepage - tkASCII: 7 bit ascii - tkMac: macintosh charset (translation always from/to ms cp 1252 (ms latin1)!! - tkBCD: ibm ebcdic codepage 38 (translation always from/to ms cp 1252 (ms latin1)!! - tkCustom: custom codepage stored in MPHCustomCharConv
 | tkAsIs
 | tkDos8
 | tkASCII
 | tkMac
 | tkBCD
 | tkCustom
TMPHUndoFlag
flags internally used in the undo storage
 | ufKindBytesChanged | kind of undo storage
 | ufKindByteRemoved |
 | ufKindInsertBuffer |
 | ufKindReplace |
 | ufKindAppendBuffer |
 | ufKindNibbleInsert |
 | ufKindNibbleDelete |
 | ufKindConvert |
 | ufKindSelection |
 | ufKindCombined | store a selection
 | ufKindAllData |
 | ufFlagByte1Changed | additional information
 | ufFlagByte2Changed |
 | ufFlagModified |
 | ufFlag2ndByteCol |
 | ufFlagInCharField |
 | ufFlagHasSelection |
 | ufFlagInsertMode |
 | ufFlagIsUnicode |
 | ufFlagIsUnicodeBigEndian |
 | ufFlagHasDescription |

Constants

Overview

CM_INTUPDATECARET = CM_BASE + $100
CM_SELECTIONCHANGED = CM_BASE + $101
MPHOffsetDec = 'a:|'
MPHOffsetHex = '-!10:0x|'
MPHOffsetOct = '0!8:o|'
MPHTranslationDesc : array[TMPHTranslationKind] of string = (MPH_TK_ASIS, MPH_TK_DOS8, MPH_TK_ASCII7, MPH_TK_MAC, MPH_TK_BCD38, MPH_TK_CUSTOM)
MPHTranslationDescShort : array[TMPHTranslationKind] of string = (MPH_TK_ASIS_S, MPH_TK_DOS8_S, MPH_TK_ASCII7_S, MPH_TK_MAC_S, MPH_TK_BCD38_S, MPH_TK_CUSTOM_S)
MPH_CCONV_BCD38 : TMPHCharConv = ( (#$00, #$01, #$02, #$03, #$37, #$2D, #$2E, #$2F, #$16, #$05, #$25, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$3C, #$3D, #$32, #$26, #$18, #$19, #$3F, #$27, #$1C, #$1D, #$1E, #$1F, #$40, #$4F, #$7F, #$7B, #$5B, #$6C, #$50, #$7D, #$4D, #$5D, #$5C, #$4E, #$6B, #$60, #$4B, #$61, #$F0, #$F1, #$F2, #$F3, #$F4, #$F5, #$F6, #$F7, #$F8, #$F9, #$7A, #$5E, #$4C, #$7E, #$6E, #$6F, #$7C, #$C1, #$C2, #$C3, #$C4, #$C5, #$C6, #$C7, #$C8, #$C9, #$D1, #$D2, #$D3, #$D4, #$D5, #$D6, #$D7, #$D8, #$D9, #$E2, #$E3, #$E4, #$E5, #$E6, #$E7, #$E8, #$E9, #$4A, #$E0, #$5A, #$5F, #$6D, #$79, #$81, #$82, #$83, #$84, #$85, #$86, #$87, #$88, #$89, #$91, #$92, #$93, #$94, #$95, #$96, #$97, #$98, #$99, #$A2, #$A3, #$A4, #$A5, #$A6, #$A7, #$A8, #$A9, #$C0, #$20, #$D0, #$A1, #$07, #$80, #$22, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$8A, #$8B, #$8C, #$8D, #$8E, #$8F, #$90, #$77, #$2C, #$0A, #$3B, #$3E, #$1A, #$70, #$71, #$72, #$9A, #$9B, #$9C, #$9D, #$9E, #$9F, #$A0, #$15, #$73, #$74, #$75, #$76, #$6A, #$78, #$09, #$3A, #$AA, #$AB, #$AC, #$AD, #$AE, #$AF, #$B0, #$B1, #$B2, #$B3, #$B4, #$B5, #$B6, #$B7, #$B8, #$B9, #$BA, #$BB, #$BC, #$BD, #$BE, #$BF, #$23, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$CA, #$CB, #$CC, #$CD, #$CE, #$CF, #$1B, #$24, #$06, #$14, #$28, #$2B, #$21, #$17, #$51, #$52, #$DA, #$DB, #$DC, #$DD, #$DE, #$DF, #$2A, #$E1, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$29, #$EA, #$EB, #$EC, #$ED, #$EE, #$EF, #$30, #$31, #$08, #$33, #$34, #$35, #$36, #$04, #$38, #$39, #$FA, #$FB, #$FC, #$FD, #$FE, #$FF ), (#$00, #$01, #$02, #$03, #$F7, #$09, #$D2, #$7F, #$F2, #$A8, #$93, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$D3, #$A1, #$08, #$D7, #$18, #$19, #$96, #$D0, #$1C, #$1D, #$1E, #$1F, #$7C, #$D6, #$81, #$C0, #$D1, #$0A, #$17, #$1B, #$D4, #$E9, #$E0, #$D5, #$92, #$05, #$06, #$07, #$F0, #$F1, #$16, #$F3, #$F4, #$F5, #$F6, #$04, #$F8, #$F9, #$A9, #$94, #$14, #$15, #$95, #$1A, #$20, #$C1, #$C2, #$C3, #$C4, #$C5, #$C6, #$C7, #$C8, #$C9, #$5B, #$2E, #$3C, #$28, #$2B, #$21, #$26, #$D8, #$D9, #$E2, #$E3, #$E4, #$E5, #$E6, #$E7, #$E8, #$5D, #$24, #$2A, #$29, #$3B, #$5E, #$2D, #$2F, #$82, #$83, #$84, #$85, #$86, #$87, #$88, #$89, #$A6, #$2C, #$25, #$5F, #$3E, #$3F, #$97, #$98, #$99, #$A2, #$A3, #$A4, #$A5, #$91, #$A7, #$60, #$3A, #$23, #$40, #$27, #$3D, #$22, #$80, #$61, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$8A, #$8B, #$8C, #$8D, #$8E, #$8F, #$90, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, #$70, #$71, #$72, #$9A, #$9B, #$9C, #$9D, #$9E, #$9F, #$A0, #$7E, #$73, #$74, #$75, #$76, #$77, #$78, #$79, #$7A, #$AA, #$AB, #$AC, #$AD, #$AE, #$AF, #$B0, #$B1, #$B2, #$B3, #$B4, #$B5, #$B6, #$B7, #$B8, #$B9, #$BA, #$BB, #$BC, #$BD, #$BE, #$BF, #$7B, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$CA, #$CB, #$CC, #$CD, #$CE, #$CF, #$7D, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, #$50, #$51, #$52, #$DA, #$DB, #$DC, #$DD, #$DE, #$DF, #$5C, #$E1, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$5A, #$EA, #$EB, #$EC, #$ED, #$EE, #$EF, #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, #$38, #$39, #$FA, #$FB, #$FC, #$FD, #$FE, #$FF ) )
MPH_CCONV_MAC : TMPHCharConv = ( (#$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, #$C4, #$C5, #$AB, #$C9, #$D1, #$F7, #$DC, #$E1, #$E0, #$E2, #$E4, #$E3, #$AC, #$B0, #$AA, #$F8, #$D5, #$CE, #$C3, #$CF, #$D3, #$D4, #$D2, #$DB, #$DA, #$DD, #$F6, #$F5, #$FA, #$F9, #$FB, #$FC, #$A0, #$C1, #$A2, #$A3, #$DF, #$B4, #$B6, #$A4, #$C6, #$A9, #$BB, #$C7, #$C2, #$AD, #$A8, #$FF, #$A1, #$B1, #$B2, #$B3, #$A5, #$B5, #$A6, #$B7, #$B8, #$B9, #$BC, #$C8, #$BA, #$BD, #$CA, #$C0, #$CB, #$E7, #$E5, #$CC, #$80, #$81, #$AE, #$82, #$E9, #$83, #$E6, #$E8, #$ED, #$EA, #$EB, #$EC, #$D0, #$84, #$F1, #$EE, #$EF, #$CD, #$85, #$D7, #$AF, #$F4, #$F2, #$F3, #$86, #$D9, #$DE, #$A7, #$88, #$87, #$89, #$8B, #$8A, #$8C, #$BE, #$8D, #$8F, #$8E, #$90, #$91, #$93, #$92, #$94, #$95, #$F0, #$96, #$98, #$97, #$99, #$9B, #$9A, #$D6, #$BF, #$9D, #$9C, #$9E, #$9F, #$FD, #$FE, #$D8 ), (#$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, #$C4, #$C5, #$C7, #$C9, #$D1, #$D6, #$DC, #$E1, #$E0, #$E2, #$E4, #$E3, #$E5, #$E7, #$E9, #$E8, #$EA, #$EB, #$ED, #$EC, #$EE, #$EF, #$F1, #$F3, #$F2, #$F4, #$F6, #$F5, #$FA, #$F9, #$FB, #$FC, #$A0, #$B0, #$A2, #$A3, #$A7, #$B4, #$B6, #$DF, #$AE, #$A9, #$8E, #$82, #$8C, #$AD, #$C6, #$D8, #$8D, #$B1, #$B2, #$B3, #$A5, #$B5, #$A6, #$B7, #$B8, #$B9, #$BC, #$AA, #$BA, #$BD, #$E6, #$F8, #$BF, #$A1, #$AC, #$92, #$80, #$81, #$A8, #$AB, #$BB, #$83, #$BE, #$C0, #$C3, #$D5, #$91, #$93, #$D0, #$84, #$96, #$94, #$95, #$90, #$F7, #$D7, #$FF, #$DD, #$98, #$97, #$86, #$99, #$DE, #$A4, #$88, #$87, #$89, #$8B, #$8A, #$C2, #$CA, #$C1, #$CB, #$C8, #$CD, #$CE, #$CF, #$CC, #$D3, #$D4, #$F0, #$D2, #$DA, #$DB, #$D9, #$9B, #$9A, #$85, #$8F, #$9D, #$9C, #$9E, #$9F, #$FD, #$FE, #$AF ) )
MPH_FILEIO_BLOCKSIZE = $F000
MPH_TK_ASCII7 = 'ASCII 7 bits'
MPH_TK_ASCII7_S = 'ASC'
MPH_TK_ASIS = 'Windows'
MPH_TK_ASIS_S = 'WIN'
MPH_TK_BCD38 = 'EBCDIC codepage 38'
MPH_TK_BCD38_S = 'BCD'
MPH_TK_CUSTOM = 'Custom translation'
MPH_TK_CUSTOM_S = 'Cust'
MPH_TK_DOS8 = 'Dos 8 bits'
MPH_TK_DOS8_S = 'DOS'
MPH_TK_MAC = 'Macintosh'
MPH_TK_MAC_S = 'MAC'
MPH_UC = 'Unicode little endian'
MPH_UC_BE = 'Unicode big endian'
MPH_UC_BE_S = 'UCBE'
MPH_UC_S = 'UCLE'

Description

CM_INTUPDATECARET = CM_BASE + $100

this message is posted to the hex editor when it should update the caret position

CM_SELECTIONCHANGED = CM_BASE + $101

this message is posted when an OnSelectionChange event is to be fired

MPHOffsetDec = 'a:|'

standard offset format: decimal

MPHOffsetHex = '-!10:0x|'

standard offset format: hex, auto min width, prefixed by 0x

MPHOffsetOct = '0!8:o|'

standard offset format: octal, suffixed by a small "o"

MPHTranslationDesc : array[TMPHTranslationKind] of string = (MPH_TK_ASIS, MPH_TK_DOS8, MPH_TK_ASCII7, MPH_TK_MAC, MPH_TK_BCD38, MPH_TK_CUSTOM)

long descriptions of the different translations (e.g. for menues)

MPHTranslationDescShort : array[TMPHTranslationKind] of string = (MPH_TK_ASIS_S, MPH_TK_DOS8_S, MPH_TK_ASCII7_S, MPH_TK_MAC_S, MPH_TK_BCD38_S, MPH_TK_CUSTOM_S)

short descriptions of the different translations (e.g. for status bars)

MPH_CCONV_BCD38 : TMPHCharConv = ( (#$00, #$01, #$02, #$03, #$37, #$2D, #$2E, #$2F, #$16, #$05, #$25, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$3C, #$3D, #$32, #$26, #$18, #$19, #$3F, #$27, #$1C, #$1D, #$1E, #$1F, #$40, #$4F, #$7F, #$7B, #$5B, #$6C, #$50, #$7D, #$4D, #$5D, #$5C, #$4E, #$6B, #$60, #$4B, #$61, #$F0, #$F1, #$F2, #$F3, #$F4, #$F5, #$F6, #$F7, #$F8, #$F9, #$7A, #$5E, #$4C, #$7E, #$6E, #$6F, #$7C, #$C1, #$C2, #$C3, #$C4, #$C5, #$C6, #$C7, #$C8, #$C9, #$D1, #$D2, #$D3, #$D4, #$D5, #$D6, #$D7, #$D8, #$D9, #$E2, #$E3, #$E4, #$E5, #$E6, #$E7, #$E8, #$E9, #$4A, #$E0, #$5A, #$5F, #$6D, #$79, #$81, #$82, #$83, #$84, #$85, #$86, #$87, #$88, #$89, #$91, #$92, #$93, #$94, #$95, #$96, #$97, #$98, #$99, #$A2, #$A3, #$A4, #$A5, #$A6, #$A7, #$A8, #$A9, #$C0, #$20, #$D0, #$A1, #$07, #$80, #$22, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$8A, #$8B, #$8C, #$8D, #$8E, #$8F, #$90, #$77, #$2C, #$0A, #$3B, #$3E, #$1A, #$70, #$71, #$72, #$9A, #$9B, #$9C, #$9D, #$9E, #$9F, #$A0, #$15, #$73, #$74, #$75, #$76, #$6A, #$78, #$09, #$3A, #$AA, #$AB, #$AC, #$AD, #$AE, #$AF, #$B0, #$B1, #$B2, #$B3, #$B4, #$B5, #$B6, #$B7, #$B8, #$B9, #$BA, #$BB, #$BC, #$BD, #$BE, #$BF, #$23, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$CA, #$CB, #$CC, #$CD, #$CE, #$CF, #$1B, #$24, #$06, #$14, #$28, #$2B, #$21, #$17, #$51, #$52, #$DA, #$DB, #$DC, #$DD, #$DE, #$DF, #$2A, #$E1, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$29, #$EA, #$EB, #$EC, #$ED, #$EE, #$EF, #$30, #$31, #$08, #$33, #$34, #$35, #$36, #$04, #$38, #$39, #$FA, #$FB, #$FC, #$FD, #$FE, #$FF ), (#$00, #$01, #$02, #$03, #$F7, #$09, #$D2, #$7F, #$F2, #$A8, #$93, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$D3, #$A1, #$08, #$D7, #$18, #$19, #$96, #$D0, #$1C, #$1D, #$1E, #$1F, #$7C, #$D6, #$81, #$C0, #$D1, #$0A, #$17, #$1B, #$D4, #$E9, #$E0, #$D5, #$92, #$05, #$06, #$07, #$F0, #$F1, #$16, #$F3, #$F4, #$F5, #$F6, #$04, #$F8, #$F9, #$A9, #$94, #$14, #$15, #$95, #$1A, #$20, #$C1, #$C2, #$C3, #$C4, #$C5, #$C6, #$C7, #$C8, #$C9, #$5B, #$2E, #$3C, #$28, #$2B, #$21, #$26, #$D8, #$D9, #$E2, #$E3, #$E4, #$E5, #$E6, #$E7, #$E8, #$5D, #$24, #$2A, #$29, #$3B, #$5E, #$2D, #$2F, #$82, #$83, #$84, #$85, #$86, #$87, #$88, #$89, #$A6, #$2C, #$25, #$5F, #$3E, #$3F, #$97, #$98, #$99, #$A2, #$A3, #$A4, #$A5, #$91, #$A7, #$60, #$3A, #$23, #$40, #$27, #$3D, #$22, #$80, #$61, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$8A, #$8B, #$8C, #$8D, #$8E, #$8F, #$90, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, #$70, #$71, #$72, #$9A, #$9B, #$9C, #$9D, #$9E, #$9F, #$A0, #$7E, #$73, #$74, #$75, #$76, #$77, #$78, #$79, #$7A, #$AA, #$AB, #$AC, #$AD, #$AE, #$AF, #$B0, #$B1, #$B2, #$B3, #$B4, #$B5, #$B6, #$B7, #$B8, #$B9, #$BA, #$BB, #$BC, #$BD, #$BE, #$BF, #$7B, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$CA, #$CB, #$CC, #$CD, #$CE, #$CF, #$7D, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, #$50, #$51, #$52, #$DA, #$DB, #$DC, #$DD, #$DE, #$DF, #$5C, #$E1, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$5A, #$EA, #$EB, #$EC, #$ED, #$EE, #$EF, #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, #$38, #$39, #$FA, #$FB, #$FC, #$FD, #$FE, #$FF ) )

ebcdic cp38..ms ansi conversion

MPH_CCONV_MAC : TMPHCharConv = ( (#$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, #$C4, #$C5, #$AB, #$C9, #$D1, #$F7, #$DC, #$E1, #$E0, #$E2, #$E4, #$E3, #$AC, #$B0, #$AA, #$F8, #$D5, #$CE, #$C3, #$CF, #$D3, #$D4, #$D2, #$DB, #$DA, #$DD, #$F6, #$F5, #$FA, #$F9, #$FB, #$FC, #$A0, #$C1, #$A2, #$A3, #$DF, #$B4, #$B6, #$A4, #$C6, #$A9, #$BB, #$C7, #$C2, #$AD, #$A8, #$FF, #$A1, #$B1, #$B2, #$B3, #$A5, #$B5, #$A6, #$B7, #$B8, #$B9, #$BC, #$C8, #$BA, #$BD, #$CA, #$C0, #$CB, #$E7, #$E5, #$CC, #$80, #$81, #$AE, #$82, #$E9, #$83, #$E6, #$E8, #$ED, #$EA, #$EB, #$EC, #$D0, #$84, #$F1, #$EE, #$EF, #$CD, #$85, #$D7, #$AF, #$F4, #$F2, #$F3, #$86, #$D9, #$DE, #$A7, #$88, #$87, #$89, #$8B, #$8A, #$8C, #$BE, #$8D, #$8F, #$8E, #$90, #$91, #$93, #$92, #$94, #$95, #$F0, #$96, #$98, #$97, #$99, #$9B, #$9A, #$D6, #$BF, #$9D, #$9C, #$9E, #$9F, #$FD, #$FE, #$D8 ), (#$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, #$C4, #$C5, #$C7, #$C9, #$D1, #$D6, #$DC, #$E1, #$E0, #$E2, #$E4, #$E3, #$E5, #$E7, #$E9, #$E8, #$EA, #$EB, #$ED, #$EC, #$EE, #$EF, #$F1, #$F3, #$F2, #$F4, #$F6, #$F5, #$FA, #$F9, #$FB, #$FC, #$A0, #$B0, #$A2, #$A3, #$A7, #$B4, #$B6, #$DF, #$AE, #$A9, #$8E, #$82, #$8C, #$AD, #$C6, #$D8, #$8D, #$B1, #$B2, #$B3, #$A5, #$B5, #$A6, #$B7, #$B8, #$B9, #$BC, #$AA, #$BA, #$BD, #$E6, #$F8, #$BF, #$A1, #$AC, #$92, #$80, #$81, #$A8, #$AB, #$BB, #$83, #$BE, #$C0, #$C3, #$D5, #$91, #$93, #$D0, #$84, #$96, #$94, #$95, #$90, #$F7, #$D7, #$FF, #$DD, #$98, #$97, #$86, #$99, #$DE, #$A4, #$88, #$87, #$89, #$8B, #$8A, #$C2, #$CA, #$C1, #$CB, #$C8, #$CD, #$CE, #$CF, #$CC, #$D3, #$D4, #$F0, #$D2, #$DA, #$DB, #$D9, #$9B, #$9A, #$85, #$8F, #$9D, #$9C, #$9E, #$9F, #$FD, #$FE, #$AF ) )

macintosh..ms ansi conversion

MPH_FILEIO_BLOCKSIZE = $F000

block size in file i/o

MPH_TK_ASCII7 = 'ASCII 7 bits'

tkASCII

MPH_TK_ASCII7_S = 'ASC'

tkASCII

MPH_TK_ASIS = 'Windows'

tkAsIs

MPH_TK_ASIS_S = 'WIN'

tkAsIs

MPH_TK_BCD38 = 'EBCDIC codepage 38'

tkBCD

MPH_TK_BCD38_S = 'BCD'

tkBCD

MPH_TK_CUSTOM = 'Custom translation'

tkCustom

MPH_TK_CUSTOM_S = 'Cust'

tkCustom

MPH_TK_DOS8 = 'Dos 8 bits'

tkDos8

MPH_TK_DOS8_S = 'DOS'

tkDos8

MPH_TK_MAC = 'Macintosh'

tkMac

MPH_TK_MAC_S = 'MAC'

tkMac

MPH_UC = 'Unicode little endian'

unicode

MPH_UC_BE = 'Unicode big endian'

unicode be

MPH_UC_BE_S = 'UCBE'

unicode be

MPH_UC_S = 'UCLE'

unicode

Variables

Overview

MPHCustomCharConv: TMPHCharConv

Description

MPHCustomCharConv: TMPHCharConv

this character conversion is used in translations from tkAsIs to tkCustom (see TMPHTranslationKind)

Author

(C) markus stephany, vcl[at]mirkes[dot]de, all rights reserved.

Last Modified

09-30-2007

Generated by DIPasDoc 0.8.7 on So 30. Sep 2007 17:23:20


MPHexEditor: Class EMPHexEditor

Class EMPHexEditor

Unit

MPHexEditor

Declaration

type EMPHexEditor = class(Exception)

Description

custom Exception class


MPHexEditor: Class TCustomMPHexEditor

Class TCustomMPHexEditor

Unit

MPHexEditor

Declaration

type TCustomMPHexEditor = class(TCustomGrid)

Description

protected ancestor of the hex editor components

Methods

Overview

Public | procedure AddSelectionUndo(const AStart, ACount: integer);
Protected | procedure AdjustMetrics;
Public | procedure AppendBuffer(aBuffer: PChar; const aSize: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = True);
Protected | procedure BookmarkChanged; virtual;
Public | function BufferFromFile(const aPos: integer; var aCount: integer): PChar;
Public | procedure CenterCursorPosition;
Protected | procedure Changed; virtual;
Public | procedure CombineUndo(const aCount: integer; const sDesc: string = '');
Public | procedure ConvertRange(const aFrom, aTo: integer; const aTransFrom, aTransTo: TMPHTranslationKind; const UndoDesc: string = '');
Public | procedure CreateEmptyFile(const TempName: string);
Protected | procedure DefineProperties(Filer: TFiler); override;
Public | function DeleteNibble(const aPos: integer; const HighNibble: boolean; const UndoDesc: string = ''): boolean;
Public | procedure DeleteSelection(const UndoDesc: string = '');
Public | function DisplayEnd: integer;
Public | function DisplayStart: integer;
Protected | procedure DoSetCellWidth(const Index: integer; Value: integer);
Protected | function DropPosition: integer;
Public | function Find(aBuffer: PChar; aCount: integer; const aStart, aEnd: integer; const IgnoreCase: boolean): integer;
Public | function FindWithWildcard(aBuffer: PChar; aCount: integer; const aStart, aEnd: integer; const IgnoreCase: boolean; const Wildcard: char): integer;
Public | function GetAnyOffsetString(const Position: integer): string; virtual;
Public | function GetCursorPos: integer;
Protected | function GetDataSize: integer;
Public | function GetFastPointer(const Index, Count: integer): PByte;
Public | function GetOffsetString(const Position: cardinal): string; virtual;
Protected | function GetSelectionAsHex: string;
Protected | function GetSelectionAsText: string;
Public | function GetTopLeftPosition(var oInCharField: boolean): integer;
Public | function GotoBookmark(const Index: integer): boolean;
Public | procedure HideDragCell;
Public | procedure InsertBuffer(aBuffer: PChar; const aSize, aPos: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = True);
Public | function InsertNibble(const aPos: integer; const HighNibble: boolean; const UndoDesc: string = ''): boolean;
Public | function IsSelected(const APosition: integer): boolean;
Public | procedure LoadFromFile(const Filename: string);
Public | procedure LoadFromStream(Strm: TStream);
Protected | procedure OldCursor;
Public | function PrepareFindReplaceData(StrData: string; const IgnoreCase, IsText: boolean): string;
Protected | procedure PrepareOverwriteDiskFile; virtual;
Public | procedure ReadBuffer(var Buffer; const Index, Count: Integer);
Protected | procedure ReadMaskChar(Reader: TReader);
Protected | procedure ReadMaskChar_I(Reader: TReader);
Public | function Redo: boolean;
Public | function Replace(aBuffer: PChar; aPosition, aOldCount, aNewCount: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = False): integer;
Public | procedure ReplaceSelection(aBuffer: PChar; aSize: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = True);
Public | procedure ResetSelection(const aDraw: boolean);
Public | procedure ResetUndo;
Public | function RowHeight: integer;
Public | procedure SaveRangeToStream(Strm: TStream; const APosition, ACount: integer);
Public | procedure SaveToFile(const Filename: string; const aUnModify: boolean = True);
Public | procedure SaveToStream(Strm: TStream);
Public | function Seek(const aOffset, aOrigin: integer): integer;
Public | procedure SeekToEOF;
Public | procedure SelectAll;
Protected | procedure SetSelectionAsHex(const s: string);
Protected | procedure SetSelectionAsText(const s: string);
Public | procedure SetTopLeftPosition(const aPosition: integer; const aInCharField: boolean);
Public | function ShowDragCell(const X, Y: integer): integer;
Protected | procedure Stream2Stream(strFrom, strTo: TStream; const Operation: TMPHProgressKind; const Count: integer = -1);
Public | procedure SyncView(Source: TCustomMPHexEditor; SyncOffset: integer = 0);
Public | function TranslateFromAnsiChar(const aByte: byte): char;
Public | function TranslateToAnsiChar(const aByte: byte): char;
Public | function Undo: boolean;
Public | function UndoBeginUpdate: integer; virtual;
Public | function UndoEndUpdate: integer; virtual;
Public | procedure UpdateGetOffsetText;
Protected | procedure WaitCursor;
Public | procedure WriteBuffer(const Buffer; const Index, Count: Integer); virtual;
Protected | procedure WriteMaskChar_I(Writer: TWriter);

Description

Public procedure AddSelectionUndo(const AStart, ACount: integer);

store a selection as undo record, so you can restore the selection start and end by using Undo. this can be useful e.g. to show position of replaced data

Protected procedure AdjustMetrics;

adjust cell widths/heigths depending on font, offset format, bytes per row/column...

Public procedure AppendBuffer(aBuffer: PChar; const aSize: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = True);

append some data at the end of the data buffer

Protected procedure BookmarkChanged; virtual;

fire OnBookmarkChanged

Public function BufferFromFile(const aPos: integer; var aCount: integer): PChar;

returns a buffer containing parts of the data buffer's contents. the buffer is allocated in this routine and must be freed by the caller

Public procedure CenterCursorPosition;

center the current position vertically

Protected procedure Changed; virtual;

call changed on every undo creation for OnChange event

Public procedure CombineUndo(const aCount: integer; const sDesc: string = '');

combine two or more changes, so Undo will discard the at once

Public procedure ConvertRange(const aFrom, aTo: integer; const aTransFrom, aTransTo: TMPHTranslationKind; const UndoDesc: string = '');

convert a part of the data buffer's content from one character table to a different one

Public procedure CreateEmptyFile(const TempName: string);

empty the data buffer and set the filename (e.g. "Untitled")

Protected procedure DefineProperties(Filer: TFiler); override;

Public function DeleteNibble(const aPos: integer; const HighNibble: boolean; const UndoDesc: string = ''): boolean;

delete 4 bits (=half byte = nibble) from the data buffer (see also InsertNibble)

Public procedure DeleteSelection(const UndoDesc: string = '');

delete the currently selected data

Public function DisplayEnd: integer;

return the offset of the last displayed data

Public function DisplayStart: integer;

return the offset of the first displayed data

Protected procedure DoSetCellWidth(const Index: integer; Value: integer);

Protected function DropPosition: integer;

returns the drop file position after a drag'n'drop operation

Public function Find(aBuffer: PChar; aCount: integer; const aStart, aEnd: integer; const IgnoreCase: boolean): integer;

searches for text or data in the data buffer, returns the find position (-1, if data have not been found):

- aBuffer: data to search for
- aCount: size of data in aBuffer
- aStart: start search at this position
- aEnd: searches up to this position
- IgnoreCase: if True, lowercase and uppercase characters are treated as if they were equal
- SearchText: if True, the current Translation is taken into account when searching textual data

NOTE: call PrepareFindReplaceData before the first Find call

Public function FindWithWildcard(aBuffer: PChar; aCount: integer; const aStart, aEnd: integer; const IgnoreCase: boolean; const Wildcard: char): integer;

searches for text or data in the data buffer using a wildcard character returns the find position (-1, if data have not been found):

- aBuffer: data to search for
- aCount: size of data in aBuffer
- aStart: start search at this position
- aEnd: searches up to this position
- IgnoreCase: if True, lowercase and uppercase characters are treated as if they were equal
- SearchText: if True, the current Translation is taken into account when searching textual data
- Wildcard: this character is a placeholder for any character

NOTE: call PrepareFindReplaceData before the first FindWithWildcard call

Public function GetAnyOffsetString(const Position: integer): string; virtual;

returns the given position as it would be drawn in the offset gutter, exception: if OffsetFormat is set to an empty string, returns the hexadecimal representation of the Position value (see also GetOffsetString)

Public function GetCursorPos: integer;

get the current data position (depending on the cursor/caret)

Protected function GetDataSize: integer;

get the size of the contained data

Public function GetFastPointer(const Index, Count: integer): PByte;

return the memory address at the given stream position after checking bounaries

Public function GetOffsetString(const Position: cardinal): string; virtual;

returns the given position as it would be drawn in the offset gutter, see also OffsetFormat

Protected function GetSelectionAsHex: string;

returns the current selection in hex format ('00010203...') as string, uses SwapNibbles

Protected function GetSelectionAsText: string;

returns a string containing the currently selected data

Public function GetTopLeftPosition(var oInCharField: boolean): integer;

returns the data position of the top left cell and also whether the caret is in the character pane, see also SetTopLeftPosition

Public function GotoBookmark(const Index: integer): boolean;

call this procedure to navigate to a bookmarked position

Public procedure HideDragCell;

hide the drop position marker (see also ShowDragCell)

Public procedure InsertBuffer(aBuffer: PChar; const aSize, aPos: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = True);

insert some data at the specified position into the data buffer

Public function InsertNibble(const aPos: integer; const HighNibble: boolean; const UndoDesc: string = ''): boolean;

insert 4 bits (0000) into the data buffer (see also DeleteNibble)

Public function IsSelected(const APosition: integer): boolean;

is the given position part of the selection?

Public procedure LoadFromFile(const Filename: string);

load the contents of a file into the data buffer

Public procedure LoadFromStream(Strm: TStream);

load the contents of a stream into the data buffer

Protected procedure OldCursor;

reset the Cursor to the previous value (see also WaitCursor)

Public function PrepareFindReplaceData(StrData: string; const IgnoreCase, IsText: boolean): string;

Protected procedure PrepareOverwriteDiskFile; virtual;

allows descendants to take special action if contents are to be saved to the file from where the data was load

Public procedure ReadBuffer(var Buffer; const Index, Count: Integer);

read data into a buffer

Protected procedure ReadMaskChar(Reader: TReader);

Protected procedure ReadMaskChar_I(Reader: TReader);

Public function Redo: boolean;

discard the last undo action (only one single redo is possible)

Public function Replace(aBuffer: PChar; aPosition, aOldCount, aNewCount: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = False): integer;

replace some amount of data

Public procedure ReplaceSelection(aBuffer: PChar; aSize: integer; const UndoDesc: string = ''; const MoveCursor: Boolean = True);

replace the currently selected data with some other data

Public procedure ResetSelection(const aDraw: boolean);

remove selection state from all data

Public procedure ResetUndo;

free the undo storage (discard all possible undo steps)

Public function RowHeight: integer;

returns the height of one row in pixels

Public procedure SaveRangeToStream(Strm: TStream; const APosition, ACount: integer);

save a range of bytes to a stream

Public procedure SaveToFile(const Filename: string; const aUnModify: boolean = True);

save the contents of the data buffer to a file

Public procedure SaveToStream(Strm: TStream);

save the contents of the data buffer into a stream

Public function Seek(const aOffset, aOrigin: integer): integer;

set the current position (like TStream.Seek)

Public procedure SeekToEOF;

seek behind the last position if InsertMode = True, goto last position otherwise

Public procedure SelectAll;

select all data

Protected procedure SetSelectionAsHex(const s: string);

replace the current selection by a string containing data in hex format ('00 01 02 03' or similar), uses SwapNibbles

Protected procedure SetSelectionAsText(const s: string);

replaces the currently selected data with the string's contents

Public procedure SetTopLeftPosition(const aPosition: integer; const aInCharField: boolean);

set top left cell to the given data position and also whether the caret is in the character pane (see also GetTopLeftPosition)

Public function ShowDragCell(const X, Y: integer): integer;

show a drop position marker on the cell at the given mouse cursor position (see also HideDragCell)

Protected procedure Stream2Stream(strFrom, strTo: TStream; const Operation: TMPHProgressKind; const Count: integer = -1);

copy a stream to a second one and fire the OnProgress handler

Public procedure SyncView(Source: TCustomMPHexEditor; SyncOffset: integer = 0);

synchronize another TCustomMPHexEditor view (top, left, selection), the optional SyncOffset parameter may be used for a different viewpoint

Public function TranslateFromAnsiChar(const aByte: byte): char;

translate a byte from Windows Codepage to the current Translation (see also TranslateToAnsiChar)

Public function TranslateToAnsiChar(const aByte: byte): char;

translate a byte from the current Translation to the Windows Codepage (see also TranslateFromAnsiChar)

Public function Undo: boolean;

undo the last modification, multiple undos are possible

Public function UndoBeginUpdate: integer; virtual;

each call to UndoBeginUpdate increments an internal counter that prevents using undo storage and also disables undo functionality (see also UndoEndUpdate)

Public function UndoEndUpdate: integer; virtual;

each call to UndoEndUpdate decrements an internal counter that prevents using undo storage and also disables undo functionality. the return value is the value of this counter. if the counter is reset to zero, undo creation is permitted again (see also UndoBeginUpdate)

Public procedure UpdateGetOffsetText;

call this function if the external offset formatting changed (see OnGetOffsetText)

Protected procedure WaitCursor;

store the current Cursor and set it to crHourGlass (see also OldCursor)

Public procedure WriteBuffer(const Buffer; const Index, Count: Integer); virtual;

write a buffer to the file data

Protected procedure WriteMaskChar_I(Writer: TWriter);

Properties

Overview

Protected | property AllowInsertMode: boolean;
Public | property AsHex: string;
Public | property AsText: string;
Protected | property AutoBytesPerRow: boolean;
Public | property Bookmark[Index: byte]: TMPHBookmark;
Protected | property BookmarkBitmap: TBitmap;
Public | property ByteChanged[index: integer]: boolean;
Protected | property BytesPerBlock: Integer;
Protected | property BytesPerColumn: integer;
Protected | property BytesPerRow: integer;
Protected | property BytesPerUnit: integer;
Public | property CanRedo: boolean;
Public | property CanUndo: boolean;
Public | property Canvas;
Protected | property CaretKind: TMPHCaretKind;
Public | property Col;
Public | property ColCountRO: integer;
Protected | property Colors: TMPHColors;
Public | property CurrentValue: integer;
Public | property Data[Index: integer]: Byte;
Public | property DataSize: integer;
Public | property DrawDataPosition: integer;
Protected | property DrawGridLines: boolean;
Protected | property DrawGutter3D: boolean;
Public | property Filename: string;
Protected | property FindProgress: boolean;
Public | property FindTable: TMPHFindTable;
Public | property FindTableI: TMPHFindTable;
Protected | property FocusFrame: boolean;
Protected | property GraySelectionIfNotFocused: boolean;
Protected | property GutterWidth: integer;
Public | property HasFile: boolean;
Protected | property HexLowerCase: boolean;
Protected | property HideSelection: boolean;
Public | property InCharField: boolean;
Protected | property InsertMode: boolean;
Public | property IsCharFieldCol[const ACol: integer]: Boolean;
Public | property IsDrawDataSelected: boolean;
Public | property IsMaxOffset: boolean;
Public | property LeftCol;
Protected | property MaskChar: char;
Public | property MaskedChars: TSysCharSet;
Protected | property MaxUndo: integer;
Public | property Modified: boolean;
Public | property MouseOverSelection: boolean;
Protected | property NoSizeChange: boolean;
Protected | property OffsetFormat: string;
Public | property OnBookmarkChanged: TNotifyEvent;
Protected | property OnChange: TNotifyEvent;
Protected | property OnDrawCell: TMPHDrawCellEvent;
Public | property OnFind: TMPHFindEvent;
Protected | property OnGetOffsetText: TMPHGetOffsetTextEvent;
Protected | property OnInvalidKey: TNotifyEvent;
Protected | property OnProgress: TMPHProgressEvent;
Protected | property OnSelectionChanged: TNotifyEvent;
Protected | property OnTopLeftChanged: TNotifyEvent;
Public | property OnWildcardFind: TMPHFindEvent;
Public | property PositionAtCursor[const ACol, ARow: integer]: integer;
Public | property ReadOnlyFile: boolean;
Protected | property ReadOnlyView: boolean;
Public | property Row;
Public | property RowCountRO: integer;
Protected | property RulerBytesPerUnit: integer;
Protected | property RulerNumberBase: byte;
Public | property SelCount: integer;
Public | property SelectionAsHex: string;
Public | property SelectionAsText: string;
Public | property SelEnd: integer;
Public | property SelStart: integer;
Protected | property SeparateBlocksInCharField: boolean;
Public | property SetDataSizeFillByte: Byte;
Protected | property ShowPositionIfNotFocused: Boolean;
Protected | property ShowRuler: boolean;
Protected | property SwapNibbles: boolean;
Public | property TopRow;
Protected | property Translation: TMPHTranslationKind;
Public | property UndoDescription: string;
Protected | property UnicodeBigEndian: Boolean;
Protected | property UnicodeChars: Boolean;
Protected | property Version: string;
Public | property VisibleColCount;
Public | property VisibleRowCount;
Protected | property WantTabs: boolean;

Description

Protected property AllowInsertMode: boolean;

if set to False, switching between overwrite and insert mode is not allowed (see also InsertMode and NoSizeChange)

Public property AsHex: string;

retrieve or set the data as hex formatted string (00 01 02 03...)

Public property AsText: string;

retrieve or set the data as string

Protected property AutoBytesPerRow: boolean;

automatically calculate BytesPerRow depending on the width of the editor

Public property Bookmark[Index: byte]: TMPHBookmark;

retrieve or set bookmarks programmatically (see also TMPHBookmark)

Protected property BookmarkBitmap: TBitmap;

bitmap containing 20 10x10 pixels pictures for bokkmarks (they are displayed in the offset gutter), the first ten pictures represent the bookmarks 0(10)..9, if they are set in the hexpane, the last 10 pics are shown if bookmarks are set in the character pane (see also TMPHBookmark)

Public property ByteChanged[index: integer]: boolean;

has the byte at the given position been modified ? (only in overwrite mode)

Protected property BytesPerBlock: Integer;

how many bytes form one block in a row? blocks are separated by a one character wide blank. -1 means no block separation (see also SeparateBlocksInCharField)

Protected property BytesPerColumn: integer;

number of bytes to show in each column

Protected property BytesPerRow: integer;

number of bytes to show in each row

Protected property BytesPerUnit: integer;

setting this property changes the way how mouse/keyboard selection works:
e.g. if set to two, two bytes will be treated as a unit, that means you cannot select a single byte, only two, four, six... bytes can be selected. also drag/drop and clipboard pasting is affected (data size is always a multiple of BytesPerUnit). See also RulerBytesPerUnit

Public property CanRedo: boolean;

is Redo possible?

Public property CanUndo: boolean;

is Undo possible?

Public property Canvas;

the control's canvas

Protected property CaretKind: TMPHCaretKind;

look of the editor's caret (see TMPHCaretKind)

Public property Col;

current column (grid column)

Public property ColCountRO: integer;

retrieves the number of columns (grid columns)

Protected property Colors: TMPHColors;

colors to display (see TMPHColors)

Public property CurrentValue: integer;

get the data value at the current caret position, returns -1 if an error occured

Public property Data[Index: integer]: Byte;

array to the data buffer's content

Public property DataSize: integer;

tells which value to use to fill the new data

Public property DrawDataPosition: integer;

during OnDrawCell event handlers, this property tells the data position currently being drawn (-1, if offset or ruler are drawn)

Protected property DrawGridLines: boolean;

if set to True, a grid is drawn

Protected property DrawGutter3D: boolean;

if set to True, a 3d line is drawn at the right of the offset gutter

Public property Filename: string;

name of the file that has been loaded into the data buffer

Protected property FindProgress: boolean;

if set to True, the find* routines also fire OnProgress events (default is False)

Public property FindTable: TMPHFindTable;

precompiled character comparison table for custom find routines, see also FindTableI, OnFind, OnWildcardFind, case sensitive, not public under BCB!

Public property FindTableI: TMPHFindTable;

precompiled character comparison table for custom find routines, see also FindTable, OnFind, OnWildcardFind, case insensitive, not public under BCB!

Protected property FocusFrame: boolean;

if FocusFrame is set to True, the current caret position will be displayed in the second field (hex - characters) as a dotted focus frame, if set to False, it will be shown as an ordinary rectangle

Protected property GraySelectionIfNotFocused: boolean;

if set to True and HideSelection is False, then the current selection will be grayed when the hex editor looses focus (the values from the Colors property will be converted to grayscale colors)

Protected property GutterWidth: integer;

width of the offset display gutter, if set to -1, automatically adjust the gutter's width

Public property HasFile: boolean;

has data been load from/saved to a file (or is the filename valid)

Protected property HexLowerCase: boolean;

if set to True, hex data and hex offsets are displayed in lower case

Protected property HideSelection: boolean;

hide the current selection when the hex editor looses focus (see also GraySelectionIfNotFocused)

Public property InCharField: boolean;

is the caret in the character or the hex pane ?

Protected property InsertMode: boolean;

insert mode (typed characters are inserted at the current position) or overwrite mode (typed characters replace values at the current position), see also AllowInsertMode, NoSizeChange and ReadOnlyView

Public property IsCharFieldCol[const ACol: integer]: Boolean;

is the given col in the hex or the character pane?

Public property IsDrawDataSelected: boolean;

during OnDrawCell event handlers, this property tells whether the cell is to be drawn in selected style (only valid if DrawDataPosition <> -1)

Public property IsMaxOffset: boolean;

this property is valid only in the OnGetOffsetText event. if True, the component asks for the string of the highest possible offset, if False, a row's offset text is queried

Public property LeftCol;

first visible column

Protected property MaskChar: char;

replace MaskedChars with the following character in the character pane

Public property MaskedChars: TSysCharSet;

these characters are masked in the character pane using MaskChar

Protected property MaxUndo: integer;

maximum memory that is used for undo storage (in bytes, approximately)

Public property Modified: boolean;

if True, changes have been made to the data buffer content

Public property MouseOverSelection: boolean;

returns True if the mouse cursor is positionned over selected data

Protected property NoSizeChange: boolean;

if set to True, the data size is readonly, e.g. no data may be appended, deleted or inserted, just overwriting is allowed. this also affects InsertMode.

Protected property OffsetFormat: string;

offset display ("line numbers") format, in the form
[r|c|<HEXNUM>%][-|<HEXNUM>!]<HEXNUM>:[Prefix]|[Suffix]
(<HEXNUM> means a number in hexadecimal format (without prefix/suffix))

- first field (up to the percent sign):

  • sets the "bytes per unit field" of the offset display format
  • if it's set to 1, each row offset displays the data position in bytes
  • if it's set to 2, each row offset displays the data position in words
  • if it's set to 4, each row offset displays the data position in dwords
  • if it's set to "r", each row offset displays the current row number (1st row=0, see also BytesPerRow)
  • if it's set to "c", each row offset displays the current column number (1st column=0, see also BytesPerColumn)
  • if this field is omitted, bytes per unit is set to the value of the RulerBytesPerUnit property

- second field (up to the exclamation mark):
  • sets the minimum width of the number part, if the number is shorter, it will be padded by '0' chars at the left
  • if this field reads -!, the the minimum width is automatically set to the longest number that can appear in the editor (the data's size)
  • if this field is omitted, the minimum width is set to 1

- third field (up to the colon):
  • sets the radix (base) of the offset format in hex notation
  • set this to '10' (without quotes) for hexadecimal offset display, set it to '08' for octal and to '0a' for decimal offset display
  • this field cannot be omitted, but the whole format string my be blank to avoid the display of offset identifiers

- fourth field (up to the pipe ('|') char):
  • the prefix that is put in front of the "number" string (e.g. '0x' or '$' to show that numbers are in hex format)
  • this field may be omitted (but not the pipe char!)

- fifth (and last) field:
  • the suffix to put after the "number string" (e.g. 'h' to show hex numbers)
  • this field may be omitted

Public property OnBookmarkChanged: TNotifyEvent;

this event is fired when a bookmark is added/modifed/removed

Protected property OnChange: TNotifyEvent;

this event is called on every data change (load/empty/undo/redo)

Protected property OnDrawCell: TMPHDrawCellEvent;

use this event to implement owner drawing. see also TMPHDrawCellEvent

Public property OnFind: TMPHFindEvent;

see also OnWildcardFind

Protected property OnGetOffsetText: TMPHGetOffsetTextEvent;

if this handler is assigned, the OffsetFormat is not used to create "line numbers", but the application tells the editor how to format the offset text

Protected property OnInvalidKey: TNotifyEvent;

this event is fired if an invalid character has been typed (like non-hex characters in the hex pane)

Protected property OnProgress: TMPHProgressEvent;

this event is called in LoadFromFile, SaveToFile, Find and FindWithWildcard routines, so a progress indicator may be updated (see also TMPHProgressEvent, FindProgress)

Protected property OnSelectionChanged: TNotifyEvent;

this event is fired when the selection/caret position has changed

Protected property OnTopLeftChanged: TNotifyEvent;

this event is fired if the first visible row or column have been changed (e.g. on scrolling)

Public property OnWildcardFind: TMPHFindEvent;

to this handler, see also OnFind

Public property PositionAtCursor[const ACol, ARow: integer]: integer;

calculate a data position from a col/row pair

Public property ReadOnlyFile: boolean;

if True, the currently loaded file cannot be overwritten

Protected property ReadOnlyView: boolean;

if set to True, the data can not be edited, just cursor movement is allowed ("Hex Viewer" mode)

Public property Row;

current row (grid row)

Public property RowCountRO: integer;

retrieves the number of rows (grid rows)

Protected property RulerBytesPerUnit: integer;

setting this property affects the offset/ruler drawing:
e.g. if set to two, two bytes will be treated as a unit, that means the offset and ruler values will step by one each two bytes. if this property is set to -1, it will use the value of the BytesPerUnit property

Protected property RulerNumberBase: byte;

number base (i.e. radix) for the ruler display (2-16), tells the component which number format to use when drawing the ruler

Public property SelCount: integer;

retrieve or set the size of the selected data

Public property SelectionAsHex: string;

see GetSelectionAsHex and SetSelectionAsHex

Public property SelectionAsText: string;

see GetSelectionAsText and SetSelectionAsText

Public property SelEnd: integer;

retrieve or set the selection end

Public property SelStart: integer;

retrieve or set the selection start

Protected property SeparateBlocksInCharField: boolean;

if BytesPerBlock is used, this property tells the editor whether it should separate blocks of bytes in the character pane too or not

Public property SetDataSizeFillByte: Byte;

enlarges the stream

Protected property ShowPositionIfNotFocused: Boolean;

mark the current position even if the editor is not focused

Protected property ShowRuler: boolean;

if set to True, a ruler is shown above the first row

Protected property SwapNibbles: boolean;

if SwapNibbles is set to True, the hex pane will show all bytes in the order lower 4 bits-higher 4 bits (i.e. the value 192 dec = C0 hex will be drawn as 0C). if set to False, hex values will be displayed in usual order. this setting also affects hex data input and hex-string conversions

Public property TopRow;

first visible row (grid row)

Protected property Translation: TMPHTranslationKind;

translation kind of the data (used to show characters on and to handle key presses in the char pane), (see also TMPHTranslationKind)

Public property UndoDescription: string;

description of the next Undo action

Protected property UnicodeBigEndian: Boolean;

if set to True, big endian unicode mode is used if UnicodeChars is enabled

Protected property UnicodeChars: Boolean;

if set to True, the character pane displays unicode characters and the BytesPerUnit property is set to 2. Translation is set to tkAsIs. BytesPerRow and BytesPerColumn must be a multiple of two to be able to use the unicode mode. see also UnicodeBigEndian

Protected property Version: string;

current version of the hex editor component (returns the build data), readonly

Public property VisibleColCount;

retrieves the number of visible columns

Public property VisibleRowCount;

retrieves the number of visible rows

Protected property WantTabs: boolean;

if set to True, the Tab key is used to switch the caret between hex and character pane. if set to False, the Tab key can be used to switch between controls. then the combination CTRL+T is used to switch the panes


MPHexEditor: Class TMPHColors

Class TMPHColors

Unit

MPHexEditor

Declaration

type TMPHColors = class(TPersistent)

Description

persistent color storage (contains the colors in hex editors)

Properties

Overview

Published | property ActiveFieldBackground: TColor;
Published | property Background: TColor;
Published | property ChangedBackground: TColor;
Published | property ChangedText: TColor;
Published | property CurrentOffset: TColor;
Published | property CurrentOffsetBackground: TColor;
Published | property CursorFrame: TColor;
Published | property EvenColumn: TColor;
Published | property Grid: TColor;
Published | property NonFocusCursorFrame: TColor;
Published | property OddColumn: TColor;
Published | property Offset: TColor;
Published | property OffsetBackground: TColor;
Public | property Parent: TControl;

Description

Published property ActiveFieldBackground: TColor;

background color of the active field (hex/chars)

Published property Background: TColor;

background color

Published property ChangedBackground: TColor;

background color of modified bytes (in overwrite mode)

Published property ChangedText: TColor;

foreground color of modified bytes (in overwrite mode)

Published property CurrentOffset: TColor;

foreground color of the current line in the offset pane (gutter)

Published property CurrentOffsetBackground: TColor;

background color of the current line in the offset pane (gutter)

Published property CursorFrame: TColor;

color of the cursor and position frame in the second pane

Published property EvenColumn: TColor;

foreground color of even columns

Published property Grid: TColor;

pen color of the grid

Published property NonFocusCursorFrame: TColor;

color of a cursor frame in a non-focused editor

Published property OddColumn: TColor;

foreground color of odd columns

Published property Offset: TColor;

foreground color of the line offsets

Published property OffsetBackground: TColor;

background color of the offset pane (gutter)

Public property Parent: TControl;

parent hex editor control


MPHexEditor: Class TMPHexEditor

Class TMPHexEditor

Unit

MPHexEditor

Declaration

type TMPHexEditor = class(TCustomMPHexEditor)

Description

published hex editor component

Hierarchy

TCustomMPHexEditor

Properties

Overview

Published | property AllowInsertMode;
Published | property AutoBytesPerRow;
Published | property BookmarkBitmap;
Published | property BytesPerBlock;
Published | property BytesPerColumn;
Published | property BytesPerRow;
Published | property BytesPerUnit;
Published | property CaretKind;
Published | property Colors;
Published | property DrawGridLines;
Published | property DrawGutter3D;
Published | property FindProgress;
Published | property FocusFrame;
Published | property GraySelectionIfNotFocused;
Published | property GutterWidth;
Published | property HexLowerCase;
Published | property HideSelection;
Published | property InsertMode;
Published | property MaskChar;
Published | property MaxUndo;
Published | property NoSizeChange;
Published | property OffsetFormat;
Published | property OnBookmarkChanged;
Published | property OnChange;
Published | property OnDrawCell;
Published | property OnGetOffsetText;
Published | property OnInvalidKey;
Published | property OnProgress;
Published | property OnSelectionChanged;
Published | property OnTopLeftChanged;
Published | property ReadOnlyView;
Published | property RulerBytesPerUnit;
Published | property RulerNumberBase;
Published | property SeparateBlocksInCharField;
Published | property ShowPositionIfNotFocused;
Published | property ShowRuler;
Published | property SwapNibbles;
Published | property Translation;
Published | property UnicodeBigEndian;
Published | property UnicodeChars;
Published | property Version;
Published | property WantTabs;

Description

Published property AllowInsertMode;

see inherited AllowInsertMode

Published property AutoBytesPerRow;

see inherited AutoBytesPerRow

Published property BookmarkBitmap;

see inherited BookmarkBitmap

Published property BytesPerBlock;

see inherited BytesPerBlock

Published property BytesPerColumn;

see inherited BytesPerColumn

Published property BytesPerRow;

see inherited BytesPerRow

Published property BytesPerUnit;

see inherited BytesPerUnit

Published property CaretKind;

see inherited CaretKind

Published property Colors;

see inherited Colors

Published property DrawGridLines;

see inherited DrawGridLines

Published property DrawGutter3D;

see inherited DrawGutter3D

Published property FindProgress;

see inherited FindProgress

Published property FocusFrame;

see inherited FocusFrame

Published property GraySelectionIfNotFocused;

see inherited GraySelectionIfNotFocused

Published property GutterWidth;

see inherited GutterWidth

Published property HexLowerCase;

see inherited HexLowerCase

Published property HideSelection;

see inherited HideSelection

Published property InsertMode;

see inherited InsertMode

Published property MaskChar;

see inherited MaskChar

Published property MaxUndo;

see inherited MaxUndo

Published property NoSizeChange;

see inherited NoSizeChange

Published property OffsetFormat;

see inherited OffsetFormat

Published property OnBookmarkChanged;

see inherited OnBookmarkChanged

Published property OnChange;

see inherited OnChange

Published property OnDrawCell;

see inherited OnDrawCell

Published property OnGetOffsetText;

see inherited OnGetOffsetText

Published property OnInvalidKey;

see inherited OnInvalidKey

Published property OnProgress;

see inherited OnProgress

Published property OnSelectionChanged;

see inherited OnSelectionChanged

Published property OnTopLeftChanged;

see inherited OnTopLeftChanged

Published property ReadOnlyView;

see inherited ReadOnlyView

Published property RulerBytesPerUnit;

see inherited RulerBytesPerUnit

Published property RulerNumberBase;

see inherited RulerNumberBase

Published property SeparateBlocksInCharField;

see inherited SeparateBlocksInCharField

Published property ShowPositionIfNotFocused;

see inherited ShowPositionIfNotFocused

Published property ShowRuler;

see inherited ShowRuler

Published property SwapNibbles;

see inherited SwapNibbles

Published property Translation;

see inherited Translation

Published property UnicodeBigEndian;

see inherited UnicodeBigEndian

Published property UnicodeChars;

see inherited UnicodeChars

Published property Version;

see inherited Version

Published property WantTabs;

see inherited WantTabs


MPHexEditorEx

Unit MPHexEditorEx

Description

TMPHexEditorEx, an enhanced TMPHexEditor: print and preview, ole drag and drop, ole clipboard handling, file backups...

TMPHexEditorEx v 09-30-2007
credits to :

- John Hamm, http://users.snapjax.com/john/

- Christophe Le Corfec for introducing the EBCDIC format and the nice idea about half byte insert/delete

- Philippe Chessa for his suggestions about AsText, AsHex and better support for the french keyboard layout

- Daniel Jensen for octal offset display and the INS-key recognition stuff

- Shmuel Zeigerman for introducing more flexible offset display formats

- Vaf, http://carradio.al.ru for reporting missing delver.inc and suggesting OnChange

- Eugene Tarasov for reporting that setting the BytesPerColumn value to 4 at design time didn't work

- FuseBurner for BytesPerUnit/RulerBytesPerUnit related suggestions

- Motzi for SyncView/ShowPositionIfNotFocused related suggestions

- Martin Hsiao for bcb compatibility and reporting some bugs when moving cursor beyond eof

- Miyu for delphi 7 defines

- Nils Hoyer for bcb testing, his help on creating a BCB6 package and standard actions support

- Skamnitsly S.V for reporting a bug when doubleclicking the ruler bar

- Pete Fraser for reporting problems with array properties under BCB

- Andrew Novikov for bug reports and suggestions

- Al for bug reports

- Dieter Köhler for reporting the delphi vcl related CanFocus bug

- Piotr Likus for reporting a cardinal<->integer related bug in the Undo method

- Marc Girod for bug reports

- Gerd Schwartz for reporting a bug with printing headers/footers that contain long texts

- Bogdan Ureche for reporting an integer overflow when moving the cursor over a large selection

- Heybirder for reporting that delphi 6 has not TStringList.ValueFromIndex property

- Magnus Flysjö for his Delphi2006 package and the updated MPDELVER.INC file

history:

  • v 09-30-2007: september 30, 2007

    - changes in the base class (TCustomMPHexEditor)
    - added support for exporting regedit hexdata clipboard format
    - added support for unicode characters wider than latin characters (they are now painted/printed using a smaller font)

  • v 12-06-2006: december 06, 2006

    - changes in the base class (TCustomMPHexEditor)
    - standard actions support

  • v 05-24-2006: may 24, 2006

    - fixed painting bug when drawing solid "secondary" cursor frames (FocusFrame = False)
    - restored compatibility of mphexeditorex.pas with delphi 6

  • v 02-06-2006: february 06, 2006

    - changes in the base class (TCustomMPHexEditor) only

  • v 05-23-2005: may 23, 2005

    - changes in the base class (TCustomMPHexEditor) only

  • v 12-29-2004: december 29, 2004

    - initialized Result to '' in some string functions/methods to avoid non empty Result vars at function startup due to compiler optimizations (particularly on d4), e.g. printing did not work correctly under d4
    - updated some of the sample projects (fixed the broken bcb6 sample, added printing to the hex viewer and the bcb6 editor sample)

  • v 12-28-2004: december 28, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 12-21-2004: december 21, 2004

    - changes in the base class (TCustomMPHexEditor)
    - support for CF_HTML clipboard format

  • v 11-12-2004: november 12, 2004

    - changes in the base class (TCustomMPHexEditor)
    - ole drag and drop move operation is now disabled if the editor's ReadOnlyView property is set to True

  • v 10-26-2004: october 26, 2004

    - changes in the base class (TCustomMPHexEditor)/unit (MPHexEditor) only

  • v 08-29-2004: august 29, 2004

    - changes in the base class (TCustomMPHexEditor)
    - added pfIncludeRuler to TMPHPrintFlag

  • v 08-14-2004: august 14, 2004

    - changed printing (color handling, pfSelectionBold meaning)

  • v 06-15-2004: june 15, 2004

    - changes in the base class (TCustomMPHexEditor) and some more inherited published properties

  • v 06-10-2004: june 10, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 06-07-2004: june 07, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 05-27-2004: may 27, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 05-13-2004: may 13, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 04-18-2004: april 18, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 01-08-2004: january 08, 2004

    - changes in the base class (TCustomMPHexEditor) only

  • v 12-16-2003: december 16, 2003

    - changes in the base class (TCustomMPHexEditor) only

  • v 12-10-2003: december 10, 2003

    - changes in the base class (TCustomMPHexEditor) only

  • v 09-24-2003: september 24, 2003

    - modified the BCB6 package

  • v 09-09-2003: september 09, 2003

    - changed UndoBeginUpdate and UndoEndUpdate behaviour to automatically create an undo record on UndoBeginUpdate and check it on UndoEndUpdate, see also CreateUndoOnUndoUpdate
    - added property CreateUndoOnUndoUpdate
    - added defines for delphi7, renamed delver.inc to mpdelver.inc
    - PasteData method added

  • v 07-05-2003: july 05, 2003

    - added support for pasting clipboard data in fixed filesize mode
    - added RegEdit_HexData clipboard support

  • v 05-25-2003-b: may 25, 2003

    - fixed a bug (moving the cursor beyond eof)

  • v 05-25-2003: may 25, 2003

    - no ':' is printed when offset display is not used
    - added hpp generating statements for bcb compatibility

  • v 05-20-2003: may 20, 2003

    - added unicode support in printing

  • v 05-17-2003: may 17, 2003

    - moved some property related functions to protected
    - corrected bottom margin handling when printing
    - corrected upper/lowercase hex chars in printing
    - the current unit is selected now when doubleclicking data
    - added flags pfCurrentViewOnly (just print the currently visible data) to PrintOptions.Flags

  • v 08-18-2002: august 18, 2002

    - first release

Classes, Interfaces and Objects

Name | Description
Class TMPHexEditorEx |
Class TMPHPrintOptions |

Functions and Procedures

Overview

procedure MPHSetHexClipboardData(Data: Pointer; DataSize: integer; ScrapFileName: ShortString; TextAsHex, SwapNibbles: boolean);

Description

procedure MPHSetHexClipboardData(Data: Pointer; DataSize: integer; ScrapFileName: ShortString; TextAsHex, SwapNibbles: boolean);

Types

Overview

TMPHQueryPublicPropertyEvent = procedure(Sender: TObject; const PropertyName: string; var IsPublic: boolean) of object

Description

TMPHQueryPublicPropertyEvent = procedure(Sender: TObject; const PropertyName: string; var IsPublic: boolean) of object

this event is called when PropertiesAsString is read or written. TMPHexEditorEx has a fixed list of properties that can be read/written using PropertiesAsString. you can exclude some of the properties by setting IsPublic to False.

Enumerations

TMPHOLEOperation
is data dropped or pasted
 | oleDrop
 | oleClipboard
TMPHPrintFlag
print option flags: - pfSelectionOnly: only print data currently selected - pfSelectionBold: render the current selection using either a bold font or inverted colors (if pfSelectionOnly isn't set) - pfMonochrome: don't use colors, print/preview black on white - pfUseBackgroundColor: fill the margin rect with the editor's background color (if pfMonochrome isn't set) - pfCurrentViewOnly: just print the data currently displayed - pfIncludeRuler: draw the ruler at every page's top
 | pfSelectionOnly
 | pfSelectionBold
 | pfMonochrome
 | pfUseBackgroundColor
 | pfCurrentViewOnly
 | pfIncludeRuler

Constants

Overview

MPH_DEF_PRINT_MARGINS : TRect = (Left: 20; Top: 15; Right: 25; Bottom: 25)

Description

MPH_DEF_PRINT_MARGINS : TRect = (Left: 20; Top: 15; Right: 25; Bottom: 25)

default print margins

Author

(C) markus stephany, vcl[at]mirkes[dot]de, all rights reserved.

Last Modified

09-30-2007


MPHexEditorEx: Class TMPHexEditorEx

Class TMPHexEditorEx

Unit

MPHexEditorEx

Declaration

type TMPHexEditorEx = class(TCustomMPHexEditor)

Description

enhanced hex editor

Hierarchy

TCustomMPHexEditor

Methods

Overview

Public | function BeginUpdate: integer;
Public | function CanCopy: boolean;
Protected | function CanCreateUndo(const aKind: TMPHUndoFlag; const aCount, aReplCount: integer): Boolean; override;
Public | function CanCut: boolean;
Public | function CanPaste: boolean;
Public | function CBCopy: boolean;
Public | function CBCut: boolean;
Public | function CBPaste: boolean;
Public | procedure CreateRangeUndo(const aStart, aCount: integer; sDesc: string);
Public | function EndUpdate: integer;
Public | function ExecuteAction(Action: TBasicAction): Boolean; override;
Public | function OwnsClipBoard: boolean;
Public | procedure PasteData(P: Pointer; const ACount: integer; const UndoDesc: string = '');
Public | procedure Print(const Page: integer);
Public | function PrintNumPages: integer;
Public | function PrintPreview(const Page: integer): TMetaFile;
Public | procedure ReleaseClipboard(const Flush: boolean);
Public | procedure Save;
Public | function UndoBeginUpdate(const StrUndoDesc: string = ''): integer; reintroduce;
Public | function UndoEndUpdate: integer; override;
Public | function UpdateAction(Action: TBasicAction): Boolean; override;
Public | procedure WriteBuffer(const Buffer; const Index, Count: Integer); override;

Description

Public function BeginUpdate: integer;

each call to BeginUpdate increments an internal counter that prevents from repainting (see also EndUpdate)

Public function CanCopy: boolean;

is copying to clipboard possible?

Protected function CanCreateUndo(const aKind: TMPHUndoFlag; const aCount, aReplCount: integer): Boolean; override;

Protected-Deklarationen

Public function CanCut: boolean;

is cutting to clipboard possible?

Public function CanPaste: boolean;

is pasting from clipboard possible?

Public function CBCopy: boolean;

copy selection to clipboard

Public function CBCut: boolean;

cut selection to clipboard

Public function CBPaste: boolean;

paste clipboard's contents over current selection

Public procedure CreateRangeUndo(const aStart, aCount: integer; sDesc: string);

create an undo for a range of bytes

Public function EndUpdate: integer;

each call to EndUpdate decrements an internal counter that prevents from repainting. the return value is the value of this counter. if the counter is reset to zero, repainting is permitted again (see also BeginUpdate)

Public function ExecuteAction(Action: TBasicAction): Boolean; override;

Public function OwnsClipBoard: boolean;

do we own the clipboard data?

Public procedure PasteData(P: Pointer; const ACount: integer; const UndoDesc: string = '');

paste data (in clipboardmanner: check current selection and so on)

Public procedure Print(const Page: integer);

print the given page to the default printer. Printer.BeginDoc, Printer.NewPage and Printer.EndDoc must be issued by the caller!

Public function PrintNumPages: integer;

get the number of pages to print

Public function PrintPreview(const Page: integer): TMetaFile;

creates a TMetaFile object and renders the specified page on its canvas. Freeing of the TMetaFile is up to the caller!

Public procedure ReleaseClipboard(const Flush: boolean);

flush or empty the clipboard (if we own the IDataObject)

Public procedure Save;

save to file (overwrite)

Public function UndoBeginUpdate(const StrUndoDesc: string = ''): integer; reintroduce;

each call to UndoBeginUpdate increments an internal counter that prevents using undo storage and also disables undo functionality (see also UndoEndUpdate)

Public function UndoEndUpdate: integer; override;

each call to UndoEndUpdate decrements an internal counter that prevents using undo storage and also disables undo functionality. the return value is the value of this counter. if the counter is reset to zero, undo creation is permitted again (see also UndoBeginUpdate)

Public function UpdateAction(Action: TBasicAction): Boolean; override;

Public procedure WriteBuffer(const Buffer; const Index, Count: Integer); override;

see inherited WriteBuffer

Properties

Overview

Published | property AllowInsertMode;
Published | property AutoBytesPerRow;
Published | property BackupExtension: string;
Published | property BookmarkBitmap;
Public | property BookMarksAsString: string;
Published | property BytesPerBlock;
Published | property BytesPerColumn;
Published | property BytesPerRow;
Published | property BytesPerUnit;
Published | property CaretKind;
Published | property ClipboardAsHexText: boolean;
Published | property Colors;
Published | property CreateBackup: boolean;
Public | property CreateUndoOnUndoUpdate: boolean;
Published | property DrawGridLines;
Published | property DrawGutter3D;
Published | property FindProgress;
Published | property FlushClipboardAtShutDown: boolean;
Published | property FocusFrame;
Published | property GraySelectionIfNotFocused;
Published | property GutterWidth;
Published | property HexLowerCase;
Published | property HideSelection;
Published | property InsertMode;
Published | property MaskChar;
Published | property MaxUndo;
Published | property NoSizeChange;
Published | property OffsetFormat;
Published | property OffsetPopupMenu: TPopupMenu;
Published | property OleDragDrop: boolean;
Published | property OnBookmarkChanged;
Published | property OnChange;
Published | property OnDrawCell;
Published | property OnGetOffsetText;
Published | property OnInvalidKey;
Published | property OnProgress;
Published | property OnQueryPublicProperty: TMPHQueryPublicPropertyEvent;
Published | property OnSelectionChanged;
Published | property OnTopLeftChanged;
Published | property PrintFont: TFont;
Published | property PrintOptions: TMPHPrintOptions;
Public | property PropertiesAsString: string;
Published | property ReadOnlyView;
Published | property RulerBytesPerUnit;
Published | property RulerNumberBase;
Published | property SeparateBlocksInCharField;
Published | property ShowPositionIfNotFocused;
Published | property ShowRuler;
Published | property SupportsOtherClipFormats: boolean;
Published | property SwapNibbles;
Published | property Translation;
Published | property UnicodeBigEndian;
Published | property UnicodeChars;
Published | property UseEditorFontForPrinting: boolean;
Published | property Version;
Published | property WantTabs;
Published | property ZoomOnWheel: boolean;

Description

Published property AllowInsertMode;

see inherited AllowInsertMode

Published property AutoBytesPerRow;

see inherited AutoBytesPerRow

Published property BackupExtension: string;

add this extension to the file if making backups, see CreateBackup

Published property BookmarkBitmap;

see inherited BookmarkBitmap

Public property BookMarksAsString: string;

get/set bookmarks as text (for storing in registry, ini-file)

Published property BytesPerBlock;

see inherited BytesPerBlock

Published property BytesPerColumn;

see inherited BytesPerColumn

Published property BytesPerRow;

see inherited BytesPerRow

Published property BytesPerUnit;

see inherited BytesPerUnit

Published property CaretKind;

see inherited CaretKind

Published property ClipboardAsHexText: boolean;

if set to True, CF_TEXT on the clipboard will be treated as hex formatted text

Published property Colors;

see inherited Colors

Published property CreateBackup: boolean;

create a backup on save ? (see also BackupExtension)

Public property CreateUndoOnUndoUpdate: boolean;

if set to True (default is False), an undo record is automatically created on calling UndoBeginUpdate and on calling UndoEndUpdate the record is deleted if the data has not been changed between UndoBegin- and UndoEndUpdate

Published property DrawGridLines;

see inherited DrawGridLines

Published property DrawGutter3D;

see inherited DrawGutter3D

Published property FindProgress;

see inherited FindProgress

Published property FlushClipboardAtShutDown: boolean;

flush or empty clipboard at shutdown

Published property FocusFrame;

see inherited FocusFrame

Published property GraySelectionIfNotFocused;

see inherited GraySelectionIfNotFocused

Published property GutterWidth;

see inherited GutterWidth

Published property HexLowerCase;

see inherited HexLowerCase

Published property HideSelection;

see inherited HideSelection

Published property InsertMode;

see inherited InsertMode

Published property MaskChar;

see inherited MaskChar

Published property MaxUndo;

see inherited MaxUndo

Published property NoSizeChange;

see inherited NoSizeChange

Published property OffsetFormat;

see inherited OffsetFormat

Published property OffsetPopupMenu: TPopupMenu;

if this property is assigned to a TPopupMenu, it will be shown on right clicking the offset display pane. then the normal PopupMenu will open on right clicking the character and hex pane.

Published property OleDragDrop: boolean;

if set To True, OLE drag and drop will used automatically when dragging starts or supported OLE data has been dropped on the hex editor

Published property OnBookmarkChanged;

see inherited OnBookmarkChanged

Published property OnChange;

see inherited OnChange

Published property OnDrawCell;

see inherited OnDrawCell

Published property OnGetOffsetText;

see inherited OnGetOffsetText

Published property OnInvalidKey;

see inherited OnInvalidKey

Published property OnProgress;

see inherited OnProgress

Published property OnQueryPublicProperty: TMPHQueryPublicPropertyEvent;

this event is called when PropertiesAsString is read or written. (see TMPHQueryPublicPropertyEvent)

Published property OnSelectionChanged;

see inherited OnSelectionChanged

Published property OnTopLeftChanged;

see inherited OnTopLeftChanged

Published property PrintFont: TFont;

print using this font

Published property PrintOptions: TMPHPrintOptions;

print/preview options, see TMPHPrintOptions

Public property PropertiesAsString: string;

get set properties as text (for storing in registry, ini-file);

Published property ReadOnlyView;

see inherited ReadOnlyView

Published property RulerBytesPerUnit;

see inherited RulerBytesPerUnit

Published property RulerNumberBase;

see inherited RulerNumberBase

Published property SeparateBlocksInCharField;

see inherited SeparateBlocksInCharField

Published property ShowPositionIfNotFocused;

see inherited ShowPositionIfNotFocused

Published property ShowRuler;

see inherited ShowRuler

Published property SupportsOtherClipFormats: boolean;

do we support other formats than CF_MPHEXEDITOR and CF_HDROP?

Published property SwapNibbles;

see inherited SwapNibbles

Published property Translation;

see inherited Translation

Published property UnicodeBigEndian;

see inherited UnicodeBigEndian

Published property UnicodeChars;

see inherited UnicodeChars

Published property UseEditorFontForPrinting: boolean;

if set to True, the editor's font will be used for printing

Published property Version;

see inherited Version

Published property WantTabs;

see inherited WantTabs

Published property ZoomOnWheel: boolean;

auto-zoom on mouse wheel?


MPHexEditorEx: Class TMPHPrintOptions

Class TMPHPrintOptions

Unit

MPHexEditorEx

Declaration

type TMPHPrintOptions = class(TPersistent)

Description

print / preview options

Properties

Overview

Published | property Flags: TMPHPrintFlags;
Published | property MarginBottom: integer;
Published | property MarginLeft: integer;
Published | property MarginRight: integer;
Published | property MarginTop: integer;
Published | property PageFooter: string;
Published | property PageHeader: string;

Description

Published property Flags: TMPHPrintFlags;

printing flags:

- pfSelectionOnly: only print data currently selected
- pfSelectionBold: render the current selection using either a bold font or inverted colors (if pfSelectionOnly isn't set)
- pfMonochrome: don't use colors, print/preview black on white
- pfUseBackgroundColor: fill the margin rect with the editor's background color (if pfMonochrome isn't set)
- pfCurrentViewOnly: just print the data currently displayed

Published property MarginBottom: integer;

bottom margin in Millimeters

Published property MarginLeft: integer;

left margin in Millimeters

Published property MarginRight: integer;

right margin in Millimeters

Published property MarginTop: integer;

top margin in Millimeters

Published property PageFooter: string;

this line will be rendered on the bottom of the printed page (see PageHeader)

Published property PageHeader: string;

this line will be rendered on top of the printed page, some characters have special meanings:

- the string may contain three parts separated by a "|" (pipe) character (left|center|right)
- each part knows some special variables:

  • %f: substituted with the filename part of the editor's filename
  • %F: substituted with the expanded name of the editor's filename
  • %p: substituted with the number of the current page
  • %P: substituted with the number of pages
  • %t: substituted with the current time
  • %d: substituted with the current date
  • %>: substituted with the long description of the editor's current Translation
  • %<: substituted with the short description of the editor's current Translation


Class Hierarchy

  • Exception
    • EMPHexEditor
  • TCustomGrid
    • TCustomMPHexEditor
      • TMPHexEditor
      • TMPHexEditorEx
  • TPersistent
    • TMPHColors
    • TMPHPrintOptions


All Classes, Interfaces and Objects

Name | Unit | Description
EMPHexEditor | MPHexEditor | custom Exception class
TCustomMPHexEditor | MPHexEditor | protected ancestor of the hex editor components
TMPHColors | MPHexEditor | persistent color storage (contains the colors in hex editors)
TMPHexEditor | MPHexEditor | published hex editor component
TMPHexEditorEx | MPHexEditorEx | enhanced hex editor
TMPHPrintOptions | MPHexEditorEx | print / preview options


All Types

Name | Unit | Description
PMPHFindTable | MPHexEditor | precompiled converted character table types for faster data search
TMPHBookmark | MPHexEditor | bookmark record: defined by pressing SHIFT+CTRL+[0..9], goto bookmark by pressing CTRL+[0..9] - mPosition: file position - mInCharField: cursor in character pane (True) or hex number pane
TMPHBookmarks | MPHexEditor | array of bookmarks, representing keys 0..9
TMPHCharConv | MPHexEditor | character conversion data storage
TMPHCharConvTable | MPHexEditor | character conversion table
TMPHDrawCellEvent | MPHexEditor | owner draw event type. parameters: - Sender: the hex editor - ACanvas: the editor's canvas - ACol, ARow: the position to be drawn - AWideText: the text to be drawn - ARect: the cell rectangle - ADefaultDraw: if set to True (default), default drawing isperformed after the event handler returns. if set to false, the event handler must do all cell painting.
TMPHFindEvent | MPHexEditor | handler for custom search routines - Pattern: the data to find - PatLength: length of the data to find - SearchFrom: first search position - SearchUntil: last search position - IgnoreCase: case sensitive? - Wilcard: Wildcard character (only used by FindWithWildcard) - FoundPos: result, set to -1 if data was not found
TMPHFindTable | MPHexEditor |
TMPHGetOffsetTextEvent | MPHexEditor | retrieve the "line number" to display by the application - Number: the number to convert to text - OffsetText: the resulting text output
TMPHOffsetFormat | MPHexEditor | offset format record
TMPHOffsetFormatFlags | MPHexEditor | set of the above flags
TMPHProgressEvent | MPHexEditor | progress event handler, used in OnProgress - ProgressType: am i loading or saving? (see TMPHProgressKind) - aName: name of file to be load from/saved to - Percent: current progress (0..100) - Cancel: if set to true, the load/save procedure will abort (no meaning in Find* methods)
TMPHQueryPublicPropertyEvent | MPHexEditorEx | this event is called when PropertiesAsString is read or written. TMPHexEditorEx has a fixed list of properties that can be read/written using PropertiesAsString. you can exclude some of the properties by setting IsPublic to False.
TMPHUndoFlags | MPHexEditor | set of undo flags


All Enumerations

Name | Unit | Description
TMPHCaretKind | MPHexEditor | look of the editor's caret: - ckFull: full block - ckLeft: left line - ckBottom: bottom line - ckAuto: left line if InsertMode, full block if overwrite, bottom line if ReadOnlyView
TMPHCharConvType | MPHexEditor | character conversion type
TMPHOffsetFormatFlag | MPHexEditor | offset format flags
TMPHOLEOperation | MPHexEditorEx | is data dropped or pasted
TMPHPrintFlag | MPHexEditorEx | print option flags: - pfSelectionOnly: only print data currently selected - pfSelectionBold: render the current selection using either a bold font or inverted colors (if pfSelectionOnly isn't set) - pfMonochrome: don't use colors, print/preview black on white - pfUseBackgroundColor: fill the margin rect with the editor's background color (if pfMonochrome isn't set) - pfCurrentViewOnly: just print the data currently displayed - pfIncludeRuler: draw the ruler at every page's top
TMPHProgressKind | MPHexEditor | action indicator used in OnProgress event handler: - pkLoad: loading data - pkSave: saving data - pkFind: finding
TMPHTranslationKind | MPHexEditor | how to show a file's content in the character pane of the editor: - tkAsIs: leave as is (current windows code page) - tkDos8: current dos codepage - tkASCII: 7 bit ascii - tkMac: macintosh charset (translation always from/to ms cp 1252 (ms latin1)!! - tkBCD: ibm ebcdic codepage 38 (translation always from/to ms cp 1252 (ms latin1)!! - tkCustom: custom codepage stored in MPHCustomCharConv
TMPHUndoFlag | MPHexEditor | flags internally used in the undo storage


All Variables

Name | Unit | Description
MPHCustomCharConv | MPHexEditor | this character conversion is used in translations from tkAsIs to tkCustom (see TMPHTranslationKind)


All Constants

Name | Unit | Description
CM_INTUPDATECARET | MPHexEditor | this message is posted to the hex editor when it should update the caret position
CM_SELECTIONCHANGED | MPHexEditor | this message is posted when an OnSelectionChange event is to be fired
MPHOffsetDec | MPHexEditor | standard offset format: decimal
MPHOffsetHex | MPHexEditor | standard offset format: hex, auto min width, prefixed by 0x
MPHOffsetOct | MPHexEditor | standard offset format: octal, suffixed by a small "o"
MPHTranslationDesc | MPHexEditor | long descriptions of the different translations (e.g. for menues)
MPHTranslationDescShort | MPHexEditor | short descriptions of the different translations (e.g. for status bars)
MPH_CCONV_BCD38 | MPHexEditor | ebcdic cp38..ms ansi conversion
MPH_CCONV_MAC | MPHexEditor | macintosh..ms ansi conversion
MPH_DEF_PRINT_MARGINS | MPHexEditorEx | default print margins
MPH_FILEIO_BLOCKSIZE | MPHexEditor | block size in file i/o
MPH_TK_ASCII7 | MPHexEditor | tkASCII
MPH_TK_ASCII7_S | MPHexEditor | tkASCII
MPH_TK_ASIS | MPHexEditor | tkAsIs
MPH_TK_ASIS_S | MPHexEditor | tkAsIs
MPH_TK_BCD38 | MPHexEditor | tkBCD
MPH_TK_BCD38_S | MPHexEditor | tkBCD
MPH_TK_CUSTOM | MPHexEditor | tkCustom
MPH_TK_CUSTOM_S | MPHexEditor | tkCustom
MPH_TK_DOS8 | MPHexEditor | tkDos8
MPH_TK_DOS8_S | MPHexEditor | tkDos8
MPH_TK_MAC | MPHexEditor | tkMac
MPH_TK_MAC_S | MPHexEditor | tkMac
MPH_UC | MPHexEditor | unicode
MPH_UC_BE | MPHexEditor | unicode be
MPH_UC_BE_S | MPHexEditor | unicode be
MPH_UC_S | MPHexEditor | unicode


All Functions and Procedures

Name | Unit | Description
AddU64 | MPHexEditor | addition of two unsigned int64 values, may raise an exception on error
CheckRadixToInt MPHexEditor try to find the correct radix (based on prefix/suffix) and return the number, known prefixes/suffixes are:
0x<number>, 0X<number>, $<number>, <number>h, <number>H: radix 16
o<number>, O<number>, 0<number>, <number>o, <number>O: radix 8
%<number>, <number>%: radix 2
otherwise: radix 10
CheckRadixToInt64 MPHexEditor
ConvertBinToHex | MPHexEditor | translate binary data to its hex representation (see ConvertHexToBin), (see SwapNibbles for the meaning of the SwapNibbles value)
ConvertHexToBin | MPHexEditor | translate a hexadecimal data representation ("a000 cc45 d3 42"...) to binary data (see SwapNibbles for the meaning of the SwapNibbles value)
DivideU64 | MPHexEditor | division of two unsigned int64 values, may raise an exception on error
GetTempName | MPHexEditor | get a unique filename in the temporary directory
GridCoord | MPHexEditor | convert X and Y into a TGridCoord record
IntToOctal | MPHexEditor | translate an integer to an octal string (see also IntToRadix)
IntToRadix MPHexEditor translate an integer to a radix (base) coded string, e.g.
- IntToRadix(100,16) converts into a hexadecimal (number) string
- IntToRadix(100,2) converts into a string consisting only of 0 and 1
- IntToRadix(100,8) means IntToOctal

hint: Radix must be in the range of 2..16
IntToRadix64 MPHexEditor
IntToRadixLen | MPHexEditor | translate an integer to a radix coded string and left fill with 0 (see also IntToRadix)
IntToRadixLen64 MPHexEditor
IsKeyDown | MPHexEditor | check whether the given key (VK_...) is currently down
Max | MPHexEditor | returns the higer of the two numbers
Min | MPHexEditor | returns the lower of the two numbers
ModuloU64 | MPHexEditor | modulo of two unsigned int64 values, may raise an exception on error
MPHSetHexClipboardData MPHexEditorEx
MultiplyU64 | MPHexEditor | multiplication of two unsigned int64 values, may raise an exception on error
OctalToInt | MPHexEditor | translate an number string built on radix 8 into an integer (see also RadixToInt)
RadixToInt MPHexEditor translate a radix coded number string into an integer, e.g.
- RadixToInt('0f', 16) => 15
- RadixToInt('755', 8) => 493
RadixToInt64 MPHexEditor
SubtractU64 | MPHexEditor | subtraction of two unsigned int64 values, may raise an exception on error
SwapWideChar | MPHexEditor | swap lo and high byte of a widechar
TranslateBufferFromAnsi MPHexEditor translate data from Ansi to a different character set (see also TMPHTranslationKind)
- TType: translate to this character set
- aBuffer: pointer to source data
- bBuffer: pointer to target data, must be allocated (may equal to aBuffer)
- aCount: number of bytes to translate
TranslateBufferToAnsi | MPHexEditor | translate data from a different character set to Ansi (see also TranslateBufferFromAnsi)
TryAddU64 | MPHexEditor | addition of two unsigned int64 values, returns false if an error occurred
TryDivideU64 | MPHexEditor | division of two unsigned int64 values, returns false if an error occurred
TryModuloU64 | MPHexEditor | modulo of two unsigned int64 values, returns false if an error occurred
TryMultiplyU64 | MPHexEditor | multiplication of two unsigned int64 values, returns false if an error occurred
TrySubtractU64 | MPHexEditor | subtraction of two unsigned int64 values, returns false if an error occurred


All Identifiers

Name | Unit | Description
AddU64 | MPHexEditor | addition of two unsigned int64 values, may raise an exception on error
CheckRadixToInt MPHexEditor try to find the correct radix (based on prefix/suffix) and return the number, known prefixes/suffixes are:
0x<number>, 0X<number>, $<number>, <number>h, <number>H: radix 16
o<number>, O<number>, 0<number>, <number>o, <number>O: radix 8
%<number>, <number>%: radix 2
otherwise: radix 10
CheckRadixToInt64 MPHexEditor
CM_INTUPDATECARET | MPHexEditor | this message is posted to the hex editor when it should update the caret position
CM_SELECTIONCHANGED | MPHexEditor | this message is posted when an OnSelectionChange event is to be fired
ConvertBinToHex | MPHexEditor | translate binary data to its hex representation (see ConvertHexToBin), (see SwapNibbles for the meaning of the SwapNibbles value)
ConvertHexToBin | MPHexEditor | translate a hexadecimal data representation ("a000 cc45 d3 42"...) to binary data (see SwapNibbles for the meaning of the SwapNibbles value)
DivideU64 | MPHexEditor | division of two unsigned int64 values, may raise an exception on error
EMPHexEditor | MPHexEditor | custom Exception class
GetTempName | MPHexEditor | get a unique filename in the temporary directory
GridCoord | MPHexEditor | convert X and Y into a TGridCoord record
IntToOctal | MPHexEditor | translate an integer to an octal string (see also IntToRadix)
IntToRadix MPHexEditor translate an integer to a radix (base) coded string, e.g.
- IntToRadix(100,16) converts into a hexadecimal (number) string
- IntToRadix(100,2) converts into a string consisting only of 0 and 1
- IntToRadix(100,8) means IntToOctal

hint: Radix must be in the range of 2..16
IntToRadix64 MPHexEditor
IntToRadixLen | MPHexEditor | translate an integer to a radix coded string and left fill with 0 (see also IntToRadix)
IntToRadixLen64 MPHexEditor
IsKeyDown | MPHexEditor | check whether the given key (VK_...) is currently down
Max | MPHexEditor | returns the higer of the two numbers
Min | MPHexEditor | returns the lower of the two numbers
ModuloU64 | MPHexEditor | modulo of two unsigned int64 values, may raise an exception on error
MPHCustomCharConv | MPHexEditor | this character conversion is used in translations from tkAsIs to tkCustom (see TMPHTranslationKind)
MPHOffsetDec | MPHexEditor | standard offset format: decimal
MPHOffsetHex | MPHexEditor | standard offset format: hex, auto min width, prefixed by 0x
MPHOffsetOct | MPHexEditor | standard offset format: octal, suffixed by a small "o"
MPHSetHexClipboardData MPHexEditorEx
MPHTranslationDesc | MPHexEditor | long descriptions of the different translations (e.g. for menues)
MPHTranslationDescShort | MPHexEditor | short descriptions of the different translations (e.g. for status bars)
MPH_CCONV_BCD38 | MPHexEditor | ebcdic cp38..ms ansi conversion
MPH_CCONV_MAC | MPHexEditor | macintosh..ms ansi conversion
MPH_DEF_PRINT_MARGINS | MPHexEditorEx | default print margins
MPH_FILEIO_BLOCKSIZE | MPHexEditor | block size in file i/o
MPH_TK_ASCII7 | MPHexEditor | tkASCII
MPH_TK_ASCII7_S | MPHexEditor | tkASCII
MPH_TK_ASIS | MPHexEditor | tkAsIs
MPH_TK_ASIS_S | MPHexEditor | tkAsIs
MPH_TK_BCD38 | MPHexEditor | tkBCD
MPH_TK_BCD38_S | MPHexEditor | tkBCD
MPH_TK_CUSTOM | MPHexEditor | tkCustom
MPH_TK_CUSTOM_S | MPHexEditor | tkCustom
MPH_TK_DOS8 | MPHexEditor | tkDos8
MPH_TK_DOS8_S | MPHexEditor | tkDos8
MPH_TK_MAC | MPHexEditor | tkMac
MPH_TK_MAC_S | MPHexEditor | tkMac
MPH_UC | MPHexEditor | unicode
MPH_UC_BE | MPHexEditor | unicode be
MPH_UC_BE_S | MPHexEditor | unicode be
MPH_UC_S | MPHexEditor | unicode
MultiplyU64 | MPHexEditor | multiplication of two unsigned int64 values, may raise an exception on error
OctalToInt | MPHexEditor | translate an number string built on radix 8 into an integer (see also RadixToInt)
PMPHFindTable | MPHexEditor | precompiled converted character table types for faster data search
RadixToInt MPHexEditor translate a radix coded number string into an integer, e.g.
- RadixToInt('0f', 16) => 15
- RadixToInt('755', 8) => 493
RadixToInt64 MPHexEditor
SubtractU64 | MPHexEditor | subtraction of two unsigned int64 values, may raise an exception on error
SwapWideChar | MPHexEditor | swap lo and high byte of a widechar
TCustomMPHexEditor | MPHexEditor | protected ancestor of the hex editor components
TMPHBookmark MPHexEditor bookmark record:
defined by pressing SHIFT+CTRL+[0..9], goto bookmark by pressing CTRL+[0..9]

- mPosition: file position
- mInCharField: cursor in character pane (True) or hex number pane
TMPHBookmarks | MPHexEditor | array of bookmarks, representing keys 0..9
TMPHCaretKind MPHexEditor look of the editor's caret:
- ckFull: full block
- ckLeft: left line
- ckBottom: bottom line
- ckAuto: left line if InsertMode, full block if overwrite, bottom line if ReadOnlyView
TMPHCharConv | MPHexEditor | character conversion data storage
TMPHCharConvTable | MPHexEditor | character conversion table
TMPHCharConvType | MPHexEditor | character conversion type
TMPHColors | MPHexEditor | persistent color storage (contains the colors in hex editors)
TMPHDrawCellEvent MPHexEditor owner draw event type. parameters:

- Sender: the hex editor
- ACanvas: the editor's canvas
- ACol, ARow: the position to be drawn
- AWideText: the text to be drawn
- ARect: the cell rectangle
- ADefaultDraw: if set to True (default), default drawing isperformed after the event handler returns. if set to false, the event handler must do all cell painting.
TMPHexEditor | MPHexEditor | published hex editor component
TMPHexEditorEx | MPHexEditorEx | enhanced hex editor
TMPHFindEvent MPHexEditor handler for custom search routines

- Pattern: the data to find - PatLength: length of the data to find - SearchFrom: first search position - SearchUntil: last search position - IgnoreCase: case sensitive? - Wilcard: Wildcard character (only used by FindWithWildcard) - FoundPos: result, set to -1 if data was not found
TMPHFindTable MPHexEditor
TMPHGetOffsetTextEvent MPHexEditor retrieve the "line number" to display by the application

- Number: the number to convert to text - OffsetText: the resulting text output
TMPHOffsetFormat | MPHexEditor | offset format record
TMPHOffsetFormatFlag | MPHexEditor | offset format flags
TMPHOffsetFormatFlags | MPHexEditor | set of the above flags
TMPHOLEOperation | MPHexEditorEx | is data dropped or pasted
TMPHPrintFlag MPHexEditorEx print option flags:

- pfSelectionOnly: only print data currently selected
- pfSelectionBold: render the current selection using either a bold font or inverted colors (if pfSelectionOnly isn't set)
- pfMonochrome: don't use colors, print/preview black on white
- pfUseBackgroundColor: fill the margin rect with the editor's background color (if pfMonochrome isn't set)
- pfCurrentViewOnly: just print the data currently displayed
- pfIncludeRuler: draw the ruler at every page's top
TMPHPrintOptions | MPHexEditorEx | print / preview options
TMPHProgressEvent MPHexEditor progress event handler, used in OnProgress

- ProgressType: am i loading or saving? (see TMPHProgressKind)
- aName: name of file to be load from/saved to
- Percent: current progress (0..100)
- Cancel: if set to true, the load/save procedure will abort (no meaning in Find* methods)
TMPHProgressKind MPHexEditor action indicator used in OnProgress event handler:
- pkLoad: loading data
- pkSave: saving data
- pkFind: finding
TMPHQueryPublicPropertyEvent | MPHexEditorEx | this event is called when PropertiesAsString is read or written. TMPHexEditorEx has a fixed list of properties that can be read/written using PropertiesAsString. you can exclude some of the properties by setting IsPublic to False.
TMPHTranslationKind MPHexEditor how to show a file's content in the character pane of the editor:
- tkAsIs: leave as is (current windows code page)
- tkDos8: current dos codepage
- tkASCII: 7 bit ascii
- tkMac: macintosh charset (translation always from/to ms cp 1252 (ms latin1)!!
- tkBCD: ibm ebcdic codepage 38 (translation always from/to ms cp 1252 (ms latin1)!!
- tkCustom: custom codepage stored in MPHCustomCharConv
TMPHUndoFlag | MPHexEditor | flags internally used in the undo storage
TMPHUndoFlags | MPHexEditor | set of undo flags
TranslateBufferFromAnsi MPHexEditor translate data from Ansi to a different character set (see also TMPHTranslationKind)
- TType: translate to this character set
- aBuffer: pointer to source data
- bBuffer: pointer to target data, must be allocated (may equal to aBuffer)
- aCount: number of bytes to translate
TranslateBufferToAnsi | MPHexEditor | translate data from a different character set to Ansi (see also TranslateBufferFromAnsi)
TryAddU64 | MPHexEditor | addition of two unsigned int64 values, returns false if an error occurred
TryDivideU64 | MPHexEditor | division of two unsigned int64 values, returns false if an error occurred
TryModuloU64 | MPHexEditor | modulo of two unsigned int64 values, returns false if an error occurred
TryMultiplyU64 | MPHexEditor | multiplication of two unsigned int64 values, returns false if an error occurred
TrySubtractU64 | MPHexEditor | subtraction of two unsigned int64 values, returns false if an error occurred


Legend

Private | Private
Protected | Protected
Public | Public
Published | Published