Any equivalent to gtk_progress_bar_pulse()?

Mart Raudsepp leio at dustbite.net
Wed Aug 9 16:25:07 PDT 2006


On Wed, 2006-08-09 at 22:45 +0200, Vadim Zeitlin wrote:
> On Wed, 09 Aug 2006 13:36:26 +0200 Francesco Montorsi <f18m_cpp217828 at yahoo.it> wrote:
> 
> FM> I need something similar, too - so I've planned to submit a new widget 
> FM> to wx, something called wxBouncingGauge which uses 
> FM> gtk-progress-bar-pulse API under GTK+ 2 and is generic under Windows.
> 
>  I don't quite understand how does this GTK pulse progress bar look, is it
> just a normal progress bar with the indicator bouncing back and forth?

Basically, yes. From the API point of view you set the percentage how
much the bar moves everytime some activity should be noted, and then on
activity one calls "gtk_progress_bar_pulse" and it'll automatically move
the bar in the appropriate direction by given percentage.
This is using the same control than a normal gauge that we have in
wxWidgets now, just when calling gtk_progress_bar_pulse the control goes
automatically to "activity mode" which is the bouncing bar mode.
This mode is used for denoting the types of progresses that you know it
happens, but don't know how much is 100%.
This is what Mac seems to call "Indeterminate progress bar"

At some point in the future GTK+ might allow denoting indeterminate
progress by other means than moving a bouncing bar. The API doesn't
restrict it, just the internal calls to the theme engine do at the
moment.

> If this is the case, then this corresponds to Win32 progress bar control with
> PBS_MARQUEE style. But this style is only supported in XP so we still need
> a generic version.

IOW, we can't make it be the same control as wxGauge atm, just with
added API? If other platforms can't switch the mode on the run, based on
if SetValue() or Pulse() was last called, then I suppose we want a new
control or a style flag.

>  Also, Mac has indeterminate progress bars which seem to be used for the
> same purpose:
> 
> http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGControls/chapter_18_section_5.html#//apple_ref/doc/uid/TP30000359-TPXREF208
> 
> Moreover, they also have a rather nice control called asynchronous progress
> indicator (illustrated on the same page). The main advantage of this one is
> that it can be used in conjunction with other controls easily, e.g. you
> could have a wxFlexGridSizer with wxStaticTexts in the first column and
> such controls in the second one.

This seems to be what GNOME world calls a "throbber", iirc. It's not
part of GTK+ itself at the moment.
I believe that wxPython actually has a custom control for this already.

For wxDataViewCtrl (GtkTreeView) there is a progress bar cell renderer
in GTK+.

> FM> I've placed some notes about it (among other things) at
> FM> 
> FM>     http://www.wxwidgets.org/wiki/index.php/User:Frm
> FM> 
> FM> (see point #8)
> 
>  I'm not sure which control is the one mentioned there but I can say that
> CCS_NOPARENTALIGN is irrelevant.

We should just come up with a well usable API that is implementable
everywhere, and just implement it.

Thanks,
Mart





More information about the wx-users mailing list