Commit Graph

79 Commits

Author SHA1 Message Date
Alexandre Bury
1ad9a53cf7 Small refactoring 2018-03-14 15:11:27 -07:00
Alexandre Bury
7db1ee7335 Reverse View and AnyView
We now have `View: AnyView`
2018-03-14 14:59:41 -07:00
Alexandre Bury
f27f7792df Rename BoxableView -> IntoBoxedView
And add an implementation for Box<View>
2018-03-14 14:16:07 -07:00
Alexandre Bury
e4bf9accc3 Add BoxableView and AnyBox
And remove `impl ViewWrapper for T: Deref<View>`
This means `Box<View>` doesn't implement `View` anymore.
2018-03-14 12:32:07 -07:00
Alexandre Bury
dea226a095 Add AnyView::as_boxed_any for easier downcasting 2018-03-14 11:18:28 -07:00
Alexandre Bury
da8310b076 Rustfmt 2018-01-22 14:37:27 -08:00
Alexandre Bury
3674c118cb Rustfmt 2018-01-22 11:55:56 -08:00
Alexandre Bury
98aff39904 Move View::as_any to separate trait AnyView 2018-01-22 11:50:25 -08:00
Alexandre Bury
1551fbb543 Add View::as_any and View::as_any_mut 2018-01-22 09:20:45 -08:00
Alexandre Bury
e4cd68a4eb Rustfmt 2017-12-30 23:03:42 +01:00
Alexandre Bury
9b9619aa53 Add View: Any 2017-12-11 18:54:40 -08:00
Alexandre Bury
f90621811c More rustfmt 2017-10-14 21:18:50 -07:00
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