Commit graph

328 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
3bcee62beb Implement event capturing for Column 2020-11-12 00:40:52 +01:00
Héctor Ramón Jiménez
04468a7147 Implement event capturing for Checkbox 2020-11-12 00:20:09 +01:00
Héctor Ramón Jiménez
a44cd07212 Implement event capturing for Button 2020-11-12 00:19:12 +01:00
Héctor Ramón Jiménez
3f968b8c87 Make Widget::on_event return an event::Status 2020-11-12 00:09:52 +01:00
Héctor Ramón Jiménez
3b2ed0d6f0 Remove unnecessary move in PaneGrid::new 2020-11-10 03:18:46 +01:00
Héctor Ramón Jiménez
d6d5cf0294 Restore hotkeys in pane_grid example
- Implement `subscription::events_with`
- Remove `pane_grid::KeyPressEvent`
- Return closest sibling in `pane_grid::State::close`
2020-11-10 02:32:57 +01:00
Héctor Ramón Jiménez
c53022e8df Fix typo in documentation of pane_grid::Content 2020-11-10 01:51:27 +01:00
Héctor Ramón Jiménez
8008ea5286 Introduce on_click handler in PaneGrid 2020-11-10 01:48:11 +01:00
Héctor Ramón Jiménez
5681c83d3c Remove focus concept from pane_grid 2020-11-10 01:38:27 +01:00
Héctor Ramón Jiménez
1a2cb2f35b Split focus and unfocus methods in text_input 2020-11-09 20:32:58 +01:00
Paul Delafosse
f7d67598cb Add textinput focus method 2020-11-09 20:32:50 +01:00
Héctor Ramón Jiménez
91b1886968 Fix Widget::draw for Rule 2020-10-28 06:21:07 +01:00
Héctor Ramón Jiménez
d328b07b39 Introduce viewport to Widget::draw
This should eventually allow us to only generate primitives that are
visible.
2020-10-28 06:21:07 +01:00
Héctor Ramón
8a3ce90959
Merge pull request #575 from clarkmoody/scrollable-width
Custom Scrollbar Width
2020-10-27 23:35:52 +01:00
Héctor Ramón Jiménez
d3b04bf892 Introduce Eq requirement to build a PickList 2020-10-24 09:32:23 +02:00
Clark Moody
f05578c8f8 Update scrollbar logic and introduce outer_bounds 2020-10-22 16:05:44 -05:00
Clark Moody
09e67c5c27 Replace hard-coded params with struct members 2020-10-22 14:07:07 -05:00
Héctor Ramón
23647d2f50
Merge pull request #545 from MonliH/master
Remove outdated `Fill` comment for `Column` and `Row`
2020-10-17 21:12:09 +02:00
Jonathan Li
461499dd62 Remove entirely 2020-10-17 10:48:31 -04:00
Héctor Ramón Jiménez
d7a5e54455 Require Clone for Message early when needed
Prior to this change, the widgets that needed a `Clone` bound on `Message` to
implement the `Widget` trait could be created with a non-cloneable `Message`.

As a consequence, the compiler complained only when actually trying to use the
`Widget` trait. Normally, this happens when trying to `push` the widget in a
container or turn it into an `Element`.

Furthermore, the compiler error in this case does not mention `Message` nor the
`Clone` bound, but instead complains about a missing `From` implementation.
Thus, it can easily cause confusion!

