spinning circle style for wxProgressBar

607 views
Skip to first unread message

Stefan Csomor

unread,
Mar 5, 2011, 4:15:57 AM3/5/11
to wx-...@googlegroups.com
Hi

I'd like to be able to create a spinning circle (right now implemented on
osx, but I guess the other platforms have something similar), I cannot
stand seeing a busy info with nothing spinning ;-)

now I see two different approches

#define wxGA_CIRCLE 0x0040
to the styles for gauge, to allow specifing a circle or

have a wxSpinningCircle control ?

Thanks,

Stefan

Julian Smart

unread,
Mar 5, 2011, 5:07:33 AM3/5/11
to wx-...@googlegroups.com
Hi Stefan,

That would be excellent. I'm torn between the two alternatives, but
maybe slightly favour the style approach since it's very similar in
purpose to an indeterminate gauge and there are no particular API
differences AFAIK.

Regards,

Julian

> Thanks,
>
> Stefan
>


--
Julian Smart, Anthemion Software Ltd.
www.anthemion.co.uk | +44 (0)131 229 5306
Tools for writers: www.writerscafe.co.uk
Ebook creation: www.jutoh.com
wxWidgets RAD: www.dialogblocks.com

Vadim Zeitlin

unread,
Mar 5, 2011, 6:28:34 AM3/5/11
to wx-...@googlegroups.com
On Sat, 5 Mar 2011 09:15:57 +0000 Stefan Csomor <cso...@advancedconcepts.ch> wrote:

SC> I'd like to be able to create a spinning circle (right now implemented on
SC> osx, but I guess the other platforms have something similar), I cannot
SC> stand seeing a busy info with nothing spinning ;-)

You're surely not alone, I think I've even become conditioned to see this
myself.

SC> now I see two different approches
SC>
SC> #define wxGA_CIRCLE 0x0040
SC> to the styles for gauge, to allow specifing a circle or
SC>
SC> have a wxSpinningCircle control ?

I'm definitely for a different control because on all the platforms except
Mac (I guess) the implementation will be completely different (probably
wxAnimationCtrl-based) to a normal wxGauge and having a style would make
supporting this very painful.

I'd also like something indicating more clearly that the control is meant
to show [lack of?] progress than wxSpinningCircle. Also, other platforms
may use something different from a spinning circle to implement it. What
about wxProgressIndicator? Or maybe wxThrobberCtrl?

Finally, whatever the name of this control it should be in adv and not
core as/if it's going to depend on wxAnimationCtrl.

Regards,
VZ

Stefan Csomor

unread,
Mar 5, 2011, 7:01:32 AM3/5/11
to wx-...@googlegroups.com
Hi

>I'm definitely for a different control because on all the platforms except
>Mac (I guess) the implementation will be completely different (probably
>wxAnimationCtrl-based) to a normal wxGauge and having a style would make
>supporting this very painful.

yes, the concept of the indeterminate progress gauge is close, but as it
would mandate pImpls if not available, having it separated makes a lot of
sense


> I'd also like something indicating more clearly that the control is meant
>to show [lack of?] progress than wxSpinningCircle. Also, other platforms
>may use something different from a spinning circle to implement it. What
>about wxProgressIndicator? Or maybe wxThrobberCtrl?

I would stay away from 'progress' as we cannot indicate progress, well at
least not in a very detailed manner ;-)

wxBusyIndicator ? wxWorkingIndicator ?

> Finally, whatever the name of this control it should be in adv and not
>core as/if it's going to depend on wxAnimationCtrl

good point, which is a problem given that wxBusyInfo is in Core ... and
I'd really like to be able to add this to wxBusyInfo's info frame

what can we do ?


for the generic impl I thought I'd use the tango animation

http://webcvs.freedesktop.org/tango/tango-icon-theme/32x32/animations/proce
ss-working.png

as it is part of the icons 0.8.90 it is part of the public domain, I think
I should be able to include it without further issues, where should I add
the desired attribution ? I guess I'll have to port it to xpm format, or
is there a better way ?

Thanks and Best Regards,

Stefan


Vadim Zeitlin

unread,
Mar 5, 2011, 9:49:03 AM3/5/11
to wx-...@googlegroups.com
On Sat, 5 Mar 2011 12:01:32 +0000 Stefan Csomor <cso...@advancedconcepts.ch> wrote:

SC> > I'd also like something indicating more clearly that the control is meant
SC> >to show [lack of?] progress than wxSpinningCircle. Also, other platforms
SC> >may use something different from a spinning circle to implement it. What
SC> >about wxProgressIndicator? Or maybe wxThrobberCtrl?
SC>
SC> I would stay away from 'progress' as we cannot indicate progress, well at
SC> least not in a very detailed manner ;-)
SC>
SC> wxBusyIndicator ? wxWorkingIndicator ?

wxBusyIndicator looks fine to me, it's consistent with the already
existing wxBusyCursor and wxBusyInfo.

SC> > Finally, whatever the name of this control it should be in adv and not
SC> >core as/if it's going to depend on wxAnimationCtrl
SC>
SC> good point, which is a problem given that wxBusyInfo is in Core ... and
SC> I'd really like to be able to add this to wxBusyInfo's info frame
SC>
SC> what can we do ?

