mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:22:30 +02:00
LCL: removed dummy function SetMapMode
git-svn-id: trunk@11668 -
This commit is contained in:
parent
3b03325209
commit
cf47df5e91
@ -1337,11 +1337,6 @@ begin
|
|||||||
Result := false;
|
Result := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWidgetSet.SetMapMode(DC: HDC; MapMode: Integer): Integer;
|
|
||||||
begin
|
|
||||||
Result := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function TWidgetSet.SetProp(Handle: hwnd; Str : PChar;
|
Function TWidgetSet.SetProp(Handle: hwnd; Str : PChar;
|
||||||
Data : Pointer) : Boolean;
|
Data : Pointer) : Boolean;
|
||||||
Begin
|
Begin
|
||||||
|
@ -758,11 +758,6 @@ begin
|
|||||||
Result := WidgetSet.SetForegroundWindow(hWnd);
|
Result := WidgetSet.SetForegroundWindow(hWnd);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function SetMapMode(DC: HDC; MapMode: Integer): Integer;
|
|
||||||
begin
|
|
||||||
Result := WidgetSet.SetMapMode(DC,MapMode);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function SetScrollInfo(Handle : HWND; SBStyle : Integer;
|
function SetScrollInfo(Handle : HWND; SBStyle : Integer;
|
||||||
ScrollInfo: TScrollInfo; Redraw : Boolean): Integer;
|
ScrollInfo: TScrollInfo; Redraw : Boolean): Integer;
|
||||||
begin
|
begin
|
||||||
|
@ -208,7 +208,6 @@ function SetCursor(hCursor: HICON): HCURSOR; {$IFDEF IF_BASE_MEMBER}virtual;{$EN
|
|||||||
function SetCursorPos(X, Y: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
function SetCursorPos(X, Y: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||||
function SetFocus(hWnd: HWND): HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
function SetFocus(hWnd: HWND): HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||||
function SetForegroundWindow(hWnd : HWND): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
function SetForegroundWindow(hWnd : HWND): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||||
function SetMapMode(DC: HDC; MapMode: Integer): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
|
||||||
function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||||
//function SetRect --> independent
|
//function SetRect --> independent
|
||||||
//function SetRectEmpty --> independent
|
//function SetRectEmpty --> independent
|
||||||
|
@ -3999,94 +3999,6 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Function: TQtWidgetSet.SetMapMode
|
|
||||||
Params: DC: HDC; MapMode: Integer
|
|
||||||
Returns: Integer
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
function TQtWidgetSet.SetMapMode(DC: HDC; MapMode: Integer): Integer;
|
|
||||||
var
|
|
||||||
Matrix: QMatrixH;
|
|
||||||
MatrixNew: QMatrixH;
|
|
||||||
dpi: TSize;
|
|
||||||
m11, m22: Double;
|
|
||||||
dx, dy: Double;
|
|
||||||
QtDC: TQtDeviceContext;
|
|
||||||
|
|
||||||
procedure SetM(const Am11, Am22: Double);
|
|
||||||
begin
|
|
||||||
m11 := Am11;
|
|
||||||
m22 := Am22;
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
|
||||||
{$ifdef VerboseQtWinAPI}
|
|
||||||
WriteLn('[WinAPI SetMapMode] DC: ',dbghex(DC),' MapMode: ',MapMode);
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
Result := 0;
|
|
||||||
if not IsValidDC(DC) then exit;
|
|
||||||
|
|
||||||
{$note implement - wait for LCL}
|
|
||||||
|
|
||||||
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
|
|
||||||
WriteLn('***** [WinAPI TQtWidgetSet.SetMapMode] missing implementation ');
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
(*
|
|
||||||
QtDC := TQtDeviceContext(DC);
|
|
||||||
|
|
||||||
dpi.cx := GetDeviceCaps(DC, LOGPIXELSX);
|
|
||||||
dpi.cy := GetDeviceCaps(DC, LOGPIXELSY);
|
|
||||||
|
|
||||||
Result := GetMapMode(DC);
|
|
||||||
|
|
||||||
case MapMode of
|
|
||||||
MM_TEXT:
|
|
||||||
SetM(1, 1);
|
|
||||||
|
|
||||||
MM_LOMETRIC:
|
|
||||||
SetM((dpi.cx / 2.54) / 100, -(dpi.cy / 2.54) / 100);
|
|
||||||
MM_HIMETRIC:
|
|
||||||
SetM((dpi.cx / 2.54) / 1000, -(dpi.cy / 2.54) / 1000);
|
|
||||||
|
|
||||||
MM_LOENGLISH:
|
|
||||||
SetM(dpi.cx / 10, -dpi.cy / 10);
|
|
||||||
MM_HIENGLISH:
|
|
||||||
SetM(dpi.cx / 100, -dpi.cy / 100);
|
|
||||||
|
|
||||||
MM_TWIPS:
|
|
||||||
SetM(dpi.cx / 1440, -dpi.cy / 1440);
|
|
||||||
|
|
||||||
MM_ISOTROPIC:
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
Matrix := QPainter_matrix(QtDC.Widget);
|
|
||||||
|
|
||||||
if QPainter_worldMatrixEnabled(QtDC.Widget) then
|
|
||||||
begin
|
|
||||||
Matrix := QPainter_worldMatrix(QtDC.Widget);
|
|
||||||
dx := QMatrix_dx(Matrix);
|
|
||||||
dy := QMatrix_dy(Matrix);
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
MatrixNew := QMatrix_create(m11, 0, 0, m22, dx, dy);
|
|
||||||
try
|
|
||||||
QPainter_setWorldMatrix(QtDC.Widget, MatrixNew, False);
|
|
||||||
finally
|
|
||||||
QMatrix_destroy(MatrixNew);
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := MapMode;
|
|
||||||
*)
|
|
||||||
|
|
||||||
end;
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: SetFocus
|
Function: SetFocus
|
||||||
Params: hWnd - Window handle to be focused
|
Params: hWnd - Window handle to be focused
|
||||||
|
@ -176,7 +176,6 @@ function SetCursor(ACursor: HCURSOR): HCURSOR; override;
|
|||||||
function SetCursorPos(X, Y: Integer): Boolean; override;
|
function SetCursorPos(X, Y: Integer): Boolean; override;
|
||||||
function SetFocus(hWnd: HWND): HWND; override;
|
function SetFocus(hWnd: HWND): HWND; override;
|
||||||
function SetForegroundWindow(HWnd: HWND): boolean; override;
|
function SetForegroundWindow(HWnd: HWND): boolean; override;
|
||||||
function SetMapMode(DC: HDC; MapMode: Integer): Integer; override;
|
|
||||||
function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; override;
|
function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; override;
|
||||||
function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override;
|
function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override;
|
||||||
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||||
|
Loading…
Reference in New Issue
Block a user