Héctor Ramón
a7c40665fe
Merge pull request #652 from twitchyliquid64/text_input_fix
...
text_input: Do not capture Tab/Up/Down keys
2021-08-12 12:58:08 +07:00
Héctor Ramón
587dbbca42
Merge pull request #776 from AldoMX/master
...
Added `select_all` method to `TextInput`.
2021-07-22 20:48:03 +07:00
Héctor Ramón Jiménez
b57d567981
Use bitflags for keyboard::Modifiers
2021-07-12 22:01:57 +02:00
Héctor Ramón
8a3b71df8b
Replace ignored doc-tests with additional documentation for Padding
2021-06-01 19:45:47 +07:00
Ben LeFevre
fe0a27c56d
Add support for asymmetrical padding
2021-06-01 19:05:39 +07:00
Aldo Fregoso
57247106b9
Added select_all method to TextInput.
2021-03-13 14:50:59 -06:00
Héctor Ramón Jiménez
17dcfa8faf
Implement copy and cut behavior for TextInput
2021-03-10 01:59:20 +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
b22b0dd7ff
Update window_clipboard to 0.2
2021-03-10 01:16:26 +01:00
Tom
498188e735
text_input: Do not capture tab/up/down keys
2020-12-16 20:46:36 -08:00
Héctor Ramón Jiménez
70164f68a6
Fix text selection with touch events in TextInput
2020-12-15 06:48:12 +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
d612bf5678
Rename keyboard::ModifiersState to Modifiers
2020-11-26 02:05:42 +01:00
Héctor Ramón Jiménez
1d23db1866
Track keyboard modifiers in text_input
2020-11-25 04:10:23 +01:00
Zak
d275a4ed32
This PR fixes a bug with select all (CMD + A on MacOS) when using a text_input.
...
Previous behaviour: when selecting all (CMD + A) would delete the current text inside the input and replace the content with just the letter 'a'.
Now we check if the logo key (modifier key) has been pressed before checking any other key and save it to the state level. This way we can prevent any text being deleted when using the select all shortcut or text being entered at all when a modifier key is pressed (this behaviour matches other text input behaviour i.e text inputs in the browser etc...).
2020-11-25 03:57:18 +01:00
Héctor Ramón Jiménez
140bea352e
Disable dragging in TextInput after double click
...
When using a trackpad, mouse move events may happen between the
press/release events. This was incorrectly triggering selection dragging in
the `TextInput` widget.
Eventually, we should implement proper word-aware selection dragging.
2020-11-19 02:45:47 +01:00
Héctor Ramón Jiménez
df712f9ccf
Implement flexible TextInput::draw helper
2020-11-17 05:13:06 +01:00
Héctor Ramón Jiménez
bf6c65b5ad
Implement event capturing for TextInput
2020-11-12 01:11:09 +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
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