gtk4-rs | Rust bindings of GTK | Theme library
kandi X-RAY | gtk4-rs Summary
kandi X-RAY | gtk4-rs Summary
Rust bindings of GTK 4
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gtk4-rs
gtk4-rs Key Features
gtk4-rs Examples and Code Snippets
Community Discussions
Trending Discussions on gtk4-rs
QUESTION
I'm trying to capture up a right click event on a TreeView I have in my application using Rust and gtk4-rs. I don't see a specific EventController for mouse buttons events. I do see EventControllers for things like keyboard presses and motion events. I ended up using the EventControllerLegacy and just detecting the event type inside the closure, but I feel like I'm missing something here. Is there some other way I should be getting button press events from the mouse? Here's my code:
...ANSWER
Answered 2022-Jan-20 at 08:23If you look into the examples, normally in such a case gtk::GestureClick
is used.
To detect right clicks, you can use it like so:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gtk4-rs
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page