TMPHexEditor = class(TCustomMPHexEditor)
published
property Align;
property Anchors;
property BiDiMode;
property BorderSpacing;
property BorderStyle;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnMouseWheel;
property OnMouseWheelDown;
property OnMouseWheelUp;
property OnStartDock;
property OnStartDrag;
property ParentBiDiMode;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ScrollBars;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property BytesPerRow;
property BytesPerColumn;
property AutoBytesPerRow;
property Translation;
property OffsetFormat;
property CaretKind;
property Colors;
property FocusFrame;
property SwapNibbles;
property MaskChar;
property NoSizeChange;
property AllowInsertMode;
property DrawGridLines;
property WantTabs;
property ReadOnlyView;
property HideSelection;
property GraySelectionIfNotFocused;
property GutterWidth;
property BookmarkBitmap;
property Version;
property MaxUndo;
property InsertMode;
property HexLowerCase;
property OnProgress;
property OnInvalidKey;
property OnTopLeftChanged;
property OnChange;
property DrawGutter3D;
property ShowRuler;
property BytesPerUnit;
property RulerBytesPerUnit;
property ShowPositionIfNotFocused;
property OnSelectionChanged;
property UnicodeChars;
property UnicodeBigEndian;
property OnDrawCell;
property OnBookmarkChanged;
property OnGetOffsetText;
property BytesPerBlock;
property SeparateBlocksInCharField;
property FindProgress;
property RulerNumberBase;
end;
TCustomMPHexEditor = class(TCustomGrid)
public
{$IFDEF FASTACCESS}
function GetFastPointer(const Index, Count: integer): PByte;
{$ENDIF}
constructor Create(aOwner: TComponent); override;
destructor Destroy; override;
property MaskedChars: TSysCharSet read FMaskedChars write SetMaskedChars;
property DrawDataPosition: integer read FDrawDataPosition;
property IsDrawDataSelected: boolean read FIsDrawDataSelected;
function GetMemory(const Index: Integer): char;
function CanFocus: Boolean; override;
procedure SetMemory(const Index: integer; const Value: char);
property IsMaxOffset: boolean read FIsMaxOffset;
procedure SeekToEOF;
procedure SyncView(Source: TCustomMPHexEditor; SyncOffset: integer = 0);
function DisplayStart: integer;
function DisplayEnd: integer;
function IsSelected(const APosition: integer): boolean;
property PositionAtCursor[const ACol, ARow: integer]: integer read
GetPositionAtCursor;
property IsCharFieldCol[const ACol: integer]: Boolean read
GetIsCharFieldCol;
{$IFDEF FASTACCESS}
property SetDataSizeFillByte: Byte read FSetDataSizeFillByte write
FSetDataSizeFillByte;
{$ENDIF}
property HasFile: boolean read FHasFile write FHasFile;
function UndoBeginUpdate: integer; virtual;
function UndoEndUpdate: integer; virtual;
procedure ResetSelection(const aDraw: boolean);
property SelectionAsHex: string read GetSelectionAsHex write
SetSelectionAsHex;
property SelectionAsText: string read GetSelectionAsText write
SetSelectionAsText;
property FindTable: TMPHFindTable read FFindTable;
property FindTableI: TMPHFindTable read FFindTableI;
property OnFind: TMPHFindEvent read FOnFind write FOnFind;
property OnWildcardFind: TMPHFindEvent read FOnWildcardFind
write FOnWildcardFind;
function GetOffsetString(const Position: cardinal): string; virtual;
function GetAnyOffsetString(const Position: integer): string; virtual;
function RowHeight: integer;
procedure ResetUndo;
function Seek(const aOffset, aOrigin: integer): integer;
function Find(aBuffer: PChar; aCount: integer; const aStart, aEnd: integer;
const IgnoreCase: boolean): integer;
function FindWithWildcard(aBuffer: PChar; aCount: integer; const aStart,
aEnd: integer;
const IgnoreCase: boolean; const Wildcard: char): integer;
procedure AddSelectionUndo(const AStart, ACount: integer);
function PrepareFindReplaceData(StrData: string; const IgnoreCase, IsText:
boolean): string;
procedure ReadBuffer(var Buffer; const Index, Count: Integer);
procedure WriteBuffer(const Buffer; const Index, Count: Integer); virtual;
procedure DeleteSelection(const UndoDesc: string = '');
procedure LoadFromStream(Strm: TStream);
procedure LoadFromFile(const Filename: string);
procedure SaveToStream(Strm: TStream);
procedure SaveToFile(const Filename: string;
const aUnModify: boolean = True);
procedure SaveRangeToStream(Strm: TStream; const APosition, ACount:
integer);
function Undo: boolean;
function Redo: boolean;
procedure CreateEmptyFile(const TempName: string);
function BufferFromFile(const aPos: integer; var aCount: integer): PChar;
procedure InsertBuffer(aBuffer: PChar; const aSize, aPos: integer; const
UndoDesc: string = ''; const MoveCursor: Boolean = True);
procedure AppendBuffer(aBuffer: PChar; const aSize: integer; const UndoDesc:
string = ''; const MoveCursor: Boolean = True);
procedure ReplaceSelection(aBuffer: PChar; aSize: integer; const UndoDesc:
string = ''; const MoveCursor: Boolean = True);
function Replace(aBuffer: PChar; aPosition, aOldCount, aNewCount: integer;
const UndoDesc:
string = ''; const MoveCursor: Boolean = False): integer;
function GetCursorPos: integer;
function DeleteNibble(const aPos: integer; const HighNibble: boolean; const
UndoDesc: string = ''): boolean;
function InsertNibble(const aPos: integer; const HighNibble: boolean; const
UndoDesc: string = ''): boolean;
procedure ConvertRange(const aFrom, aTo: integer; const aTransFrom,
aTransTo: TMPHTranslationKind; const UndoDesc: string = '');
function GetTopLeftPosition(var oInCharField: boolean): integer;
procedure SetTopLeftPosition(const aPosition: integer; const aInCharField:
boolean);
function ShowDragCell(const X, Y: integer): integer;
procedure HideDragCell;
procedure CombineUndo(const aCount: integer; const sDesc: string = '');
function TranslateToAnsiChar(const aByte: byte): char;
function TranslateFromAnsiChar(const aByte: byte): char;
property SelStart: integer read GetSelStart write SetSelStart;
property SelEnd: integer read GetSelEnd write SetSelEnd;
property SelCount: integer read GetSelCount write SetSelCount;
property CanUndo: boolean read GetCanUndo;
property CanRedo: boolean read GetCanRedo;
property InCharField: boolean read GetInCharField write SetInCharField;
property UndoDescription: string read GetUndoDescription;
property ReadOnlyFile: boolean read FIsFileReadonly write SetReadOnlyFile;
property Modified: boolean read GetModified write SetModified;
property DataSize: integer read GetDataSize write SetDataSize;
property Data[Index: integer]: Byte read GetDataAt write SetDataAt;
property AsText: string read GetAsText write SetAsText;
property AsHex: string read GetAsHex write SetAsHex;
property Filename: string read FFileName;
property Bookmark[Index: byte]: TMPHBookmark read GetBookmark write
SetBookmark;
property ByteChanged[index: integer]: boolean read HasChanged write
SetChanged;
property ColCountRO: integer read GetPropColCount;
property RowCountRO: integer read GetPropRowCount;
property MouseOverSelection: boolean read GetMouseOverSelection;
property CurrentValue: integer read GetCurrentValue;
procedure SelectAll;
property VisibleColCount;
property VisibleRowCount;
property Canvas;
property Col;
property LeftCol;
property Row;
property TopRow;
property OnBookmarkChanged: TNotifyEvent read FOnBookmarkChanged write
FOnBookmarkChanged;
function GotoBookmark(const Index: integer): boolean;
procedure UpdateGetOffsetText;
procedure CenterCursorPosition;
end;