Alexandre Bury
e166869c51
Add some documentation to view
module
2016-07-13 20:52:24 -07:00
Alexandre Bury
03c400ad44
Fix linear layout in constrained space
2016-07-13 01:19:05 -07:00
Alexandre Bury
99bf28dfd6
Add needs_relayout
method to View
trait.
...
Purely optimization-focused trait (it is safe to ignore it entirely).
Allows view groups to take shortcuts if they know their children didn't
change since last time.
2016-07-10 17:41:49 -07:00
Alexandre Bury
4b095a0652
Apply rustfmt
2016-07-09 19:05:51 -07:00
Alexandre Bury
2860467f29
Cache layout in TextView
...
Calling either get_min_size or layout will cache the results, so the
next call with the same constraints will not re-compute everything.
2016-07-09 18:23:58 -07:00
Alexandre Bury
1863e48b07
Add MenuPopup view
2016-07-02 01:01:09 -07:00
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
c958093b74
Add TrackedView to cache the view size
2016-07-01 20:23:58 -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
58bd274df0
Update Readme & run rustfmt
2016-06-25 16:39:05 -07:00
Alexandre Bury
07c3c99e54
Update for new ncurses version
2016-03-15 15:39:08 -07:00
Alexandre Bury
36fbc1ce5b
Add some convenient ID methods
2015-07-28 15:57:52 +02:00
Alexandre Bury
df11b4f1f0
Update documentation
2015-06-08 15:38:10 -07:00
Alexandre Bury
df5ff808e3
Basic linear layout implementation
...
Not tested yet
2015-06-07 20:58:10 -07:00
Alexandre Bury
cb523e88ae
Fix doc-tests
2015-06-04 11:40:35 -07:00
Alexandre Bury
323805b52f
Add scrolling to SelectView
...
Scrolling functionalities are stored in ScrollBase. Both TextView and
SelectView use it.
Also add letter search to SelectView (currently case sensitive).
And made the cities example bigger with a long list of capitals.
2015-05-31 16:38:53 -07:00
Alexandre Bury
6b781684ef
Rename ListView -> SelectView
...
And added documentation.
2015-05-30 21:32:24 -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
e8fcaabd6c
Add EditView
...
TODO: proper visualization:
* Display cursor when focused (instead of color change)
* Do not use HIGHLIGHT, but something like INVERTED
2015-05-26 15:48:35 -07:00
Alexandre Bury
dca9d7f662
Use usize for Vec2 instead of u32
...
Much less casts needed now.
2015-05-25 14:46:29 -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
9b998b0dd4
Add missing documentation.
2015-05-20 11:11:55 -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
04121414e1
Add proper draw and layout to Dialog
2015-05-18 19:41:35 -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
74f0fee9b6
Add Dialog skeleton
2015-05-16 14:02:15 -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