Re: [gtk-list] synchronous exposure (how to do?)
- From: Joe Pfeiffer <pfeiffer cs nmsu edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] synchronous exposure (how to do?)
- Date: Tue, 12 Jan 1999 07:36:08 -0700
Our program does a hard job at fetching a lot of data from a database at
load time. So a progress bar would be the right thing to show. But since
the expose event is handled at idle time (is this right?) the progress
bar will not be drawn untill everything is loaded.
You want something like this:
void StatusWin::progress(int sofar, int total) {
progressBar->update(((gfloat)sofar)/((gfloat)total));
while (m->events_pending() >0)
m->iteration();
}
(naturally, you'll want to translate into C)
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]