From Fedora Project Wiki
fp-wiki>ImportUser (Imported from MoinMoin) |
m (1 revision(s)) |
||
(No difference)
|
Latest revision as of 16:29, 24 May 2008
Text UI
Rational
Why a Text UI
- lots of servers don't have X11 installed
- serial console
- can't drop support (where there is one)
Requirements
- Python or Python bindings
- Unicode/UTF-8 support
- similar look and feel to the current (snack) UIs
- Managed Widgets
- Must cope with changing screen size (xterm)
- Must be simple to program
- must match paradigms found in the Gtk UIs
Urwid
We've looked at Urwid which
- has Unicode/UTF-8 support
- copes with changing screen size
Problems
- Constructor driven API makes dynamic interfaces difficult
- Some Callbacks are missing
- API is awkward and difficult to use
- Constructor driven
- Not all widgets fit into each other - needs a lot of care by the programmer
- Spacing is done in separate widgets (widget bloat)
- Lots of parameters needed to build widgets
- No sensitive default - because widgets are not smart enough to know
- Widgets are only partially managed
- Missing widget attributes
- sensitive
- visible (set_no_show_all?)
- No theming - only per widget colors (recursive)
- Some important widgets are missing (see below)
- Internal workflow is -- interesting
Widgets needed
- --- Not needed
- XXX missing/needs work
Gtk Widget | Urwid status |
!GtkAlignment | Padding |
!GtkButton | Button |
!GtkEntry | Edit |
!GtkEventBox | --- |
!GtkFrame | Frame |
GtkHBox | Columns |
GtkHButtonBox | XXX |
GtkHPaned | XXX (Columns) |
!GtkImage | --- |
!GtkImageMenuItem | --- |
!GtkLabel | Text |
!GtkMenu | XXX |
!GtkMenuBar | XXX |
!GtkMenuItem | XXX |
!GtkNotebook | XXX |
!GtkRadioButton | !RadioButton |
!GtkScrolledWindow | XXX |
!GtkSeparatorMenuItem | XXX |
!GtkStatusbar | Text |
!GtkTable | !GridFlow |
!GtkTextView | Edit (XXX) |
!GtkTreeView | XXX browse.py |
GtkVBox | Pile |
!GtkViewport | Canvas? |
!GtkWindow | ??? - Window manager needed? |
Other Text UIs
Other stuff we looked at
- Turbo Vision
- No Python bindings
- No unicode
- Not managed
- Snack
- Not Unicode capable
- Not managed
- Not much