mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-07 20:46:12 +02:00
Adds TWidgetset.DebugLogLn for widgetset implemented logs
git-svn-id: trunk@32093 -
This commit is contained in:
parent
a508edf92f
commit
c85b5cb9b9
@ -100,6 +100,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWidgetSet.DebugLogLn(const s: string);
|
||||||
|
begin
|
||||||
|
if Assigned(LCLProc.DebugText) then
|
||||||
|
WriteLn(LCLProc.DebugText^, s);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWidgetSet.DebugLog(const s: string);
|
||||||
|
begin
|
||||||
|
if Assigned(LCLProc.DebugText) then
|
||||||
|
Write(LCLProc.DebugText^, s);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TWidgetSet.DCSetAntialiasing(CanvasHandle: HDC; AEnabled: Boolean);
|
procedure TWidgetSet.DCSetAntialiasing(CanvasHandle: HDC; AEnabled: Boolean);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
@ -159,6 +159,9 @@ type
|
|||||||
function LCLPlatform: TLCLPlatform; virtual; abstract;
|
function LCLPlatform: TLCLPlatform; virtual; abstract;
|
||||||
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; virtual;
|
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; virtual;
|
||||||
|
|
||||||
|
procedure DebugLogLn(const s: string); virtual;
|
||||||
|
procedure DebugLog(const s: string); virtual;
|
||||||
|
|
||||||
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract;
|
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract;
|
||||||
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract;
|
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract;
|
||||||
procedure DCRedraw(CanvasHandle: HDC); virtual; abstract;
|
procedure DCRedraw(CanvasHandle: HDC); virtual; abstract;
|
||||||
|
@ -46,6 +46,9 @@ type
|
|||||||
|
|
||||||
TAndroidWidgetSet = Class(TWidgetSet)
|
TAndroidWidgetSet = Class(TWidgetSet)
|
||||||
private
|
private
|
||||||
|
// For DebugOut
|
||||||
|
FPartialDebugLine: string;
|
||||||
|
|
||||||
{ App: QApplicationH;
|
{ App: QApplicationH;
|
||||||
|
|
||||||
// cache for WindowFromPoint
|
// cache for WindowFromPoint
|
||||||
@ -115,6 +118,9 @@ type
|
|||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
|
procedure DebugLogLn(const s: string); override;
|
||||||
|
procedure DebugLog(const s: string); override;
|
||||||
|
|
||||||
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; override;
|
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; override;
|
||||||
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); override;
|
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); override;
|
||||||
procedure DCRedraw(CanvasHandle: HDC); override;
|
procedure DCRedraw(CanvasHandle: HDC); override;
|
||||||
|
@ -86,6 +86,17 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TAndroidWidgetSet.DebugLogLn(const s: string);
|
||||||
|
begin
|
||||||
|
vAndroidPipesComm.Log(FPartialDebugLine + s);
|
||||||
|
FPartialDebugLine := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAndroidWidgetSet.DebugLog(const s: string);
|
||||||
|
begin
|
||||||
|
FPartialDebugLine := FPartialDebugLine + s;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TAndroidWidgetSet.Destroy
|
Method: TAndroidWidgetSet.Destroy
|
||||||
Params: None
|
Params: None
|
||||||
|
@ -381,6 +381,7 @@ function CreateNextIdentifier(const Identifier: string): string;
|
|||||||
var
|
var
|
||||||
DebugLnMaxNestPrefixLen: Integer = 15;
|
DebugLnMaxNestPrefixLen: Integer = 15;
|
||||||
DebugLnNestLvlIndent: Integer = 2;
|
DebugLnNestLvlIndent: Integer = 2;
|
||||||
|
DebugText: ^Text;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -393,7 +394,6 @@ var
|
|||||||
InterfaceInitializationHandlers: TFPList = nil;
|
InterfaceInitializationHandlers: TFPList = nil;
|
||||||
InterfaceFinalizationHandlers: TFPList = nil;
|
InterfaceFinalizationHandlers: TFPList = nil;
|
||||||
DebugTextAllocated: boolean;
|
DebugTextAllocated: boolean;
|
||||||
DebugText: ^Text;
|
|
||||||
DebugNestLvl: Integer = 0;
|
DebugNestLvl: Integer = 0;
|
||||||
DebugNestPrefix: PChar = nil;
|
DebugNestPrefix: PChar = nil;
|
||||||
DebugNestAtBOL: Boolean;
|
DebugNestAtBOL: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user