Commit graph

42 commits

Author SHA1 Message Date
Nicolas Levy
0333a8daff
Overwrite overlay method in Widget implementation for Button (#764)
* Overwrite `overlay` method in Widget implementation for Button

* Overwrite `overlay` method in Widget implementation for Button (cargo fmt)

* Fix button overlay
2021-03-14 23:39:01 +01:00
Héctor Ramón Jiménez
21971e0037 Make Clipboard argument in Widget trait mutable 2021-03-10 01:59:02 +01:00
Héctor Ramón Jiménez
8fb0ede72e Propagate Button events to contents 2020-12-18 09:40:10 +01:00
Héctor Ramón Jiménez
3bdf931925 Turn Touch into a touch::Event enum 2020-12-15 06:38:46 +01:00
Héctor Ramón Jiménez
09110a93b0 Merge branch 'ios-support-wip' into feature/touch-support 2020-12-15 06:13:19 +01:00
Héctor Ramón Jiménez
01322f69a4 Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
2020-11-26 02:05:43 +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
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 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
Héctor Ramón Jiménez
bb9ccc4f62 Remove inconsistent input module in iced_native 2020-04-30 05:04:45 +02:00
Héctor Ramón Jiménez
e55cd9652e Split Input mouse event by ButtonState 2020-04-30 04:53:15 +02:00
Olivier Pinon
41f6a325e9 #288 Renamed XXXWidget to Marker 2020-04-12 01:20:40 +02:00
Olivier Pinon
f7d7ab1ba9 Remove unnecessary 'static lifetime on Renderer 2020-04-12 00:57:44 +02:00
Héctor Ramón Jiménez
d07304fb85 Hash type ids in Widget::hash_layout impls 2020-03-30 17:28:55 +02:00
Théo Gaillard
0539cd1b85
refactor: remove not mandatory static lifetime 2020-03-30 06:39:10 +08:00
Héctor Ramón Jiménez
d3572e1b81 Turn Touch into a struct and add finger id 2020-03-19 12:17:16 +01:00
Sebastian Imlay
e19a07d400 Added initial touch events to support iOS 2020-03-18 11:26:53 -07:00
daxpedda
f4b8bce837
Revert changing the constructor and implement new method. 2020-02-14 21:41:35 +01:00
daxpedda
b72bd0b2b5
Add bound to Node constructor. 2020-02-14 15:57:07 +01:00
Héctor Ramón Jiménez
1797e15b8c Add default padding to Button 2020-01-22 11:17:07 +01:00
Héctor Ramón Jiménez
7b278755fc Write missing docs and reenable deny statements 2020-01-09 18:31:07 +01:00
Héctor Ramón Jiménez
8caa66be27 Add Renderer::Defaults and style inheritance 2019-12-30 12:14:26 +01:00
Héctor Ramón Jiménez
c7b170da6d Draft Style and StyleSheet for Button 2019-12-29 10:57:01 +01:00
Héctor Ramón Jiménez
a14b39555e Allow clipboard access in Widget::on_event 2019-12-18 07:45:49 +01:00
Héctor Ramón Jiménez
c1b9f66525 Add Button::height and Button::min_height 2019-12-09 21:59:31 +01:00
Héctor Ramón Jiménez
e92ea48e88 Make Button::background generic 2019-12-05 01:57:35 +01:00
Héctor Ramón Jiménez
048909b45d Fix Button example in iced_native 2019-11-22 22:13:54 +01:00
Héctor Ramón Jiménez
d136b7ce64 Uncomment missing debug implementations rule 2019-11-22 21:16:40 +01:00
Héctor Ramón Jiménez
428509c84a Merge branch 'master' into improvement/docs 2019-11-21 13:53:02 +01:00
Héctor Ramón Jiménez
65eb218d3d Move widgets from core to native and web
Also made fields private and improved `Renderer` traits.
2019-11-21 13:47:20 +01:00
Héctor Ramón Jiménez
6cdf69e76b Make width and height required methods 2019-11-16 22:08:49 +01:00
Héctor Ramón Jiménez
ceb02f4a36 Implement Container widget
Remove `align_self` and `justify_content` methods
2019-11-11 05:26:08 +01:00
Héctor Ramón Jiménez
0240c3981b Draft custom layout engine based on druid 2019-11-11 03:08:00 +01:00
Héctor Ramón Jiménez
2303111e09 Draft new layout API 2019-11-10 01:55:32 +01:00
Héctor Ramón Jiménez
c427ce0cec Reduce Copy constraint to Clone in Message 2019-11-02 02:15:17 +01:00
Héctor Ramón Jiménez
9dabbf7885 Provide Renderer to Widget::on_event
This allows us to implement configurable event processing that adapts to
different rendering strategies.
2019-10-29 03:34:21 +01:00
Héctor Ramón Jiménez
8846a239cf Rename Renderer::Primitive to Renderer::Output 2019-10-11 22:15:39 +02:00
Héctor Ramón Jiménez
10e10e5e06 Make iced_core::Button customizable
Now it supports:
  - Any kind of content
  - Custom border radius
  - Custom background
2019-10-08 03:13:41 +02:00
Héctor Ramón Jiménez
a7d1194403 Add Renderer and Primitive concepts 2019-10-05 03:56:18 +02:00
Héctor Ramón Jiménez
eda1048dbc Complete some hash_layout implementations 2019-09-20 19:31:49 +02:00
Héctor Ramón Jiménez
b9e0f74948 Create iced_core and iced_native 2019-09-20 19:15:31 +02:00