[PATCH] Text based UI framework core

Jesse Keating jkeating at redhat.com
Tue Jul 24 22:30:38 UTC 2012


On 07/24/2012 08:47 AM, Martin Sivak wrote:
> Hi,
>
> this is an attempt to implement basic line only textual
> UI framework for us to use.
>
> It is condeptualy designed as stack of screens, where
> the screen at the top is visible.
>
> Individual screens can be implemented using the UIScreen parent
> class and two methods: show and input
>
> Active screens can (according to user input) be changed in four
> ways:
>
> - new screen is put onto the stack and the old one is
>    replaced (Next button equivalent)
> - new screen is put onto the stack (Hub wants to show
>    Spoke with the possibility of direct return)
> - new screen is displayed and the call returns to the
>    caller after it is closed (Dialog with data)
> - screen is closed (and the next item from the stack is
>    displayed)
>
> This means that the leaves (Spokes) do not have to know which
> screen they should return back to.
>
> There is no global dispatcher list in this architecture. If you
> want to setup inital list of linear progression screens, use the
> App.schedule_screen call.
>
> I also included two "widgets" for us to structure the screen space
> without using scrolling or curses. Text and Column. Widgets first
> render to their internal buffers to determine size and the parent
> then copies the "image" to it's own buffer space.
>
> You can see the very simple examples of use at the ends of
> individual files.

Well it certainly is a lot of code.  Do we really want to maintain this 
much code, code that is different from the graphical UI?  The more I 
think about this, the more I feel that text mode should be the barest 
minimum to get bits put on disk and a machine booting.

Maybe this much code is needed to get stuff on screen, maybe not.

-- 
Jesse Keating
Fedora -- FreedomĀ² is a feature!




More information about the anaconda-patches mailing list