Unit ansiview

Unit AnsiView : TAnsiView component. Written by C.Geng from P.R.China, 1998 The purpose is displaying BBS ansi color file in Delphi. Anyhow, the code is not completed, quite a lot of ansi control function has not been implemented. I will try, but if you have any good idea, please email me: fuse@bbs.zju.ml.org Big thanks to Alexander Kuznetsov (sanhome@hotmail.com) for his jmpmemo component, I setup the structure of my code based on it. Some ansi output code is borrowed from GAYLE DAVIS/DAVID ANDERSON I get it from SWAG. Thanks to their good work! { 15-06-98 Update by Geng Chen Ge - fuse@bbs.zju.ml.org - Hyperlink surport, recognize mail address, http, ftp and event generate when clicked. - Select, Copy Paste surport, too much blink when select, who can solve it? - I am using it now in a e-mail client software, seems work well :-) { 2-06-98 Update by: Alex Mera Orellana - amera@ibm.net - BackgroundColor bug solved. Now works allways, even with bsTilled and bsTilledAndScrolled styles. - bsTilledAndScrolled bug solved. It didn't work before. - ScrollBars property replaced with HideScrollBars property. Now, if HideScrollBars = False, then ScrollBars are displayed just when they are needed. If HideScrollBars = True, they are never displayed. - Horizontal Scroll has been improved. Now it is smoother, even with tilled backgrounds. - Internal variables VPos, HPos, SmallStep, used in the DrawBack procedure, have been removed. VPos is replaced with FOrigin.Y, HPos with FOrigin.X, and SmallStep is properly replaced with FCharSize.X and FCharSize.Y { 10-4-1998 update by: Indra Gunawan - igun@elga.net.id This version is updated in several section : - background color is accessed from FColor variable bug: on design time, the color doesn't change - fix the paint bug (if the component is overlapped by other window) - additional safety for string manipulation in AnsiWrite procedure

Classes

TAnsiView - ------------------------------------------------------------------
TSVLink -

Functions

Register -

Types

TBackgroundStyle
TLinkType
TSVLinkEvent

Constants

ColorArray

Variables


Functions


procedure Register;


Types


TBackgroundStyle = (bsNoBitmap, bsStretched, bsTiled, bsTiledAndScrolled);
------------------------------------------------------------------
TLinkType = (ltMailto, ltHttp, ltFTP);

TSVLinkEvent=procedure(Sender: TObject; Link: string) of object
TSVLinkPtr=^TSVLink;

Constants

ColorArray = ( clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clSilver, clGray, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite)


Variables