mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:39:15 +02:00
win32:
- cleanup (reduce warnings) - fix wheel handling git-svn-id: trunk@16179 -
This commit is contained in:
parent
3f0b560eb6
commit
1f78623bce
@ -316,6 +316,7 @@ type
|
|||||||
|
|
||||||
procedure getBrushOrigin(retval: PPoint);
|
procedure getBrushOrigin(retval: PPoint);
|
||||||
function getClipping: Boolean;
|
function getClipping: Boolean;
|
||||||
|
function getCompositionMode: QPainterCompositionMode;
|
||||||
procedure getPenPos(retval: PPoint);
|
procedure getPenPos(retval: PPoint);
|
||||||
function getWorldMatrix: QMatrixH;
|
function getWorldMatrix: QMatrixH;
|
||||||
procedure setBrushOrigin(x, y: Integer);
|
procedure setBrushOrigin(x, y: Integer);
|
||||||
@ -332,6 +333,7 @@ type
|
|||||||
function SetBkMode(BkMode: Integer): Integer;
|
function SetBkMode(BkMode: Integer): Integer;
|
||||||
function getDeviceSize: TPoint;
|
function getDeviceSize: TPoint;
|
||||||
function getRegionType(ARegion: QRegionH): integer;
|
function getRegionType(ARegion: QRegionH): integer;
|
||||||
|
procedure setCompositionMode(mode: QPainterCompositionMode);
|
||||||
function getClipRegion: TQtRegion;
|
function getClipRegion: TQtRegion;
|
||||||
procedure setClipping(const AValue: Boolean);
|
procedure setClipping(const AValue: Boolean);
|
||||||
procedure setClipRegion(ARegion: QRegionH; AOperation: QtClipOperation = QtReplaceClip);
|
procedure setClipRegion(ARegion: QRegionH; AOperation: QtClipOperation = QtReplaceClip);
|
||||||
@ -2073,6 +2075,11 @@ begin
|
|||||||
Result := QPainter_hasClipping(Widget);
|
Result := QPainter_hasClipping(Widget);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtDeviceContext.getCompositionMode: QPainterCompositionMode;
|
||||||
|
begin
|
||||||
|
Result := QPainter_compositionMode(Widget);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TQtDeviceContext.getPenPos(retval: PPoint);
|
procedure TQtDeviceContext.getPenPos(retval: PPoint);
|
||||||
begin
|
begin
|
||||||
retval^.x := FPenPos.x;
|
retval^.x := FPenPos.x;
|
||||||
@ -2334,6 +2341,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TQtDeviceContext.setCompositionMode(mode: QPainterCompositionMode);
|
||||||
|
begin
|
||||||
|
QPainter_setCompositionMode(Widget, mode);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TQtDeviceContext.region
|
Function: TQtDeviceContext.region
|
||||||
Params: None
|
Params: None
|
||||||
|
@ -113,7 +113,7 @@ procedure AddToChangedMenus(Window: HWnd);
|
|||||||
procedure RedrawMenus;
|
procedure RedrawMenus;
|
||||||
function MeasureText(const AWinControl: TWinControl; Text: string; var Width, Height: integer): boolean;
|
function MeasureText(const AWinControl: TWinControl; Text: string; var Width, Height: integer): boolean;
|
||||||
function GetControlText(AHandle: HWND): string;
|
function GetControlText(AHandle: HWND): string;
|
||||||
procedure SetMenuFlag(const Menu:HMenu; Flag: Integer; Value: boolean);
|
procedure SetMenuFlag(const Menu:HMenu; Flag: Cardinal; Value: boolean);
|
||||||
|
|
||||||
procedure FillRawImageDescriptionColors(var ADesc: TRawImageDescription);
|
procedure FillRawImageDescriptionColors(var ADesc: TRawImageDescription);
|
||||||
procedure FillRawImageDescription(const ABitmapInfo: Windows.TBitmap; out ADesc: TRawImageDescription);
|
procedure FillRawImageDescription(const ABitmapInfo: Windows.TBitmap; out ADesc: TRawImageDescription);
|
||||||
@ -1222,7 +1222,7 @@ end;
|
|||||||
Change the menu flags for handle of TMenuItem or TMenu,
|
Change the menu flags for handle of TMenuItem or TMenu,
|
||||||
added for BidiMode Menus
|
added for BidiMode Menus
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure SetMenuFlag(const Menu:HMenu; Flag: Integer; Value: boolean);
|
procedure SetMenuFlag(const Menu:HMenu; Flag: Cardinal; Value: boolean);
|
||||||
var
|
var
|
||||||
MenuInfo: MENUITEMINFO;
|
MenuInfo: MENUITEMINFO;
|
||||||
MenuItemInfoSize: DWORD;
|
MenuItemInfoSize: DWORD;
|
||||||
|
@ -161,27 +161,39 @@ var
|
|||||||
WParam: Windows.WParam;
|
WParam: Windows.WParam;
|
||||||
ScrollMsg, ScrollBar: dword;
|
ScrollMsg, ScrollBar: dword;
|
||||||
ScrollOffset: integer;
|
ScrollOffset: integer;
|
||||||
|
Pos: TPoint;
|
||||||
begin
|
begin
|
||||||
if not TWinControl(Sender).HandleAllocated then
|
if not TWinControl(Sender).HandleAllocated then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
with TLMessage(Message) do begin
|
with TLMessage(Message) do
|
||||||
|
begin
|
||||||
Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam);
|
Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam);
|
||||||
// Windows handled it, so exit here.
|
// Windows handled it, so exit here.
|
||||||
if Result<>0 then exit;
|
if Result<>0 then exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// send scroll message
|
// send scroll message
|
||||||
FillChar(ScrollInfo, sizeof(ScrollInfo), #0);
|
FillChar(ScrollInfo, sizeof(ScrollInfo), #0);
|
||||||
ScrollInfo.cbSize := sizeof(ScrollInfo);
|
ScrollInfo.cbSize := sizeof(ScrollInfo);
|
||||||
ScrollInfo.fMask := SIF_PAGE or SIF_POS or SIF_RANGE;
|
ScrollInfo.fMask := SIF_PAGE or SIF_POS or SIF_RANGE;
|
||||||
// if mouse is over horizontal scrollbar, scroll horizontally
|
// if mouse is over horizontal scrollbar, scroll horizontally
|
||||||
|
|
||||||
|
// why coords are client? - they must be screen
|
||||||
|
with TLMMouseEvent(Message) do
|
||||||
|
begin
|
||||||
|
Pos.X := X;
|
||||||
|
Pos.Y := Y;
|
||||||
|
end;
|
||||||
|
ClientToScreen(Handle, Pos);
|
||||||
|
WParam := Windows.WParam(PointToSmallPoint(Pos));
|
||||||
|
|
||||||
if Windows.SendMessage(Handle, WM_NCHITTEST, 0, WParam) = HTHSCROLL then
|
if Windows.SendMessage(Handle, WM_NCHITTEST, 0, WParam) = HTHSCROLL then
|
||||||
begin
|
begin
|
||||||
ScrollBar := SB_HORZ;
|
ScrollBar := SB_HORZ;
|
||||||
ScrollMsg := WM_HSCROLL;
|
ScrollMsg := WM_HSCROLL;
|
||||||
end else begin
|
end else
|
||||||
|
begin
|
||||||
ScrollBar := SB_VERT;
|
ScrollBar := SB_VERT;
|
||||||
ScrollMsg := WM_VSCROLL;
|
ScrollMsg := WM_VSCROLL;
|
||||||
end;
|
end;
|
||||||
|
@ -612,7 +612,7 @@ begin
|
|||||||
AddToChangedMenus(TCustomForm(lMenu.Parent).Handle);
|
AddToChangedMenus(TCustomForm(lMenu.Parent).Handle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ChangeMenuFlag(const AMenuItem: TMenuItem; Flag: Integer; Value: boolean): boolean;
|
function ChangeMenuFlag(const AMenuItem: TMenuItem; Flag: Cardinal; Value: boolean): boolean;
|
||||||
var
|
var
|
||||||
MenuInfo: MENUITEMINFO;
|
MenuInfo: MENUITEMINFO;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user