Alexandre Bury
a4ca7bbf1e
Rustfmt
2017-10-12 16:43:59 -07:00
Alexandre Bury
607e6f1bdc
Implement ViewWrapper for DerefMut<T: View>
...
This means View is implemented for Box<T: View>, Box<View>, ...
2017-09-24 12:24:23 -07:00
Alexandre Bury
1a4e1c104e
Implement View for Box<View>
2017-09-23 13:53:26 -07:00
Alexandre Bury
66af7fab7c
IdView: skip view if borrowing fails.
...
Fixes #144
2017-07-03 01:29:30 -07:00
Alexandre Bury
c300e0628d
Rename find
-> call_on
...
And update tutorials
2017-03-26 20:50:50 -07:00
Alexandre Bury
c3c69e7892
Merge IdView and RefCellView
...
And remove `with_id_mut`
2017-03-25 21:56:31 -07:00
Alexandre Bury
cdb3df7fc8
Merge branch 'master' into refview
2017-03-25 15:01:57 -07:00
Alexandre Bury
017bb21710
Add View::focus_view
2017-03-25 14:50:52 -07:00
Alexandre Bury
cb3adc5baf
feat: find_id
can now find views declared with with_id_mut
2017-02-26 15:52:42 -08:00
Alexandre Bury
b63762d441
View::find_any now takes a closure instead of returning reference
...
Also updated Finder::find and find_id.
2017-02-07 15:49:06 -08:00
Alexandre Bury
d7eaa5a086
Rename View::get_min_size
-> required_size
2017-01-23 22:53:03 -08:00
Alexandre Bury
924c74afbe
Add ScrollStrategy to TextView
2017-01-21 11:44:40 -08:00
Alexandre Bury
3b3f403f7a
Apply rustfmt
2016-10-02 15:22:29 -07:00
Alexandre Bury
2e06dd70cb
Apply rustfmt
2016-09-22 22:11:13 -07:00
Alexandre Bury
a5135a7aff
Better documentation for view::Finder
...
Also adds `Finder::find_id`
2016-09-21 14:57:03 -07:00
Alexandre Bury
93980a7d0c
Rename View::find
-> View::find_any
...
And add the `Finder` trait on Views to provide a true `find`.
2016-09-21 11:33:44 -07:00
Alexandre Bury
7d16f70d67
Add some tests to view::position
2016-09-20 18:32:31 -07:00
Alexandre Bury
b38995b906
Refactor BoxView
...
Add `Boxable` trait.
2016-08-03 21:55:41 -07:00
Alexandre Bury
24e4e41a85
Move DummyView to views
module
2016-07-29 23:36:40 -07:00
Alexandre Bury
fb10e58188
Move LinesIterator
to utils
module
2016-07-28 23:05:33 -07:00
Alexandre Bury
f87d0e7c5b
Move views to new views
module
2016-07-28 16:36:01 -07:00
Alexandre Bury
261d2aac48
Remove Ticker
alias
...
The `Counter` NewType can fill this role.
2016-07-27 23:55:34 -07:00
Alexandre Bury
bea7240271
Wrap Arc<AtomicUsize>
around NewType Counter
...
And offers a simpler API
2016-07-26 23:29:13 -07:00
Alexandre Bury
eb6b5d5728
Fix LinearLayout children width
...
Now properly gives the full width to every children.
2016-07-26 10:49:37 -07:00
Alexandre Bury
5dd20db676
Add Dialog::empty
and Dialog::content
...
Allows to set the content after the title, for when it's more
readable.
2016-07-25 20:43:01 -07:00
Alexandre Bury
c1c9322319
Add panel view
2016-07-25 13:35:46 -07:00
Alexandre Bury
e29511e757
Add ProgressBar
...
Also make Callback its own NewType to add comversion methods.
2016-07-24 23:01:09 -07:00
Alexandre Bury
0a8228d073
Add examples to documentation
2016-07-20 22:08:06 -07:00
Alexandre Bury
8b6022a398
Add popup mode to SelectView
...
Single-line, opens a popup on selection.
2016-07-19 23:47:27 -07:00
Alexandre Bury
a1d0231e2c
Make Menubar
a proper View
2016-07-19 20:44:50 -07:00
Alexandre Bury
d4afdf024f
Add checkbox view
2016-07-16 17:22:24 -07:00
Alexandre Bury
5ee8706582
Add scrollable
flag to TextViews
2016-07-16 17:08:17 -07:00
Alexandre Bury
a22c92a1a1
Add ListView
...
Also added `examples/list_view.rs`.
2016-07-16 13:25:21 -07:00
Alexandre Bury
2b54d6df28
Make View::draw
take a &self (instead of a &mut self)
...
TrackedView, the only user of the mutability, now uses internal
mutability with a Cell.
2016-07-15 23:44:38 -07:00
Alexandre Bury
91fdf96066
Add Direction
enum
...
And add a Direction argument to take_focus
2016-07-14 22:23:06 -07:00
Alexandre Bury
1b34934df7
Fix printer::Printer
imports
2016-07-13 23:25:54 -07:00
Alexandre Bury
5059e21cb1
Fix focus in LinearLayout
...
Focus now at least works. #42 is still open though.
2016-07-13 22:11:03 -07:00
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