From 007abf12c38281bf43f53ac9b82175f2d9a09ae7 Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Thu, 7 Apr 2016 21:10:41 +0000 Subject: [PATCH] [GB.FORM.TERMINAL] * BUG: Found a workaround for the dblclick event. git-svn-id: svn://localhost/gambas/trunk@7730 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.form.terminal/.project | 1 - .../.src/TerminalView/Form1.class | 44 +++++++++++++++++++ .../.src/TerminalView/Form1.form | 9 ++++ .../.src/TerminalView/TerminalView.class | 18 +++++++- 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 comp/src/gb.form.terminal/.src/TerminalView/Form1.class create mode 100644 comp/src/gb.form.terminal/.src/TerminalView/Form1.form diff --git a/comp/src/gb.form.terminal/.project b/comp/src/gb.form.terminal/.project index 40db2d9cf..e5624e5e6 100644 --- a/comp/src/gb.form.terminal/.project +++ b/comp/src/gb.form.terminal/.project @@ -9,7 +9,6 @@ Component=gb.image Component=gb.gui Component=gb.form Authors="BenoƮt Minisini\nFabien Bodard" -Environment="GB_GUI=gb.qt5" TabSize=2 Language=fr Type=Component diff --git a/comp/src/gb.form.terminal/.src/TerminalView/Form1.class b/comp/src/gb.form.terminal/.src/TerminalView/Form1.class new file mode 100644 index 000000000..95ece263d --- /dev/null +++ b/comp/src/gb.form.terminal/.src/TerminalView/Form1.class @@ -0,0 +1,44 @@ +' Gambas class file + + +Public Sub Form_MouseUp() + + Print "MouseUp" + +End + +Public Sub Form_MouseDown() + + Print "MouseDown" + +End + +Public Sub Form_DblClick() + + Print "DblClick" + +End + +Public Sub Form_Open() + + + +End + +Public Sub DrawingArea1_Draw() + + + +End + +Public Sub DrawingArea1_MouseDown() + + Print "MouseDown" + +End + +Public Sub DrawingArea1_MouseUp() + + Print "MouseUp" + +End diff --git a/comp/src/gb.form.terminal/.src/TerminalView/Form1.form b/comp/src/gb.form.terminal/.src/TerminalView/Form1.form new file mode 100644 index 000000000..8c32de2b6 --- /dev/null +++ b/comp/src/gb.form.terminal/.src/TerminalView/Form1.form @@ -0,0 +1,9 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,64,64) + { DrawingArea1 DrawingArea + MoveScaled(20,6,34,37) + Background = Color.DarkGray + } +} diff --git a/comp/src/gb.form.terminal/.src/TerminalView/TerminalView.class b/comp/src/gb.form.terminal/.src/TerminalView/TerminalView.class index 8116d4c1d..936e9d611 100644 --- a/comp/src/gb.form.terminal/.src/TerminalView/TerminalView.class +++ b/comp/src/gb.form.terminal/.src/TerminalView/TerminalView.class @@ -351,7 +351,7 @@ Public Sub View_MouseDown() GetMouseXY(ByRef X, ByRef Y) $hFilter.SendMouseEvent($hProcess, X, Y, $hFilter.MouseDown) Endif - + 'Print "MouseDown" End Public Sub View_MouseMove() @@ -408,7 +408,7 @@ Public Sub View_MouseUp() GetMouseXY(ByRef X, ByRef Y) $hFilter.SendMouseEvent($hProcess, X, Y, $hFilter.MouseUp) Endif - + 'Print "MouseUp" End Public Sub View_MouseWheel() @@ -443,6 +443,20 @@ Public Sub View_KeyPress() End +Public Sub View_DblClick() + Dim X As Integer + Dim Y As Integer + If $hFilter.MouseActive Then + If Not $bMouseDown Then + GetMouseXY(ByRef X, ByRef Y) + $hFilter.SendMouseEvent($hProcess, X, Y, $hFilter.MouseDown) + Endif + + Endif + +End + + Private Function Column_Read() As Integer Return $hScreen.Column