Find path under mouse
- From: Daniel Kasak <d j kasak dk gmail com>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Find path under mouse
- Date: Tue, 20 Jun 2017 15:21:10 +1000
Hi all. Reposting from the gtk-perl list ... no responses there ...
Back in gtk+-2.x, I had some code that could find the path underneath
the mouse ( I was looking for double-click events in a treeview in
this case ):
---
my ( $self, $treeview, $event ) = @_;
if ( $event->type eq '2button-press' ) {
# A double-click event
if ( $event->window == $treeview->get_bin_window ) {
my ( $path, $column, $cell_x, $cell_y ) =
$treeview->get_path_at_pos ( $event->x, $event->y );
---
Now I'm doing something similar in gtk+-3.x. I've set up an event
handler for keypress events, and I'm successfully catching the CTRL-C
keypress event. But I don't see immediately how to get the path /
position under the mouse ...
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]