This change introduces `Clone` bounds in the main implementation of the
widgets that need it to properly implement the `Widget` trait. As a
result, the compiler complains early when trying to create one of these widgets
with a non-cloneable `Message` and explicitly mentions that the `Message` needs
to implement `Clone`.
2020-10-17 08:10:30 +02:00
Jakub Hlusička
4910e03833 Fix typo in Row's and Column's hash_layout 2020-10-13 20:48:53 +02:00
Jonathan Li
7c24277210 Document better 2020-10-02 21:53:40 -04:00
Jonathan Li
8346209c37 Satify documented behaviour 2020-10-01 17:10:13 -04:00
Héctor Ramón Jiménez
2ce5df0844 Merge branch 'feature/rule-widget' into master 2020-08-22 21:25:06 +02:00
Billy Messenger
8d68c8584e widget Rule added 2020-08-22 21:23:27 +02:00
Héctor Ramón Jiménez
bbc6e91429 Implement hash_layout for pane_grid::TitleBar 2020-08-19 02:03:21 +02:00
Héctor Ramón Jiménez
9ba4cfd23f Add height method to Slider 2020-08-01 08:18:52 +02:00
Héctor Ramón
72cfe85f7f
Merge pull request #463 from mobile-bungalow/titlebar_options
Added `always_show_controls` method to TitleBar
2020-07-31 06:55:55 +02:00
Héctor Ramón Jiménez
ac74f35424 Clarify TitleBar::always_show_controls docs a bit 2020-07-31 06:43:51 +02:00
Héctor Ramón Jiménez
ab0da5dad0 Move always_show_controls after padding 2020-07-31 06:43:27 +02:00
Héctor Ramón Jiménez
174565715e Fix typo in TitleBar::new 2020-07-31 04:23:55 +02:00
Héctor Ramón Jiménez
4ab9992bf8 Unfocus TextInput when Escape key is pressed 2020-07-30 00:52:02 +02:00
Héctor Ramón Jiménez
51c22f2426 Fix Widget::layout for Checkbox 2020-07-28 08:23:44 +02:00
Héctor Ramón Jiménez
5fd239c488 Add custom font support to Checkbox 2020-07-28 08:21:33 +02:00
mobile-bungalow
7977e970ca Added method to TitleBar, allowing controls to be show statically instead of only on mouseover 2020-07-27 01:17:02 -07:00
Héctor Ramón Jiménez
55d2c5886f Introduce state method to TextInput 2020-07-24 19:20:46 +02:00
Héctor Ramón Jiménez
a165eddd75 Avoid PaneGrid unfocus when cursor is unavailable 2020-07-23 04:44:35 +02:00
Héctor Ramón Jiménez
a225a218e0 Fix Default implementation for pick_list::State 2020-07-23 04:06:26 +02:00
Héctor Ramón Jiménez
aaf5986123 Improve Menu API to facilitate external control 2020-07-23 03:58:59 +02:00
Héctor Ramón Jiménez
3d91926a74 Keep original focus state while a pane is dragged 2020-07-22 03:40:17 +02:00
Héctor Ramón Jiménez
35b1b8b0e7 Add focused method to pane_grid::State 2020-07-22 02:58:14 +02:00
Héctor Ramón Jiménez
021b173ef3 Add newline before Marker in pane_grid 2020-07-22 02:55:35 +02:00
Héctor Ramón
da5da3958e
Merge pull request #444 from hecrj/feature/overlay
Overlay support and `PickList` widget
2020-07-16 05:00:37 +02:00
Héctor Ramón Jiménez
4314ce36f4 Remove redundant min checks in Editor 2020-07-11 00:11:45 +02:00
Héctor Ramón Jiménez
a1210c9dae Improve safety of Cursor::selection 2020-07-11 00:00:14 +02:00
mtkennerly
855c0faa59 Fix panic on paste in TextInput after programmatic modification of contents 2020-07-10 07:14:26 -04:00
Héctor Ramón Jiménez
73b8ae8e5e Rename ComboBox to PickList 2020-07-10 02:52:00 +02:00
Héctor Ramón Jiménez
2118a726f8 Write documentation for the new overlay API 2020-07-10 02:39:12 +02:00
Héctor Ramón Jiménez
dc0e423142 Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
Héctor Ramón Jiménez
f24e03eae8 Implement Widget::overlay for PaneGrid 2020-07-10 01:35:58 +02:00