mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 09:40:21 +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);
|
||||
function getClipping: Boolean;
|
||||
function getCompositionMode: QPainterCompositionMode;
|
||||
procedure getPenPos(retval: PPoint);
|
||||
function getWorldMatrix: QMatrixH;
|
||||
procedure setBrushOrigin(x, y: Integer);
|
||||
@ -332,6 +333,7 @@ type
|
||||
function SetBkMode(BkMode: Integer): Integer;
|
||||
function getDeviceSize: TPoint;
|
||||
function getRegionType(ARegion: QRegionH): integer;
|
||||
procedure setCompositionMode(mode: QPainterCompositionMode);
|
||||
function getClipRegion: TQtRegion;
|
||||
procedure setClipping(const AValue: Boolean);
|
||||
procedure setClipRegion(ARegion: QRegionH; AOperation: QtClipOperation = QtReplaceClip);
|
||||
@ -2073,6 +2075,11 @@ begin
|
||||
Result := QPainter_hasClipping(Widget);
|
||||
end;
|
||||
|
||||
function TQtDeviceContext.getCompositionMode: QPainterCompositionMode;
|
||||
begin
|
||||
Result := QPainter_compositionMode(Widget);
|
||||
end;
|
||||
|
||||
procedure TQtDeviceContext.getPenPos(retval: PPoint);
|
||||
begin
|
||||
retval^.x := FPenPos.x;
|
||||
@ -2334,6 +2341,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtDeviceContext.setCompositionMode(mode: QPainterCompositionMode);
|
||||
begin
|
||||
QPainter_setCompositionMode(Widget, mode);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: TQtDeviceContext.region
|
||||
Params: None
|
||||
|
@ -113,7 +113,7 @@ procedure AddToChangedMenus(Window: HWnd);
|
||||
procedure RedrawMenus;
|
||||
function MeasureText(const AWinControl: TWinControl; Text: string; var Width, Height: integer): boolean;
|
||||
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 FillRawImageDescription(const ABitmapInfo: Windows.TBitmap; out ADesc: TRawImageDescription);
|
||||
@ -1222,7 +1222,7 @@ end;
|
||||
Change the menu flags for handle of TMenuItem or TMenu,
|
||||
added for BidiMode Menus
|
||||
------------------------------------------------------------------------------}
|
||||
procedure SetMenuFlag(const Menu:HMenu; Flag: Integer; Value: boolean);
|
||||
procedure SetMenuFlag(const Menu:HMenu; Flag: Cardinal; Value: boolean);
|
||||
var
|
||||
MenuInfo: MENUITEMINFO;
|
||||
MenuItemInfoSize: DWORD;
|
||||
|
@ -161,27 +161,39 @@ var
|
||||
WParam: Windows.WParam;
|
||||
ScrollMsg, ScrollBar: dword;
|
||||
ScrollOffset: integer;
|
||||
Pos: TPoint;
|
||||
begin
|
||||
if not TWinControl(Sender).HandleAllocated then
|
||||
exit;
|
||||
|
||||
with TLMessage(Message) do begin
|
||||
with TLMessage(Message) do
|
||||
begin
|
||||
Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam);
|
||||
// Windows handled it, so exit here.
|
||||
if Result<>0 then exit;
|
||||
end;
|
||||
|
||||
|
||||
// send scroll message
|
||||
FillChar(ScrollInfo, sizeof(ScrollInfo), #0);
|
||||
ScrollInfo.cbSize := sizeof(ScrollInfo);
|
||||
ScrollInfo.fMask := SIF_PAGE or SIF_POS or SIF_RANGE;
|
||||
// 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
|
||||
begin
|
||||
ScrollBar := SB_HORZ;
|
||||
ScrollMsg := WM_HSCROLL;
|
||||
end else begin
|
||||
end else
|
||||
begin
|
||||
ScrollBar := SB_VERT;
|
||||
ScrollMsg := WM_VSCROLL;
|
||||
end;
|
||||
|
@ -612,7 +612,7 @@ begin
|
||||
AddToChangedMenus(TCustomForm(lMenu.Parent).Handle);
|
||||
end;
|
||||
|
||||
function ChangeMenuFlag(const AMenuItem: TMenuItem; Flag: Integer; Value: boolean): boolean;
|
||||
function ChangeMenuFlag(const AMenuItem: TMenuItem; Flag: Cardinal; Value: boolean): boolean;
|
||||
var
|
||||
MenuInfo: MENUITEMINFO;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user