4
I want to make a program with Gtk that reads data from the standard input and interprets making drawings in a DrawingArea
.
The concept is simple, but I came across a problem: after I called Gtk::Application::run
the only code written by me to execute is the sign on_draw
of DrawingArea
.
I need to receive the standard input and I can’t do it in the method on_draw
because the program would stop responding.
What I want is to be able to send data at any time, and that the drawing update in real time.
The input, interpretation and display of the drawing on the screen are easy to implement, but doing them together seems a difficult task.
And then how could I do it? A very simple example would be very useful (basically what I want is to be able to enter text while the function Gtk::Application::run
executes)