LCL: removed dummy function SetMapMode

git-svn-id: trunk@11668 -
This commit is contained in:
mattias 2007-07-29 13:50:17 +00:00
parent 3b03325209
commit cf47df5e91
5 changed files with 0 additions and 100 deletions

View File

@ -1337,11 +1337,6 @@ begin
Result := false;
end;
function TWidgetSet.SetMapMode(DC: HDC; MapMode: Integer): Integer;
begin
Result := 0;
end;
Function TWidgetSet.SetProp(Handle: hwnd; Str : PChar;
Data : Pointer) : Boolean;
Begin

View File

@ -758,11 +758,6 @@ begin
Result := WidgetSet.SetForegroundWindow(hWnd);
end;
function SetMapMode(DC: HDC; MapMode: Integer): Integer;
begin
Result := WidgetSet.SetMapMode(DC,MapMode);
end;
function SetScrollInfo(Handle : HWND; SBStyle : Integer;
ScrollInfo: TScrollInfo; Redraw : Boolean): Integer;
begin

View File

@ -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 SetFocus(hWnd: HWND): HWND; {$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 SetRect --> independent
//function SetRectEmpty --> independent

View File

@ -3999,94 +3999,6 @@ begin
Result := True;
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
Params: hWnd - Window handle to be focused

View File

@ -176,7 +176,6 @@ function SetCursor(ACursor: HCURSOR): HCURSOR; override;
function SetCursorPos(X, Y: Integer): Boolean; override;
function SetFocus(hWnd: HWND): HWND; 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 SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override;
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;