LazMapViewer: Add basic LCLScaling infrastructure.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9823 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2025-08-15 21:35:59 +00:00
parent 0ee63412ec
commit c157840a4f

View File

@ -528,7 +528,12 @@ type
function Resize(AMapView: TMapView): Boolean; virtual;
function ZoomChange(AMapView: TMapView): Boolean; virtual;
function ZoomChanging(AMapView: TMapView; NewZoom: Integer; var Allow: Boolean): Boolean; virtual;
// LCLScaling
procedure AutoAdjustLayout(AMapView: TMapView; const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); virtual;
public
end;
@ -646,8 +651,8 @@ type
protected
AsyncInvalidate : boolean;
procedure ActivateEngine;
procedure DblClick; override;
procedure DoAfterDrawTile(ATileId: TTileId; ARect: TRect);
procedure DblClick; override;
procedure DoCenterMove(Sender: TObject);
procedure DoCenterMoving(Sender: TObject; var NewCenter: TRealPoint; var Allow: Boolean);
procedure DoDrawMissingTile(ATileID: TTileID; ARect: TRect);
@ -695,6 +700,10 @@ type
procedure ChangeCachePath(AOldLoc: TCacheLocation; ANewPath: String);
class function CacheDirectory(ALoc: TCacheLocation; ACustomPath: String): String;
// LCLScaling
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -4387,6 +4396,13 @@ begin
end;
end;
procedure TMapView.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double);
begin
inherited;
GetPluginManager.AutoAdjustLayout(Self, AMode, AXProportion, AYProportion);
end;
{ TGPSTileLayerBase }
@ -5125,6 +5141,13 @@ begin
Result := False;
end;
procedure TMvCustomPluginManager.AutoAdjustLayout(AMapView: TMapView;
const AMode: TLayoutAdjustmentPolicy; const AXProportion, AYProportion: Double);
begin
Unused(AMapView, AMode);
Unused(AXProportion, AYProportion);
end;
function TMvCustomPluginManager.BeforeDrawObjects(AMapView: TMapView): Boolean;
begin
Unused(AMapView);