RE: Update progress bar without returning to main loop?
- From: Foster Gareth <gareth foster siemens com>
- To: Toralf Lund <toralf procaptura com>, Murray Cumming <murrayc murrayc com>
- Cc: GTK-- Mailing List <gtkmm-list gnome org>
- Subject: RE: Update progress bar without returning to main loop?
- Date: Wed, 28 Sep 2005 13:35:22 +0100
> I'm more sceptical to docs that suggesti to users that you
> have to use
> event loop constructs and/or threads in order to do something
> as simple
> as this. Not that there is anything wrong with Bob's example as such,
> it's just that it shows the way to program *if you want to respond to
> user input while the job progresses*. It you don't, then I daresay
> running an event loop is overly complex and/or simply wrong.
>
Are we saying then, that you do ...
while(Gtk::Main::instance()->events_pending())
Gtk::Main::instance()->iteration(); // if you want to
allow user interaction and redraw
gdk_window()->process_updates(false); // if you want to
allow redraw
If that is the case, a small update to the example I made could be used to
illustrate the point.
Gaz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]