Menu

#21 chasearrows widget &element

open
tile (27)
7
2005-07-28
2005-04-15
No

chasearrows widget and element for aqua. bounds not set
correctly but is being investigated. This is a MUST on mac,
but I don't know if there is an API on Windows. Mozilla has
something similar, but with circles instead of thick short
lines. Perhaps I can do something similar.
Feel free to change names etc.

Mats

Discussion

  • Mats Bengtsson

    Mats Bengtsson - 2005-04-15

    chasearrows

     
  • Joe English

    Joe English - 2005-04-15

    Logged In: YES
    user_id=68433

    Thanks for the patch -- I've been wanting to add something
    like this.

    Instead of a new widget, though, I was going to make it a
    custom TProgressbar style -- even though it's not really a
    "bar", from the program's point of view the interface is
    identical to an autoincrement ttk::progressbar.

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-04-17

    Logged In: YES
    user_id=108900

    Your choice but personally I think progressbar is a misleading
    name.
    Two questions:
    1) Do you know of a Windows equivalent?
    2) Do you want me to do one using generic Tk drawing.
    This widget is a very useful interface element for application
    developers so I'd like to see one for all platforms. It is typically
    used to indicate for the user that a dialog is busy doing something
    but that there is no available time estimate (like the progressbar).
    The indeterminate progressbar is used differently. Spinning icons
    etc. are used when the complete application is busy and is
    expecting no user interaction, so that is different. Well, Firefox/
    mozilla has one.

    Mats

     
  • Joe English

    Joe English - 2005-04-17

    Logged In: YES
    user_id=68433

    See the tktable-tile-dev mailing list archives for February
    2005 for more details on the design rationale for the
    progressbar widget (in particular the post "Progress bars --
    braindump"). But summarizing: the progress bar has three
    main modes of operation, determinate, indeterminate, and
    autoincrement; the "chasing arrows" UI idiom corresponds to
    autoincrememt mode.

    Agreed, [ttk::progressbar] isn't the best name but
    [ttk::progress] was already in use.

    Re: Windows equivalents -- from what I've seen, Windows apps
    tend to use application-specific branded throbbers (like the
    spinning IE logo) and operation-specific animations (like
    the "folders flying into a trashcan" animation). For a
    generic version, I think either the OSX style or Mozilla
    style would be suitable.

     
  • Joe English

    Joe English - 2005-04-18

    Logged In: YES
    user_id=68433

    Attached patch tile-chasingarrows.patch implements this as a
    custom progressbar style. Still OSX only; it should be
    available as a common custom style in all themes.

    Need to rethink the progressbar -phase autoincrement DWIM
    logic; this isn't doing the right thing.

     
  • Joe English

    Joe English - 2005-04-18

    chasing arrows as custom style

     
  • Joe English

    Joe English - 2005-04-18

    Logged In: YES
    user_id=68433

    Something else to think about -- with this style of progress
    indicator, the "-orient" and "-length" options aren't
    relevant. Do these belong on the widget at all?

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-04-18

    Logged In: YES
    user_id=108900

    They are options of the usual progressbar widget, but not to the
    chasing arrows.
    Just tried:
    ttk::progressbar .p -style ChasingArrows
    Layout Horizontal.ChasingArrows not found
    Perhaps I am missing something.

    I will try to write a similar widget using the generic tk drawing, but I
    first have to track down a difficult bug in QuickTimeTcl.

     
  • Joe English

    Joe English - 2005-04-18

    Logged In: YES
    user_id=68433

    | ttk::progressbar .p -style ChasingArrows
    | Layout Horizontal.ChasingArrows not found

    Make sure you're getting the patched version of
    library/aquaTheme.tcl, that's where the "ChasingArrows"
    layout is defined. ("Horizontal.ChasingArrows" will use
    that as a fallback.)

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-04-19

    Logged In: YES
    user_id=108900

    Sorry, my fault. Old conflicting tile installation in ~/Library/Tcl.
    Works ok with aquaTheme.c,v 1.27 but code disappeared in
    aquaTheme.c,v 1.28 ?

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-04-19

    Logged In: YES
    user_id=108900

    Seems I forgot to apply the patch. Did this "by hand". The problem
    I see is that the width is 100, probably from the -length option. In
    this case -length can be interpreted as the size of the *square* I
    think. Perhaps this could be made style dependent somehow. Well,
    this seems to be the "cost" for not using a separate widget for this.
    The -mode is also 'determinate':
    {-mode mode ProgressMode determinate determinate}

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-04-22

    aquaTheme with additions

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-04-22

    Logged In: YES
    user_id=108900

    Added new patch that is my aquaTheme.c using generic tk drawing
    for the chasing arrows element. Only tested on mac. For a 16x16
    widget it is not possible to make it good looking if not having
    antialiasing. The best result is to have just 1x1 ovals. Increasing
    the small radius slightly gives 2x2 ovals which are too big. So the
    present code is the best I could achive with these circumstances.
    Note that you have to go through the code, freeing colors and gc's
    in
    particular since I'm a novice here.
    I have also written a drawing routine for WinXP using the GDI+
    graphics library that has antialiasing. I picked their "flat interface"
    to avoid any C++. I don't know how you feel about linking to gdiplus
    lib, but you are anyway linking to native WinXP libs for drawing
    elements. Completely untested! Not even built! I don't have cygwin
    on my WIn2000, and WinXP I don't have at all.

    All code I have added are enclosed in "EXPERIMENTAL"
    comments, so you have to copy it to the correct places.

    Mats

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-07-25

    Chasing arrows type widget for WinXP

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-07-25

    Logged In: YES
    user_id=108900

    New implementation for WinXP, chasearrowsXP.c. This one uses
    the gdiplus lib to achive antialiasing. It looks pretty nice. It is not
    identical to the aqua counterpart since it uses small ovals instead
    of radial lines. However, it is written in C++ since GDI+ has C++
    interfaces. There is a "flat interface" but I got compiler errors from
    inside it, very weird.
    Docs: http://msdn.microsoft.com/library/default.asp?url=/library/en-
    us/gdicpp/GDIPlus/GDIPlus.asp
    The background element wasn't drawn for some reason. I also had
    to make a slight change in generic/widget.h, from:
    struct WidgetSpec_
    {
    ...
    enum { WIDGET_SPEC_END } sentinel; /* to help the compiler
    catch errors */
    }
    to:
    typedef enum { WIDGET_SPEC_END } SentinelEnum; /* to help
    the compiler catch errors */
    struct WidgetSpec_
    {
    ...
    SentinelEnum sentinel; /* to help the compiler catch
    errors */
    }
    since WIDGET_SPEC_END gets hidden inside the struct in C++
    (scope issue).
    Note: since this element is C++ it must go in a separate file.

    Mats

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-07-25

    Logged In: YES
    user_id=108900

    New code for drawing a different version of the chasing arrows
    element using Tk generic drawing APIs. This one shows a rotating
    bar. It is likely that it can be further improved by having a wider line
    behind with a color blended between the foreground and the
    background to achieve a smoother apperance.
    Patch is ChasingArrowsElemBar.c

    Mats

     
  • Mats Bengtsson

    Mats Bengtsson - 2005-07-25

    Draws a rotating bar. Generic Tk drawing.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-07-28
    • priority: 5 --> 7
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-07-28

    Logged In: YES
    user_id=72656

    finished patch

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.