Re: Zsh + GUI

From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 07/07/05

  • Next message: Chris F.A. Johnson: "Re: spaces to dashes with exception"
    Date: Thu, 7 Jul 2005 00:54:30 -0400
    
    

    On 2005-07-06, William Park wrote:
    > adrian@satisoft.com <adrian@satisoft.com> wrote:
    >> Maybe not quite what you are looking for (I'm not sure what you would
    >> consider to be "marketable"), but you may want to have a look at
    >> SATSHELL (www.satisoft.com/satshell). This is a utility to create GUI
    >> interfaces for shell scripts (ksh, bash etc.).
    >>
    >> I'll be releasing a new version shortly which has some small
    >> enhancements, such as automatically repeating actions and the option to
    >> associate an action with a picklist selection.
    >
    > Thanks Adrian. It's not what I'm looking for, but it got me
    > re-thinking. Both TKsh and SATSHELL are killing the shell script
    > writers with details. I'm leaning towards some sort of interface to
    > GTK+, at the moment. Ultimate goal is to eliminate external programs
    > (web server, browser, dialog, Xdialog, etc.) and interact directly with
    > the user.

       The last thing I want in a GUI shell interface is widgets, with the
       possible exception of a string entry widget.

       What I need is the ability to open a window, draw lines,
       rectangles, etc., set a font and write text (including an interface
       to the XTextWidth function), receive keypresses and mouse clicks
       (with co-ordinates).

       One of the uses I have is for creating crossword puzzles. The grids
       normally contain 225 squares; I sure as hell don't want to create
       225 widgets to do something that I can do with a few lines of code.

       If I have the mouse co-ordinates, I can easily calculate which
       square was clicked, with vastly less overhead than with a widget. I
       do it already, using the mouse in an xterm window.

       In my article at UnixReview.com, I present a shell script which
       prints buttons on the screen and performs actions when one is
       pressed. Adding a button and associating an action with it requires
       an added label as argument to a function call and a single line of
       script to perform the action.

       The article ends with the instructions to add another button to the
       script, and clear the screen when it is pressed. All it involves
       is:

           Change:

             print_buttons "$mv_str" "Exit"

           to:

             print_buttons "$mv_str" "Clear" "Exit"

           and:

             2) break ;;

           to:

             2) clear ;;
             3) break ;;

       No widget interface is going to be that simple.

       The article is at:
       <http://www.unixreview.com/documents/s=9823/ur0507a/ur0507a.html>
       and the script at:
       <http://www.unixreview.com/documents/s=9823/ur0507a/ur0507a_l1.html>

    -- 
        Chris F.A. Johnson                     <http://cfaj.freeshell.org>
        ==================================================================
        Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
        <http://www.torfree.net/~chris/books/cfaj/ssr.html>
    

  • Next message: Chris F.A. Johnson: "Re: spaces to dashes with exception"

    Relevant Pages

    • Re: UI toolkits for Python
      ... The Web Browser interface is good for simple things, ... As for Tkinter, well, sigh, I have to go into a semi-rant, semi- eulogy right now. ... Same thing with tags in the Canvas widget. ... with Python by default, is pretty reliable, has a reasonably Pythonic interface, and I don't understand the question about external libraries. ...
      (comp.lang.python)
    • RE: Dual Ethernet NIC w/ failover
      ... the shell script de-configures the ... > interface, assuming the identity of the 1st interface. ... >> cards, however I haven't seen a lot of posts regarding the ... >> availability of dual ethernet cards with working failover ...
      (freebsd-isp)
    • Re: passing a Factory to a method to create a generic instance
      ... FUNCTION FROM void TO Widget or whatever it'd be called, and then pass in a Widget class's constructor. ... language to a WORN ... Even if not, if the main thing that a Bolt is is a kind of Widget, i'd say use an abstract base class, not an interface, since it communicates a stronger sense of is-a. ...
      (comp.lang.java.programmer)
    • Re: Creatable Interfaces???
      ... > CoClass (let's call it Widget), and in the resulting interop assembly ... > .class interface public abstract auto ansi import IWidget ... > itself, which I can instantiate. ... > interface to represent the COM interface (IWidget), ...
      (microsoft.public.dotnet.framework.interop)
    • Re: howto decouple in .NET?
      ... If inclusion of extra method in original interface is not acceptable, ... The implementation of the operation is primarily not in the widget class, ... Some callers ... Think how insane it would be for a program needing to show a window to be ...
      (microsoft.public.dotnet.languages.vc)