Not sure :-( The only solution I can see is to add separate
wxBusyInfoWithIndicator (possibly deriving from wxBusyInfo) that would live
in adv itself. This is ugly but I really can't think of anything else.

SC> for the generic impl I thought I'd use the tango animation
SC>
SC> http://webcvs.freedesktop.org/tango/tango-icon-theme/32x32/animations/proce
SC> ss-working.png
SC>
SC> as it is part of the icons 0.8.90 it is part of the public domain, I think
SC> I should be able to include it without further issues,

Yes, I already used Tango icons for the print preview buttons.

SC> where should I add the desired attribution ? I guess I'll have to port
SC> it to xpm format, or is there a better way ?

Yes, you can use the same approach as wxTangoArtProvider in
src/common/arttango.cpp i.e. transform the PNGs to C arrays using
misc/scripts/png2c.py and then simply read them from them using
wxMemoryInputStream and wxImage.

Regards,
VZ

Robin Dunn

unread,
Mar 5, 2011, 12:37:11 PM3/5/11
to wx-...@googlegroups.com
On 3/5/11 3:28 AM, Vadim Zeitlin wrote:
> On Sat, 5 Mar 2011 09:15:57 +0000 Stefan Csomor<cso...@advancedconcepts.ch> wrote:
>
> SC> I'd like to be able to create a spinning circle (right now implemented on
> SC> osx, but I guess the other platforms have something similar), I cannot
> SC> stand seeing a busy info with nothing spinning ;-)
>
> You're surely not alone, I think I've even become conditioned to see this
> myself.
>
> SC> now I see two different approches
> SC>
> SC> #define wxGA_CIRCLE 0x0040
> SC> to the styles for gauge, to allow specifing a circle or
> SC>
> SC> have a wxSpinningCircle control ?
>
> I'm definitely for a different control because on all the platforms except
> Mac (I guess) the implementation will be completely different (probably
> wxAnimationCtrl-based) to a normal wxGauge and having a style would make
> supporting this very painful.
>
> I'd also like something indicating more clearly that the control is meant
> to show [lack of?] progress than wxSpinningCircle. Also, other platforms
> may use something different from a spinning circle to implement it. What
> about wxProgressIndicator? Or maybe wxThrobberCtrl?

You may want to take a look at the throbber module in wxPython for
ideas. http://trac.wxwidgets.org/browser/wxPython/trunk/wx/lib/throbber.py


--
Robin Dunn
Software Craftsman
http://wxPython.org

Krishna

unread,
Mar 6, 2011, 4:34:32 AM3/6/11
to wx-...@googlegroups.com
On Sat, Mar 5, 2011 at 5:31 PM, Stefan Csomor
<cso...@advancedconcepts.ch> wrote:

[proposal for a busy indicator snipped]


> for the generic impl I thought I'd use the tango animation
>
> http://webcvs.freedesktop.org/tango/tango-icon-theme/32x32/animations/proce
> ss-working.png
>

http://ajaxload.info -- a nice resource for generating custom busy indicators.

--
The programmer is fighting against the two most destructive forces in
the universe: entropy and human stupidity.
  --Damian Conway

Stefan Csomor

unread,
Mar 6, 2011, 4:52:09 AM3/6/11
to wx-...@googlegroups.com
Hi

>>for the generic impl I thought I'd use the tango animation
>>
>>
>>http://webcvs.freedesktop.org/tango/tango-icon-theme/32x32/animations/pro
>>ce
>> ss-working.png
>>
>
>http://ajaxload.info -- a nice resource for generating custom busy
>indicators.

thanks for the url, unfortunately the generated gifs don't have a good
visualization when not given a transparent background, which is a must for
me.

Thanks,

Stefan

Armel

unread,
Mar 7, 2011, 4:02:04 AM3/7/11
to wx-dev
> > I'd also like something indicating more clearly that the control is meant
> >to show [lack of?] progress than wxSpinningCircle. Also, other platforms
> >may use something different from a spinning circle to implement it. What
> >about wxProgressIndicator? Or maybe wxThrobberCtrl?
>
> I would stay away from 'progress' as we cannot indicate progress, well at
> least not in a very detailed manner ;-)
it would be fine to integrate the notion of progress on the contrary,
Parallels Desktop had it rather good with the spinning circle, and
rather than reprogramming that each separately it would be cool to
have it in wx from start.
(the moving needle progresses only on n% of the circle and then comes
back again to start, skipping the 100-n % not yet done which remain
inactive).

having a common interface with the normal gauge would be very cool.

just my 2 cents
Armel

Vadim Zeitlin

unread,
Mar 7, 2011, 10:34:48 AM3/7/11
to wx-...@googlegroups.com
On Mon, 7 Mar 2011 01:02:04 -0800 (PST) Armel <armel....@elliecomputing.com> wrote:

A> > I would stay away from 'progress' as we cannot indicate progress, well at
A> > least not in a very detailed manner ;-)
A> it would be fine to integrate the notion of progress on the contrary,

I think we're speaking about the "indeterminate progress indicator" here,
if you know how much you're progressing, what's wrong with using the
existing wxGauge?

A> (the moving needle progresses only on n% of the circle and then comes
A> back again to start, skipping the 100-n % not yet done which remain
A> inactive).

And do people really realize that it shows this information? It looks
awfully non-intuitive to me, at least compared to a normal progress bar.

Anyhow, the above isn't native control under any platform so, once again,
I don't think we should wrap it.

Regards,
VZ

Armel

unread,
Mar 8, 2011, 3:15:42 AM3/8/11
to wx-dev
> And do people really realize that it shows this information? It looks
> awfully non-intuitive to me, at least compared to a normal progress bar.
it is accompanied with a text "n %" text somewhere near the
progression animation

>  Anyhow, the above isn't native control under any platform so, once again,
> I don't think we should wrap it.
good point

Armel
Reply all
Reply to author
Forward
0 new messages