IDEIntf: added TIDEHTMLControlIntf.GetPreferredControlSize

git-svn-id: trunk@13533 -
This commit is contained in:
mattias 2007-12-30 11:36:24 +00:00
parent 88d02f87da
commit dc751454a6
4 changed files with 17 additions and 1 deletions

View File

@ -45,6 +45,7 @@ type
procedure SetURL(const AValue: string);
property Provider: TAbstractIDEHTMLProvider read FProvider write SetProvider;
procedure SetHTMLContent(Stream: TStream);
procedure GetPreferredControlSize(out AWidth, AHeight: integer);
end;
function IPCreateLazIDEHTMLControl(Owner: TComponent;
@ -184,5 +185,11 @@ begin
SetHtml(NewHTML);
end;
procedure TIPLazHtmlControl.GetPreferredControlSize(out AWidth, AHeight: integer);
begin
AWidth:=500;
AHeight:=250;
end;
end.

View File

@ -106,6 +106,7 @@ type
procedure SetURL(const AValue: string);
property Provider: TAbstractIDEHTMLProvider read FProvider write SetProvider;
procedure SetHTMLContent(Stream: TStream);
procedure GetPreferredControlSize(out AWidth, AHeight: integer);
end;
{ TIDEHelpDatabases }
@ -329,6 +330,13 @@ begin
Caption:=HTMLToCaption(s);
end;
procedure TSimpleHTMLControl.GetPreferredControlSize(out AWidth, AHeight: integer);
begin
AWidth:=0;
AHeight:=0;
GetPreferredSize(AWidth,AHeight);
end;
{ TLazIDEHTMLProvider }
procedure TLazIDEHTMLProvider.SetProviders(const AValue: TLIHProviders);

View File

@ -78,6 +78,7 @@ type
procedure SetURL(const AValue: string);
property URL: string read GetURL write SetURL;
procedure SetHTMLContent(Stream: TStream);
procedure GetPreferredControlSize(out AWidth, AHeight: integer);
end;
{ TAbstractIDEHTMLProvider

View File

@ -81,7 +81,7 @@ var
begin
ARect := ClientRect;
Canvas.Brush.Color := Color;
DebugLn(['THintWindow.Paint Canvas.Brush.Color=',dbgs(Canvas.Brush.Color)]);
//DebugLn(['THintWindow.Paint Canvas.Brush.Color=',dbgs(Canvas.Brush.Color)]);
Canvas.Pen.Width := 1;
Canvas.FillRect(ARect);
DrawEdge(Canvas.Handle, ARect, BDR_RAISEDOUTER, BF_RECT);