MG: fixed parser of end blocks in initialization section added label sections

git-svn-id: trunk@1010 -
This commit is contained in:
lazarus 2002-02-09 01:47:38 +00:00
parent 3b16346f6f
commit a8cd67bd10
6 changed files with 81 additions and 2 deletions

View File

@ -88,10 +88,45 @@ type
TCanvasState = set of TCanvasStates;
TCanvasOrientation = (csLefttoRight, coRighttoLeft);
{ TProgressEvent is a generic progress notification event which may be
used by TGraphic classes with computationally intensive (slow)
operations, such as loading, storing, or transforming image data.
Event params:
Stage - Indicates whether this call to the OnProgress event is to
prepare for, process, or clean up after a graphic operation. If
OnProgress is called at all, the first call for a graphic operation
will be with Stage = psStarting, to allow the OnProgress event handler
to allocate whatever resources it needs to process subsequent progress
notifications. After Stage = psStarting, you are guaranteed that
OnProgress will be called again with Stage = psEnding to allow you
to free those resources, even if the graphic operation is aborted by
an exception. Zero or more calls to OnProgress with Stage = psRunning
may occur between the psStarting and psEnding calls.
PercentDone - The ratio of work done to work remaining, on a scale of
0 to 100. Values may repeat or even regress (get smaller) in
successive calls. PercentDone is usually only a guess, and the
guess may be dramatically altered as new information is discovered
in decoding the image.
RedrawNow - Indicates whether the graphic can be/should be redrawn
immediately. Useful for showing successive approximations of
an image as data is available instead of waiting for all the data
to arrive before drawing anything. Since there is no message loop
activity during graphic operations, you should call Update to force
a control to be redrawn immediately in the OnProgress event handler.
Redrawing a graphic when RedrawNow = False could corrupt the image
and/or cause exceptions.
Rect - Area of image that has changed and needs to be redrawn.
Msg - Optional text describing in one or two words what the graphic
class is currently working on. Ex: "Loading" "Storing"
"Reducing colors". The Msg string can also be empty.
Msg strings should be resourced for translation, should not
contain trailing periods, and should be used only for
display purposes. (do not: if Msg = 'Loading' then...)
}
TProgressStage = (psStarting, psRunning, psEnding);
TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage;
PercentDone: Byte; RedrawNow: Boolean; const R: TRect;
const Msg: string) of object;
PercentDone: Byte; RedrawNow: Boolean; const R: TRect;
const Msg: string) of object;
TBevelCut = (bvNone, bvLowered, bvRaised);
@ -106,6 +141,9 @@ end.
{ =============================================================================
$Log$
Revision 1.2 2002/03/08 16:16:55 lazarus
MG: fixed parser of end blocks in initialization section added label sections
Revision 1.1 2002/02/03 00:24:00 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can

View File

@ -374,6 +374,19 @@ begin
LCLLinux.FillRect(FHandle, Rect, Brush.Handle);
end;
{------------------------------------------------------------------------------
Method: TCanvas.FillRect
Params: X, Y: Integer; Color: TColor; FillStyle: TFillStyle
Returns: Nothing
------------------------------------------------------------------------------}
procedure TCanvas.FloodFill(X, Y: Integer; FillColor: TColor; FillStyle: TFillStyle
);
begin
RequiredState([csHandleValid, csBrushValid]);
LCLLinux.FloodFill(FHandle, X, Y, FillColor, FillStyle, Brush.Handle);
end;
{------------------------------------------------------------------------------
Method: TCanvas.Frame3d
Params: Rect
@ -810,6 +823,9 @@ end;
{ =============================================================================
$Log$
Revision 1.16 2002/03/08 16:16:55 lazarus
MG: fixed parser of end blocks in initialization section added label sections
Revision 1.15 2002/02/03 00:24:01 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can

View File

@ -179,6 +179,12 @@ begin
Result := False;
end;
function TInterfaceBase.FloodFill(DC: HDC; X, Y: Integer; Color: TColor;
FillStyle: TFillStyle; Brush: HBRUSH): Boolean;
begin
Result := false;
end;
function TInterfaceBase.Frame3d(DC: HDC; var Rect: TRect; const FrameWidth : integer; const Style : TBevelCut) : boolean;
begin
Result:= false;
@ -537,6 +543,9 @@ end;
{ =============================================================================
$Log$
Revision 1.26 2002/03/08 16:16:55 lazarus
MG: fixed parser of end blocks in initialization section added label sections
Revision 1.25 2002/02/03 00:24:01 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can

View File

@ -180,6 +180,12 @@ begin
Result := InterfaceObject.FillRect(DC, Rect, Brush);
end;
function FloodFill(DC: HDC; X, Y: Integer; Color: TColor;
FillStyle: TFillStyle; Brush: HBRUSH): Boolean;
begin
Result := InterfaceObject.FloodFill(DC,X,Y,Color,FillStyle,Brush);
end;
function Frame3d(DC : HDC; var Rect : TRect; const FrameWidth : integer; const Style : TBevelCut) : boolean;
begin
Result:= InterfaceObject.Frame3d(DC, Rect, FrameWidth, Style);
@ -1058,6 +1064,9 @@ end;
{ =============================================================================
$Log$
Revision 1.25 2002/03/08 16:16:55 lazarus
MG: fixed parser of end blocks in initialization section added label sections
Revision 1.24 2002/02/03 00:24:01 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can

View File

@ -66,6 +66,7 @@ function Ellipse(DC: HDC; x1, y1, x2, y2: Integer): Boolean; {$IFDEF IF_BASE_MEM
function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function FillRect(DC: HDC; const Rect: TRect; Brush: HBRUSH): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function FloodFill(DC: HDC; X, Y: Integer; Color: TColor; FillStyle: TFillStyle; Brush: HBRUSH): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function Frame3d(DC: HDC; var Rect: TRect; const FrameWidth : integer; const Style : TBevelCut): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
Function GetActiveWindow : HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
@ -248,6 +249,9 @@ function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): Boolean
{ =============================================================================
$Log$
Revision 1.21 2002/03/08 16:16:55 lazarus
MG: fixed parser of end blocks in initialization section added label sections
Revision 1.20 2002/02/03 00:24:01 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can

View File

@ -69,6 +69,9 @@ end.
{
$Log$
Revision 1.16 2002/03/08 16:16:55 lazarus
MG: fixed parser of end blocks in initialization section added label sections
Revision 1.15 2002/02/03 00:24:00 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can