Class THexDump (unit ASHexDump)

Inherits from

TCustomControl

Constructors


constructor Create(AOwner: TComponent);

THexDump


Functions

destructor Destroy;


procedure CreateParams(var Params: TCreateParams);

procedure THexDump.

procedure KeyDown(var Key: Word; Shift: TShiftState);

Event Overrides

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);


procedure Paint;


procedure AdjustScrollBars;

procedure THexDump.

procedure CalcPaintParams;

FCharData: array[0.

procedure CMEnter(var Message: TCMGotFocus);


procedure CMExit(var Message: TCMLostFocus);

InvalidateLineMarker;

procedure CMFontChanged(var Message: TMessage);

procedure InvalidateLine(Index: Integer);

VCL Command Messages


function GetFileColor(Index: Integer): TColor;


function LineAddr(Index: Integer): PChar;


function LineChars(Index: Integer): PChar;


function LineData(Index: Integer): PChar;


function ScrollIntoView: Boolean;


procedure SetAddress(Value: Pointer);


procedure SetBorder(Value: TBorderStyle);

Property Set/Get Routines

procedure SetCurrentLine(Value: Integer);


procedure SetDataSize(Value: Integer);


procedure SetFileColor(Index: Integer; Value: TColor);


procedure SetShowAddress(Value: Boolean);


procedure SetShowCharacters(Value: Boolean);


procedure SetTopLine(Value: Integer);


procedure WMGetDlgCode(var Message: TWMGetDlgCode);


procedure WMSize(var Message: TWMSize);

Windows Messages

procedure WMVScroll(var Message: TWMVScroll);


Properties

property AddressColor : TColor


property Align :


property AnsiCharColor : TColor


property Border : TBorderStyle


property Color :


property Ctl3D :


property Font :


property HexDataColor : TColor


property ShowAddress : Boolean


property ShowCharacters : Boolean


property TabOrder :


property TabStop :


property Address : Pointer


property CurrentLine : Integer


property DataSize : Integer


Events

Variables

FActive : Boolean;


FAddress : Pointer;


FBorder : TBorderStyle;


FBytesPerLine : Integer;


FCurrentLine : Integer;


FDataSize : Integer;


FFileColors : array[0..2] of TColor;


FHexData : THexStrArray;


FItemHeight : Integer;


FItemWidth : Integer;


FLineAddr : array[0..15] of char;


FLineCount : Integer;


FShowAddress : Boolean;


FShowCharacters : Boolean;


FTopLine : Integer;


FVisibleLines : Integer;



Constructors


constructor Create(AOwner: TComponent);

THexDump


Functions


destructor Destroy;


procedure CreateParams(var Params: TCreateParams);

procedure THexDump.CheckActive; begin if not FActive then raise Exception.Create('Operation not allowed unless viewing data'); end;


procedure KeyDown(var Key: Word; Shift: TShiftState);

Event Overrides


procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);


procedure Paint;


procedure AdjustScrollBars;

procedure THexDump.InvalidateLine(Index: Integer); var R: TRect; begin if (Index >= FTopLine) and (Index <= FTopLine + FVisibleLines - 1) then begin R := Rect(0, 0, ClientWidth, FItemHeight); OffsetRect(R, 0, (Index - FTopLine) * FItemHeight); Windows.InvalidateRect(Handle, @R, False); end; end;


procedure CalcPaintParams;

FCharData: array[0..MAXDIGITS] of char; procedure CheckActive;

Painting Related


procedure CMEnter(var Message: TCMGotFocus);


procedure CMExit(var Message: TCMLostFocus);

InvalidateLineMarker;


procedure CMFontChanged(var Message: TMessage);

procedure InvalidateLine(Index: Integer);

VCL Command Messages


function GetFileColor(Index: Integer): TColor;


function LineAddr(Index: Integer): PChar;


function LineChars(Index: Integer): PChar;


function LineData(Index: Integer): PChar;


function ScrollIntoView: Boolean;


procedure SetAddress(Value: Pointer);


procedure SetBorder(Value: TBorderStyle);

Property Set/Get Routines


procedure SetCurrentLine(Value: Integer);


procedure SetDataSize(Value: Integer);


procedure SetFileColor(Index: Integer; Value: TColor);


procedure SetShowAddress(Value: Boolean);


procedure SetShowCharacters(Value: Boolean);


procedure SetTopLine(Value: Integer);


procedure WMGetDlgCode(var Message: TWMGetDlgCode);


procedure WMSize(var Message: TWMSize);

Windows Messages


procedure WMVScroll(var Message: TWMVScroll);


Properties


property AddressColor : TColor


property Align :


property AnsiCharColor : TColor


property Border : TBorderStyle


property Color :


property Ctl3D :


property Font :


property HexDataColor : TColor


property ShowAddress : Boolean


property ShowCharacters : Boolean


property TabOrder :


property TabStop :


property Address : Pointer


property CurrentLine : Integer


property DataSize : Integer


Events


Variables


FActive : Boolean;


FAddress : Pointer;


FBorder : TBorderStyle;


FBytesPerLine : Integer;


FCurrentLine : Integer;


FDataSize : Integer;


FFileColors : array[0..2] of TColor;


FHexData : THexStrArray;


FItemHeight : Integer;


FItemWidth : Integer;


FLineAddr : array[0..15] of char;


FLineCount : Integer;


FShowAddress : Boolean;


FShowCharacters : Boolean;


FTopLine : Integer;


FVisibleLines : Integer;