mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 01:16:18 +02:00
Improves wince debug info
git-svn-id: trunk@25500 -
This commit is contained in:
parent
8655694df8
commit
8a80287608
@ -4588,6 +4588,9 @@ begin
|
||||
//DebugLn('[TWinControl.PaintHandler] ',Name,':',ClassName,' DC=',DbgS(TheMessage.DC,8));
|
||||
if (csDestroying in ComponentState) or (not HandleAllocated) then exit;
|
||||
|
||||
{$IFDEF VerboseResizeFlicker}
|
||||
DebugLn('TWinControl.PaintHandler A ',Name,':',ClassName);
|
||||
{$ENDIF}
|
||||
{$IFDEF VerboseDsgnPaintMsg}
|
||||
if csDesigning in ComponentState then
|
||||
DebugLn('TWinControl.PaintHandler A ',Name,':',ClassName);
|
||||
@ -4653,6 +4656,11 @@ var
|
||||
P: TPoint;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
':> [TWinControl.PaintControls] A');
|
||||
{$endif}
|
||||
|
||||
//DebugLn('[TWinControl.PaintControls] ',Name,':',ClassName,' DC=',DbgS(DC,8));
|
||||
if (csDestroying in ComponentState)
|
||||
or ((DC=0) and (not HandleAllocated)) then
|
||||
@ -4667,6 +4675,10 @@ begin
|
||||
// they are repainted as part of the parent:
|
||||
if FControls <> nil then
|
||||
begin
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
':> [TWinControl.PaintControls] B');
|
||||
{$endif}
|
||||
I := 0;
|
||||
if First <> nil then
|
||||
begin
|
||||
@ -4677,6 +4689,11 @@ begin
|
||||
while I < Count do
|
||||
begin
|
||||
TempControl := TControl(FControls.Items[I]);
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
Format(':> [TWinControl.PaintControls] C DC=%d TempControl=%s Left=%d Top=%d Width=%d Height=%d',
|
||||
[DC, TempControl.Name, TempControl.Left, TempControl.Top, TempControl.Width, TempControl.Height]));
|
||||
{$endif}
|
||||
if not (TempControl is TWinControl) then begin
|
||||
//DebugLn('TWinControl.PaintControls B Self=',Self.Name,':',Self.ClassName,' Control=',TempControl.Name,':',TempControl.ClassName,' ',TempControl.Left,',',TempControl.Top,',',TempControl.Width,',',TempControl.Height);
|
||||
with TempControl do
|
||||
|
@ -326,6 +326,12 @@ Var
|
||||
if lWinControl = nil then exit;
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG_WINCE_LABELS}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
Format('[SendPaintMessage]: Control:%s',
|
||||
[lWinControl.Name]));
|
||||
{$ENDIF}
|
||||
|
||||
// create a paint message
|
||||
isNativeControl := GetIsNativeControl(Window);
|
||||
ParentPaintWindow := 0;
|
||||
@ -1781,6 +1787,9 @@ begin
|
||||
end;
|
||||
WM_PAINT:
|
||||
begin
|
||||
{$IFDEF DEBUG_WINCE_LABELS}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log', '[WM_PAINT]');
|
||||
{$ENDIF}
|
||||
SendPaintMessage(HDC(WParam));
|
||||
// SendPaintMessage sets winprocess to false
|
||||
end;
|
||||
|
@ -1010,7 +1010,7 @@ begin
|
||||
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
Format('GetLCLClientBoundsOffset Name=%s OLeft=%d OTop=%d ORight=%d OBottom=%d ORight=%d OBottom=%d',
|
||||
Format('GetLCLClientBoundsOffset Name=%s OLeft=%d OTop=%d ORight=%d OBottom=%d ARight=%d ABottom=%d',
|
||||
[TheWinControl.Name, ORect.Left, ORect.Top, ORect.Right, ORect.Bottom, ARect.Right, ARect.Bottom]));
|
||||
{$endif}
|
||||
|
||||
|
@ -1014,8 +1014,11 @@ var
|
||||
s: AnsiString;
|
||||
w: WideString;
|
||||
begin
|
||||
Assert(False, Format('trace:> [TWinCEWidgetSet.DrawText] DC:0x%x, Str:''%s'', Count: %d, Rect = %d,%d,%d,%d, Flags:%d',
|
||||
{$IFDEF DEBUG_WINCE_LABELS}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
Format('trace:> [TWinCEWidgetSet.DrawText] DC:0x%x, Str:''%s'', Count: %d, Rect = %d,%d,%d,%d, Flags:%d',
|
||||
[DC, Str, Count, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom, Flags]));
|
||||
{$ENDIF}
|
||||
|
||||
// use temp buffer, if count is set, there might be no null terminator
|
||||
if count = -1 then
|
||||
@ -1438,7 +1441,8 @@ begin
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
lControl := TControl(LCLIntf.GetLCLOwnerObject(HWnd));
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
Format(':> [TWinCEWidgetSet.GetDC] Name=%s DC=%d', [lControl.Name, Result]));
|
||||
Format(':> [TWinCEWidgetSet.GetDC] Name=%s DC=%s',
|
||||
[lControl.Name, IntToHex(Result, 8)]));
|
||||
{$endif}
|
||||
|
||||
MoveWindowOrgEx(Result, ORect.Left, ORect.Top);
|
||||
@ -2497,6 +2501,11 @@ end;
|
||||
function TWinCEWidgetSet.RectVisible(dc : hdc; const ARect: TRect) : Boolean;
|
||||
begin
|
||||
Result := Boolean(Windows.RectVisible(DC, LPRECT(@ARect)^));
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
DbgAppendToFile(ExtractFilePath(ParamStr(0)) + '1.log',
|
||||
Format(':> [TWinCEWidgetSet.RectVisible] Result=%d',
|
||||
[Integer(Result)]));
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{function TWinCEWidgetSet.RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer
|
||||
|
@ -68,10 +68,14 @@ type
|
||||
|
||||
class function GetPageRealIndex(const ANotebook: TCustomNotebook; AIndex: Integer): Integer; override;
|
||||
class function GetTabIndexAtPos(const ANotebook: TCustomNotebook; const AClientPos: TPoint): integer; override;
|
||||
class function GetTabRect(const ANotebook: TCustomNotebook; const AIndex: Integer): TRect; override;
|
||||
class function GetCapabilities: TNoteBookCapabilities;override;
|
||||
class function GetDesignInteractive(const AWinControl: TWinControl; AClientPos: TPoint): Boolean; override;
|
||||
class procedure SetImageList(const ANotebook: TCustomNotebook; const AImageList: TCustomImageList); override;
|
||||
class procedure SetPageIndex(const ANotebook: TCustomNotebook; const AIndex: integer); override;
|
||||
class procedure SetTabPosition(const ANotebook: TCustomNotebook; const ATabPosition: TTabPosition); override;
|
||||
class procedure ShowTabs(const ANotebook: TCustomNotebook; AShowTabs: boolean); override;
|
||||
class procedure UpdateProperties(const ANotebook: TCustomNotebook); override;
|
||||
end;
|
||||
|
||||
{ TWinCEWSPage }
|
||||
@ -295,7 +299,7 @@ begin
|
||||
with Params do
|
||||
begin
|
||||
pClassName := @ClsName;
|
||||
Flags := Flags and not WS_VISIBLE;
|
||||
// Flags := Flags and not WS_VISIBLE;
|
||||
SubClassWndProc := nil;
|
||||
end;
|
||||
// create window
|
||||
@ -552,9 +556,9 @@ var
|
||||
X: Integer;
|
||||
begin
|
||||
Result := AIndex;
|
||||
for X := 0 to AIndex-1 do begin
|
||||
|
||||
for X := 0 to AIndex - 1 do
|
||||
if ANotebook.Page[X].TabVisible = False then Dec(Result);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SendSelChangeMessage(const ANotebook: TCustomNotebook; const AHandle: HWND;
|
||||
@ -583,6 +587,34 @@ begin
|
||||
Result := Windows.SendMessage(ANotebook.Handle, TCM_HITTEST, 0, LPARAM(@hittestInfo));
|
||||
end;
|
||||
|
||||
class function TWinCEWSCustomNotebook.GetTabRect(
|
||||
const ANotebook: TCustomNotebook; const AIndex: Integer): TRect;
|
||||
var
|
||||
Orect: TRect;
|
||||
begin
|
||||
GetLCLClientBoundsOffset(ANotebook, ORect);
|
||||
if Windows.SendMessage(ANotebook.Handle, TCM_GETITEMRECT, WPARAM(AIndex), LPARAM(@Result)) <> 0
|
||||
then begin
|
||||
Result.Top := Result.Top - Orect.Top;
|
||||
Result.Bottom := Result.Bottom - Orect.Top;
|
||||
Result.Left := Result.Left - Orect.Left;
|
||||
Result.Right := Result.Right - Orect.Left;
|
||||
end
|
||||
else
|
||||
Result := inherited GetTabRect(ANotebook, AIndex);
|
||||
end;
|
||||
|
||||
class function TWinCEWSCustomNotebook.GetCapabilities: TNoteBookCapabilities;
|
||||
begin
|
||||
Result:=[];
|
||||
end;
|
||||
|
||||
class function TWinCEWSCustomNotebook.GetDesignInteractive(
|
||||
const AWinControl: TWinControl; AClientPos: TPoint): Boolean;
|
||||
begin
|
||||
Result:=inherited GetDesignInteractive(AWinControl, AClientPos);
|
||||
end;
|
||||
|
||||
class procedure TWinCEWSCustomNotebook.SetImageList(
|
||||
const ANotebook: TCustomNotebook; const AImageList: TCustomImageList);
|
||||
begin
|
||||
@ -637,6 +669,12 @@ begin
|
||||
RemoveAllNBPages(ANotebook);
|
||||
end;
|
||||
|
||||
class procedure TWinCEWSCustomNotebook.UpdateProperties(
|
||||
const ANotebook: TCustomNotebook);
|
||||
begin
|
||||
inherited UpdateProperties(ANotebook);
|
||||
end;
|
||||
|
||||
{ TWinCEWSCustomPanel }
|
||||
|
||||
class function TWinCEWSCustomPanel.CreateHandle(const AWinControl: TWinControl;
|
||||
|
Loading…
Reference in New Issue
Block a user