LCL: added InvalidateRgn + implementation in Win32

Win32 intf: implemented PtInRegion

git-svn-id: trunk@11350 -
This commit is contained in:
tombo 2007-06-21 11:42:22 +00:00
parent 8d73a4641c
commit 237301a1ba
5 changed files with 38 additions and 0 deletions

View File

@ -1010,6 +1010,11 @@ begin
Result := false;
end;
function TWidgetSet.InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean;
begin
Result := False;
end;
function TWidgetSet.IsDBCSLeadByte(TestChar: Byte): boolean;
begin
Result := false;

View File

@ -532,6 +532,11 @@ begin
Result := WidgetSet.InvalidateRect(aHandle, ARect, bErase);
end;
function InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean;
begin
Result := WidgetSet.InvalidateRgn(Handle, Rgn, Erase);
end;
function IsDBCSLeadByte(TestChar: Byte): boolean;
begin
Result := WidgetSet.IsDBCSLeadByte(TestChar);

View File

@ -156,6 +156,7 @@ Procedure InitializeCriticalSection(var CritSection: TCriticalSection); {$IFDEF
function IntersectClipRect(dc: hdc; Left, Top, Right,Bottom: Integer): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
//function IntersectRect --> independent
Function InvalidateRect(aHandle : HWND; ARect : pRect; bErase : Boolean) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
//function IsCharAlphaNumeric --> independent
function IsDBCSLeadByte(TestChar: Byte): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
//function IsRectEmpty --> independent

View File

@ -2447,6 +2447,20 @@ Begin
Result := Boolean(Windows.RedrawWindow(aHandle, Rect, 0, Flags));
End;
{------------------------------------------------------------------------------
Method: InvalidateRgn
Params: Handle - handle of window with changed update region
Rgn - handle to region to invalidate
Erase - specifies whether the background is to be erased
Returns: if the function succeeds
Adds a region to the specified window's update region.
------------------------------------------------------------------------------}
function TWin32WidgetSet.InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean;
begin
Result := Boolean(Windows.InvalidateRgn(Handle, Rgn, Erase));
end;
{------------------------------------------------------------------------------
Function: IntersectClipRect
Params: dc, Left, Top, Right, Bottom
@ -2688,6 +2702,17 @@ Begin
Result := Boolean(Windows.PostMessage(Handle, Msg, WParam, LParam));
End;
{------------------------------------------------------------------------------
Method: PtInRegion
Params: Rgn - handle of region
X, Y - Point coordinates to test
Returns: If the specified point lies in the region
------------------------------------------------------------------------------}
function TWin32WidgetSet.PtInRegion(Rgn: HRGN; X, Y: Integer): Boolean;
begin
Result := Boolean(Windows.PtInRegion(Rgn, X, Y));
end;
{------------------------------------------------------------------------------
Method: RadialArc
Params: DC, left, top, right, bottom, sx, sy, ex, ey

View File

@ -133,6 +133,7 @@ function HideCaret(HWnd: HWND): Boolean; Override;
function IntersectClipRect(dc: hdc; Left, Top, Right, Bottom: Integer): Integer; override;
function InvalidateRect(AHandle: HWND; Rect: PRect; BErase: Boolean): Boolean; Override;
function InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean; override;
function IsWindowEnabled(handle: HWND): boolean; override;
function IsWindowVisible(handle: HWND): boolean; override;
@ -150,6 +151,7 @@ function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; Filled, Continuous
function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: Boolean): Boolean; Override;
function Polyline(DC: HDC; Points: PPoint; NumPts: Integer): Boolean; Override;
function PostMessage(Handle: HWND; Msg: Cardinal; WParam: WParam; LParam: LParam): Boolean; Override;
Function PtInRegion(Rgn: HRGN; X, Y: Integer): Boolean; override;
function RadialArc(DC: HDC; left, top, right, bottom, sx, sy, ex, ey: Integer): Boolean; override;
function RadialChord(DC: HDC; x1, y1, x2, y2, sx, sy, ex, ey: Integer): Boolean; override;