Events


OnFileReload Fired after file auto-reload complete (when AutoReload = True).
OnSelectionChange Fired on text selection change.
OnOptionsChange Fired after an option has been changed by user.
Examples of such changable options:
  • Text encoding can be changed using right-click menu.
  • Font size can be changed using Ctrl + Mouse wheel.
OnSearchProgress Fired on text search progress.
It is of type:
  TATStreamSearchProgress = procedure(
    const ACurrentPos, AMaximalPos: Int64;
    var AContinueSearching: Boolean) of object;
Parameters:
  • ACurrentPos: Current search position.
  • AMaximalPos: Maximal search position.
  • AContinueSearching: Initially set to True. If changed to False then search will be stopped.
OnDrawLine Fired before a line is to be drawn in variable length modes (Text, Unicode).
You can use it to color the entire line or to disable line drawing.
It is of type:
  TATBinHexDrawLine = procedure(
    ASender: TObject;
    ACanvas: TCanvas;
    const AStr, AStrAll: WideString;
    const ARect: TRect;
    const ATextPnt: TPoint;
    var ADone: Boolean) of object; 
Parameters:
  • ASender: Sender ATBinHex object.
  • ACanvas: Canvas which parameters you can change. It is allowed to change ACanvas.Font.Color and ACanvas.Brush.Color only.
  • AStr: String part (counting word wrap) which is to be drawn.
  • AStrAll: String (entire, w/o counting word wrap).
  • ARect: Rectangle in which string is to be drawn.
  • ATextPnt: Point after gutter.
  • ADone: Initially False; if set to True, string will not be drawn.
OnDrawLine2 Fired after a line has been drawn in variable length modes (Text, Unicode).
You can use it to color some parts of the line.
It is of type:
  TATBinHexDrawLine2 = procedure(
    ASender: TObject;
    ACanvas: TCanvas;
    const AStr: WideString;
    const APnt: TPoint;
    const AOptions: TATBinHexOutputOptions) of object; 
Parameters:
  • ASender: Sender object.
  • ACanvas: Canvas object. You should not change canvas parameters.
  • AStr: String which has been drawn.
  • APnt: Canvas point at which string has been drawn.
  • AOptions: Helper options record. See ATBinHex.pas for details.
Note:
  • To color some part of the line, you should get string extent first. Use the StringExtent function from ATBinHex.pas for this.
OnClickURL Fired on URL/mail clicking, when URL highlighting is enabled.
It is of type:
  TATBinHexClickURL = procedure(
    ASender: TObject;
    const AString: AnsiString) of object;