Re: PROPOSAL : Progress bar



On Fri, 26 Jun 1998, Stefan Jeske wrote:

> Hello everybody !
> 
> I'm just working on making the progress bar more flexible, and would like
> to hear some of your comments.
> 
> This is what I did so far :
> 
> 1. Added orientation :
> 
>    typedef enum
>    {
>      GTK_PROGRESS_LEFT_TO_RIGHT,
>      GTK_PROGRESS_BOTTOM_TO_TOP,
>      GTK_PROGRESS_RIGHT_TO_LEFT,
>      GTK_PROGRESS_TOP_TO_BOTTOM
>    } GtkProgressBarOrientation;
> 
> 2. Added a bar style :
>  
>    typedef enum
>    {
>      GTK_PROGRESS_CONTINUOUS,
>      GTK_PROGRESS_DISCRETE
>    } GtkProgressBarStyle;
> 
> GTK_PROGRESS_CONTINUOUS is the current standard behaviour, while
> GTK_PROGRESS_DISCRETE only has a (configurable) number of different
> states (drawn as 3D-blocks) like :

hm, so GTK_PROGRESS_CONTINUOUS is meant to be the same as
GTK_PROGRESS_CONTINUOUS with only one state?
i'm not sure why you need to especially state the mode for
the progress widget then, i'd rather see
void       gtk_progress_bar_update   (GtkProgressBar *pbar,
                                      gfloat          percentage);
to be an alias for something like
void       gtk_progress_bar_update_bar   (GtkProgressBar *pbar,
                                          guint           bar,
                                          gfloat          percentage);
like so:

void
gtk_progress_bar_update   (GtkProgressBar *pbar,
                           gfloat          percentage)
{
  g_return_if_fail (pbar != NULL);
  g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));

  gtk_progress_bar_update_bar (pbar, 0, percentage);
}

and have the progress widget dynamically allocate new bars.


> --------------------------------------------
> |### ### ###                               |
> |### ### ###                               |
> |### ### ###                               |
> --------------------------------------------
> 
> I also tried something like GTK_PROGRESS_TUBE, but that really didn't
> look very GTK-ish. ;) But a nice 3D-tube (like in Warp4) would be
> very nice. (Don't know much about gradients, though. ;)
> 
> 3. Added optional display of text (using a format string which can be
> supplied by the user; the default is "%.0f %%"). In DISCRETE mode,
> text is not displayed (ugly and quite unreadable).
> 
> 4. A new signal "progress_changed", so e.g. the user can update his
> own label with the current percentage.
> 
> We also might introduce a generic GtkProgress widget, with GtkProgressBar
> and other possible progress indicators derived from it (e.g. GtkProgressPie,
> GtkProgressSandGlass ?)

> 
> bye,
>    Stefan
> 

---
ciaoTJ



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]