Questions tagged [gtk-rs]

Rust bindings for GTK+, Cairo, GtkSourceView and other GLib-compatible libraries

94 questions
0
votes
1 answer

How to set a variable inside a gtk-rs closure?

I'm building a markdown app, and I want to keep two copies of the text, one a source text, and the other the TextBuffer with all the correct tags and such. I need to set the contents of this source field inside a…
dessalines
  • 6,352
  • 5
  • 42
  • 59
-1
votes
1 answer

Trying to call gtk main loop in gtk-rs

I'm trying to make a simple window with gtk4-rs i honestly can't find documentation for how to call the main gtk loop use gtk::prelude::*; fn main() { // call gtk::init() to initialize gtk. if gtk::init().is_err() { println!("Failed…
-1
votes
1 answer

How do I get information from an entry on button click?

I want to get an input from an entry on a button click and display that information when another button is clicked. This gives me an error because the closure takes ownership of my firstname variable, in which I want to store the information. How do…
jonryan
  • 11
  • 2
-3
votes
1 answer

How do I convert a Vector of Strings to [&str]

I have a vector of strings and a method that is accepting [&str]. When I provide the strings as string literals everything works however when I try to build the same vector dynamically using Strings everything is failing. Examples…
John554
  • 145
  • 1
  • 7
1 2 3 4 5 6
7