Commit Graph

39 Commits

Author SHA1 Message Date
Alexandre Bury
1ad515e5f0 rustfmt 2018-03-22 11:04:58 -07:00
Alexandre Bury
8d9d17d372 Update StackView tests 2018-03-14 15:19:56 -07:00
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
17ccda2d40 Use BoxableView trait bound 2018-03-14 13:39:30 -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
06305c89a9 Add StackView::find_layer_from_id
Also `StackView::get` and `StackView::get_mut`
2018-03-11 16:53:41 -07:00
Alexandre Bury
5e58726ffd Add test for StackView::move_layer
From #213 (thanks xliiv)
2018-03-05 18:48:24 -08:00
Alexandre Bury
b4f32b56bb Fix move_layer index calculation
See #213
2018-03-04 16:54:16 -08:00
SEGFAULT
9e591ef635 Moving Windows in StackView (#200)
* Inital draft of reposition code.

* throwing it all in git so I can show @gycos the mess I made

* Cleaning up the example and removing that garbage getter function from StackView. More thought needs to be applied to that API.

* modified stackview to locally draw background, currently every frame. Adjusted surrounding elements to mirror this change.

* fixed dirty flag on stackView to use a cell. Also added dirty events on window resize.

* Final code cleanup.

* Fixed all highlighted issues in PR #200
2018-02-07 16:25:00 -08: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
5ac0fce363 Refactor ColorStyle
Add the notion of PaletteColor to use a color from the palette.

Breaking change: most color styles are now methods rather than enum
variants.
2018-01-17 10:22:06 -08:00
Alexandre Bury
e4cd68a4eb Rustfmt 2017-12-30 23:03:42 +01:00
Alexandre Bury
8da659367d Add StackView::move_layer 2017-12-18 18:18:23 +01:00
Alexandre Bury
bd9b6a695b Return view on pop_layer
Callbacks now often allow (and ignore) a return type.
2017-12-16 14:41:15 +01:00
Alexandre Bury
1b7170e308 StackView: store Layer<Box<V>> rather than Box<Layer<V>>
Rather than storing a Layer<V> as a Box<View>,
stores a Layer<Box<View>>, so we can unwrap it when
popping layers.
2017-12-16 14:41:15 +01:00
Alexandre Bury
75d5868162 Fix shadowview event relativization 2017-10-12 16:44:03 -07:00
Alexandre Bury
f02dda5a0a Docs 2017-10-11 11:51:46 -07:00
Alexandre Bury
4e07d8891f Add mouse event relativization to StackView and ShadowView
So that key_codes example works fine.
2017-10-11 11:35:18 -07:00
Alexandre Bury
4b59808f84 Safer substractions
Use more saturating_sub.
Fixes #148.
2017-08-14 15:13:49 -07:00
Alexandre Bury
2643ecbb15 Add chainable methods for StackView 2017-04-03 10:41:34 -07:00
Alexandre Bury
c300e0628d Rename find -> call_on
And update tutorials
2017-03-26 20:50:50 -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
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
f504ad8f0e Add fullscreen layers to StackView
Fixes #87
2017-01-23 18:54:52 -08:00
Alexandre Bury
0977daa12d Unify method names on Menubar and MenuTree 2017-01-23 16:51:48 -08:00
Alexandre Bury
4aaee06d9e Fix screen clear on layer removal
Fixes #78.
2016-10-11 17:29:13 -07:00
Alexandre Bury
44dbd5826e Make Backend::clear take &self 2016-10-09 15:47:06 -07:00
Alexandre Bury
9cf89c37de Clear screen if a layer is shrinked 2016-10-02 15:33:55 -07:00
Alexandre Bury
3b3f403f7a Apply rustfmt 2016-10-02 15:22:29 -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
f87d0e7c5b Move views to new views module 2016-07-28 16:36:01 -07:00