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
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
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
4ab9992bf8
Unfocus TextInput when Escape key is pressed
2020-07-30 00:52:02 +02: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
a1210c9dae
Improve safety of Cursor::selection
2020-07-11 00:00:14 +02:00
Héctor Ramón Jiménez
dfeb3db003
Use default_font_size for TextInput widget
2020-07-06 23:58:15 +02:00
bansheerubber
5260b3072a
implemented hecrj's suggestion
2020-06-08 10:00:25 -07:00
bansheerubber
19c07da86f
fixed formatting
2020-06-05 09:57:18 -07:00
bansheerubber
98cf9c455a
added move_cursor_to
2020-06-05 09:19:46 -07:00
bansheerubber
0d119aa731
added value to move_cursor_to_end
2020-06-05 09:13:49 -07:00
bansheerubber
6a2c73d0e0
sketch of move_cursor_to commands
2020-06-05 08:58:34 -07:00
Imbris
490a437b2f
Make Font an associated type of text_input::Renderer
2020-05-29 15:37:25 -04: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
Héctor Ramón Jiménez
e139aae143
Split Input keyboard event by ButtonState
2020-04-30 04:34:29 +02:00
Héctor Ramón Jiménez
5e47238489
Rename leftover TextInputWidget to Marker
2020-04-13 04:38:35 +02:00
Olivier Pinon
f7d7ab1ba9
Remove unnecessary 'static lifetime on Renderer
2020-04-12 00:57:44 +02:00
FabianLars
6ca97788b2
implement ctrl + del on text-input
2020-04-06 15:22:52 +02:00
Héctor Ramón Jiménez
c114be034a
Fix typo in text_input::Renderer::draw docs
2020-04-02 03:44:14 +02:00
Michael Swan
4ca54836a8
Add Ctrl+Backspace text field behaviour
2020-03-30 22:37:28 -05: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
30f02345a8
Implement Renderer::find_cursor_position
2020-03-25 13:57:02 +01:00
Héctor Ramón Jiménez
d6914d79a1
Rename is_pressed to is_dragging in text_input
2020-03-24 21:48:54 +01:00
Héctor Ramón Jiménez
5e6970b615
Improve docs of text_input::State::cursor
2020-03-24 21:47:43 +01:00
Héctor Ramón Jiménez
6791c0b208
Remove commented code in text_input
2020-03-24 21:46:20 +01:00
Héctor Ramón Jiménez
6c47a40730
Create text_input::Editor to hold editing logic
2020-03-24 20:51:22 +01:00
Héctor Ramón Jiménez
28382a47d3
Move Value to its own module
2020-03-24 20:36:33 +01:00
Héctor Ramón Jiménez
6b89dd7db9
Improve text_input::cursor API
2020-03-24 20:23:31 +01:00
Héctor Ramón Jiménez
7cb1452d29
Convert mouse::State into mouse::Click
2020-03-24 19:03:17 +01: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
FabianLars
b632dce0da
fixed panic on pasting into non updating input
2020-03-14 10:51:36 +01:00
FabianLars
731e6752eb
keep cursor inside value boundaries more reliable
2020-03-13 17:54:02 +01:00
FabianLars
767096b9bb
disable word selection if is_secure == true
2020-02-27 12:13:47 +01:00
FabianLars
0d8d236be6
More selection actions: (Ctrl +) Shift + Left/Right, Shift + Home/End
2020-02-25 17:03:52 +01:00
FabianLars
c47e30e960
double click fixed
2020-02-24 20:10:20 +01:00
FabianLars
c6c8cabdaf
moved cursor into own file
...
moved click tracking as a new State struct to input::mouse
made cursor field of text_input state private
brought back cursor type(Index, Selection) representation with a state enum
cleaned out some stuff (but not enough/all)
TODO: Documentation (sigh)
TODO: Editor struct
TODO: some (hopefully) small improvements here and there
2020-02-24 18:03:42 +01:00
FabianLars
190dcef155
Text Selection completely rewritten
2020-02-24 04:14:32 +01:00
FabianLars
883843a72d
max time window for double click
2020-02-23 01:23:57 +01:00
FabianLars
f72b1f8c45
double click for word selection
...
3 clicks to select all
2020-02-23 00:26:15 +01:00
FabianLars
33ca29f395
ctrl + a selection for text input
2020-02-22 22:17:51 +01:00
FabianLars
b2344a852e
inital patch by Finnerale
2020-02-22 21:33:45 +01: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
282ae1dc9e
Implement TextInput styling in iced_web
2020-02-06 02:37:49 +01:00
sumibi-yakitori
713ed3aca1
Custom fonts can be set in the text input.
2020-01-27 04:28:40 +09:00