From 149c8d9ac1f3af495d3f985ed2e7fa9d7a6b83ab Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 27 Mar 2024 17:07:37 +0800 Subject: [PATCH] src/Builder4/Editor.bjs src/Builder4/Editor.vala --- src/Builder4/Editor.bjs | 9 +++++++++ src/Builder4/Editor.vala | 31 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/Builder4/Editor.bjs b/src/Builder4/Editor.bjs index aa6b0d358..058f3d1b9 100644 --- a/src/Builder4/Editor.bjs +++ b/src/Builder4/Editor.bjs @@ -71,6 +71,15 @@ "items" : [ { "$ xns" : "Gtk", + "listeners" : { + "pressed" : [ + "(n_press, x, y) => {", + "", + "", + "}", + "" + ] + }, "xtype" : "GestureClick" } ], diff --git a/src/Builder4/Editor.vala b/src/Builder4/Editor.vala index 21d4908b3..70225833c 100644 --- a/src/Builder4/Editor.vala +++ b/src/Builder4/Editor.vala @@ -549,6 +549,9 @@ public class Editor : Object this.el.justify = Gtk.Justification.LEFT; this.el.hexpand = true; this.el.xalign = 0f; + var child_1 = new Xcls_GestureClick61( _this ); + child_1.ref(); + this.el.add_controller( child_1.el ); //listeners this.el.query_tooltip.connect( (x, y, keyboard_tooltip, tooltip) => { @@ -604,6 +607,34 @@ public class Editor : Object } } + public class Xcls_GestureClick61 : Object + { + public Gtk.GestureClick el; + private Editor _this; + + + // my vars (def) + + // ctor + public Xcls_GestureClick61(Editor _owner ) + { + _this = _owner; + this.el = new Gtk.GestureClick(); + + // my vars (dec) + + // set gobject values + + //listeners + this.el.pressed.connect( (n_press, x, y) => { + + + }); + } + + // user defined functions + } + public class Xcls_Scale6 : Object { -- 2.39.2