The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home GuiPack HtmlLab Interface of SDL_HtmlLab | |
See also: Properties and Methods of HtmlLab | |
Interface of SDL_HtmlLab |
|
const {$IFDEF PAIDVERS} SDLVersionInfo = 'htmllabel_r1200_full'; IsLightEd = false; {$ELSE} SDLVersionInfo = 'htmllabel_r1200_lighted'; IsLightEd = true; {$ENDIF} Release = 1200; type ESDLHtmlLabelError = class(ESDLError); { exception type to indicate errors } THtmlLab = class (TGraphicControl) private FAlignment : TAlignment; { alignment of label } FColorBkg : TColor; { color of panel background } FTransparent : boolean; { true: transparent background } FFrameStyle : TFrameStyle; FCaption : string; { string containing the HTML text } FBaseY : integer; FSuppExcept : boolean; FIgnoreColTags : boolean; procedure SetAlignment (value: TAlignment); procedure SetColorBkg (Value: TColor); procedure SetTransparent (x: boolean); procedure SetCaption (Value: string); procedure SetBaseY (Value: integer); procedure SetFrameStyle (value: TFrameStyle); procedure SetIgnoreColTags (Value: boolean); protected procedure Paint; override; procedure AssignTo (Dest: TPersistent); override; procedure FontChanged (Sender: TObject); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure Assign(Source: TPersistent); override; published property Align; property Alignment: TAlignment read FAlignment write SetALignment; property Anchors; property Caption: string read FCaption write SetCaption; property ColorBkg: TColor read FColorBkg write SetColorBkg; property Font; property FrameStyle: TFrameStyle read FFrameStyle write SetFrameStyle; property IgnoreColorTags: boolean read FIgnoreColTags write SetIgnoreColTags; property ParentFont; property ParentShowHint; property PosY: integer read FBaseY write SetBaseY; property ShowHint; property SuppressExceptions: boolean read FSuppExcept write FSuppExcept; {$IFDEF GE_LEV17} (**) property StyleElements; {$ENDIF} property Transparent: boolean read FTransparent write SetTransparent; property Visible; property OnClick; property OnDblClick; property OnMouseMove; property OnMouseDown; property OnMouseUp; property OnContextPopup; end; function RenderHTMLTextOnCanvas (HtmlCode : string; { HTML code to control the text layout } Canvas : TCanvas; { canvas to be written to } xpos, ypos : integer; { position where to render the text } SuppressExceptions : boolean; { TRUE: suppress exceptions } ForceTxtColor : boolean;{ TRUE: ignore color tag and enforce TxtColor } TxtColor : TColor) { color to be used if ForceTxtColor is TRUE } : integer; { end point of rendered text }
|