Alexandre Bury
1b1d7166a1
Replace SizeRequest with simple Vec2
...
We may go back to an enum though, to handle text views in LinearLayouts.
But the previous Fixed/AtMost/Unknown distinction was useless.
2016-07-02 00:47:38 -07:00
Alexandre Bury
87cd1ce23f
Add position parameter to stack view layers
...
Can be centered, absolute or relative to the previous layer.
Can be set independently for each axis.
2016-07-01 19:19:43 -07:00
Alexandre Bury
985009e51c
More ncurses isolation
...
Also some renaming in the theme module
2016-06-30 23:38:01 -07:00
Alexandre Bury
5751a293e5
Push most ncurses-specific code into separate trait
...
Prepare backend change.
Still not isolated is the color setup in `theme`.
2016-06-29 17:37:51 -07:00
Alexandre Bury
d02c30ae9f
Fix clippy warnings
2016-06-27 22:40:11 -07:00
Alexandre Bury
80b219f34a
Apply rustfmt
2016-06-27 22:10:59 -07:00
Alexandre Bury
07c3c99e54
Update for new ncurses version
2016-03-15 15:39:08 -07:00
Alexandre Bury
db39069260
Fix focus for stack and text views.
...
And updated Lorem example with a Quit button under the scrollable text.
2015-05-30 21:54:06 -07:00
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