Commit Graph

13 Commits

Author SHA1 Message Date
Alexandre Bury
969650ab1a Add basic ListView
Show a selection among a list of items.
Maybe should be called SelectView?
TODO:
* Scrolling
* Error handling with empty list
* Action on Enter on an item
2015-05-30 21:05:34 -07:00
Alexandre Bury
f9c9e56518 Transform ncurses i32 key into Event enum
Prepares support for unicode char input spanning multiple ncurses
characters.
2015-05-27 18:04:33 -07:00
Alexandre Bury
5d9e8f760b Have child views take focus when added to StackView. 2015-05-24 01:22:27 -07:00
Alexandre Bury
a2b4273589 Fix warnings 2015-05-23 17:11:58 -07:00
Alexandre Bury
7e823435cd Stop using ncurses::WINDOW
Overlap is a mess. Let's do it ourselve.
2015-05-23 15:58:06 -07:00
Alexandre Bury
d9b56574d2 Add selector by ID 2015-05-23 10:33:29 -07:00
Alexandre Bury
d9652ac728 Add animated example. 2015-05-22 16:28:05 -07:00
Alexandre Bury
b2e52dc702 Add some (non-doc) comments. 2015-05-22 00:43:58 -07:00
Alexandre Bury
25726140d8 Add colors and styles to printer 2015-05-21 23:29:49 -07:00
Alexandre Bury
c8136c67e0 Add focus system
May need to add a direction to take_focus
2015-05-19 15:54:11 -07:00
Alexandre Bury
493ed1322c Fix stack_view when screen is smaller than content 2015-05-18 12:24:08 -07:00
Alexandre Bury
1fcca9b3a9 Rename module vec2 -> vec
Margins may be moved to vec::Vec4 some day
2015-05-18 11:51:30 -07:00
Alexandre Bury
e17ca97136 Add ViewPath and Cursive::find
Callbacks now include a path to the triggering view.
The Cursive root can find the View corresponding to a ViewPath.
In the future, ViewPaths may be returned when creating the layout.
2015-05-15 17:56:38 -07:00