OnMouseWheel в GraphWPF.pas

x.Sqr возвращает int64
This commit is contained in:
Mikhalkovich Stanislav 2022-12-18 21:54:29 +03:00
parent 80f8e26011
commit 1e1a309d29
10 changed files with 29 additions and 9 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "8";
public const string Build = "3";
public const string Revision = "3211";
public const string Revision = "3212";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=8
%REVISION%=3211
%COREVERSION%=3
%REVISION%=3212
%MINOR%=8
%MAJOR%=3

View file

@ -1 +1 @@
3.8.3.3211
3.8.3.3212

View file

@ -1 +1 @@
!define VERSION '3.8.3.3211'
!define VERSION '3.8.3.3212'

View file

@ -643,6 +643,8 @@ var OnMouseDown: procedure(x, y: real; mousebutton: integer);
var OnMouseUp: procedure(x, y: real; mousebutton: integer);
/// Событие перемещения мыши. (x,y) - координаты курсора мыши в момент наступления события, mousebutton = 0, если кнопка мыши не нажата, 1, если нажата левая кнопка мыши, и 2, если нажата правая кнопка мыши
var OnMouseMove: procedure(x, y: real; mousebutton: integer);
/// Событие поворота колёсика мыши. delta - величина поворота: delta > 0 - от пользователя, delta < 0 - к пользователю
var OnMouseWheel: procedure(delta: real);
/// Событие нажатия клавиши
var OnKeyDown: procedure(k: Key);
/// Событие отжатия клавиши
@ -2155,6 +2157,13 @@ begin
OnMouseMove(p.x, p.y, mb);
end;
procedure SystemOnMouseWheel(sender: Object; e: MouseWheelEventArgs);
begin
var delta := e.Delta;
if OnMouseWheel <> nil then
OnMouseWheel(delta);
end;
/// --- SystemKeyEvents
procedure SystemOnKeyDown(sender: Object; e: KeyEventArgs) :=
if OnKeyDown<>nil then
@ -2354,6 +2363,7 @@ public
MouseDown += SystemOnMouseDown;
MouseUp += SystemOnMouseUp;
MouseMove += SystemOnMouseMove;
MouseWheel += SystemOnMouseWheel;
KeyDown += SystemOnKeyDown;
KeyUp += SystemOnKeyUp;
TextInput += SystemOnKeyPress;

View file

@ -12649,7 +12649,7 @@ begin
end;
/// Возвращает квадрат числа
function Sqr(Self: integer): integer; extensionmethod;
function Sqr(Self: integer): int64; extensionmethod;
begin
Result := Sqr(Self);
end;

View file

@ -154,7 +154,7 @@ namespace VisualPascalABC
dvw.Location = choose_location(p, txt);
if (!VisualPABCSingleton.MainForm.MenuActive)
{
dvw.ShowInTaskbar = false;
//dvw.ShowInTaskbar = false;
dvw.Description = txt;
}
_hint_hide_d = dvw.Font.Height / 2;

View file

@ -643,6 +643,8 @@ var OnMouseDown: procedure(x, y: real; mousebutton: integer);
var OnMouseUp: procedure(x, y: real; mousebutton: integer);
/// Событие перемещения мыши. (x,y) - координаты курсора мыши в момент наступления события, mousebutton = 0, если кнопка мыши не нажата, 1, если нажата левая кнопка мыши, и 2, если нажата правая кнопка мыши
var OnMouseMove: procedure(x, y: real; mousebutton: integer);
/// Событие прокрутки колёсика мыши. delta - величина прокрутки: delta > 0 - от пользователя, delta < 0 - к пользователю
var OnMouseWheel: procedure(delta: real);
/// Событие нажатия клавиши
var OnKeyDown: procedure(k: Key);
/// Событие отжатия клавиши
@ -2155,6 +2157,13 @@ begin
OnMouseMove(p.x, p.y, mb);
end;
procedure SystemOnMouseWheel(sender: Object; e: MouseWheelEventArgs);
begin
var delta := e.Delta;
if OnMouseWheel <> nil then
OnMouseWheel(delta);
end;
/// --- SystemKeyEvents
procedure SystemOnKeyDown(sender: Object; e: KeyEventArgs) :=
if OnKeyDown<>nil then
@ -2354,6 +2363,7 @@ public
MouseDown += SystemOnMouseDown;
MouseUp += SystemOnMouseUp;
MouseMove += SystemOnMouseMove;
MouseWheel += SystemOnMouseWheel;
KeyDown += SystemOnKeyDown;
KeyUp += SystemOnKeyUp;
TextInput += SystemOnKeyPress;

View file

@ -1137,7 +1137,7 @@ begin
case n of
1: Result := n + ' значение';
2, 3, 4: Result := n + ' значения';
5..1000: Result := n + ' значений';
5..100000: Result := n + ' значений';
end;
end;

View file

@ -12649,7 +12649,7 @@ begin
end;
/// Возвращает квадрат числа
function Sqr(Self: integer): integer; extensionmethod;
function Sqr(Self: integer): int64; extensionmethod;
begin
Result := Sqr(Self);
end;