Commit graph

220 commits

Author SHA1 Message Date
Olivier Goffart
1b91158b46 corelib: allow to use i32 for coordinate instead of f32 2022-04-11 17:46:50 +02:00
Lukas Jung
4a7a84f253
Text shortcuts (#1129)
* Add moving by word to TextInput

* moving cursor to end of line, paragraph and text

* fix shortcut in cursor move test
2022-04-04 15:25:50 +02:00
Lukas Jung
54a2901777 Move TextShortcut to input.rs and rename Shortcut to StandardShortcut 2022-03-31 10:54:38 +02:00
Lukas Jung
068489d788 Use Shortcuts for Copy Paste in TextInput 2022-03-31 10:54:38 +02:00
Lukas Jung
7cffd928f2 add TextShortcut to text.rs and use it 2022-03-31 10:54:38 +02:00
Lukas Jung
a3cb8c1200 remove redundant setting of preferred_x_pos in mouse events 2022-03-28 10:07:07 +02:00
Lukas Jung
3818b09626 reset the preferred_x_pos in set_cursor_position() 2022-03-28 10:07:07 +02:00
Lukas Jung
b6171530ab replace text_input_position_for_byte_offset with text_input_cursor_rect_for_byte_offset 2022-03-28 10:07:07 +02:00
Lukas Jung
8ca915d9bd add comment to TextInput's preferred_x_pos 2022-03-23 13:23:58 +01:00
Lukas Jung
8f3ab66de5 Add up and down cursor movement to TextInput 2022-03-23 13:23:58 +01:00
Olivier Goffart
e017d5118b Wasm GL backend: use a <input> element so it show the keyboard on mobile
cc #215

Handle Input event from the input directly instead of going through winit
for the TextInput.

Note that this doesn't handle the composition event well, so the text is
only considered written when it is accepted
2022-03-22 13:33:31 +01:00
Simon Hausmann
75949e702c Prepare item rendering for children self-handling
The render function now takes a self_rc and returns a enum that permits
the implementation to handle rendering of children on its own and
thus make the caller skip that traversal step.
2022-03-18 15:42:49 +01:00
Jared Moulton
b884a4ca19 Fix CI issues, remove references to replace-char, add a test, fix creation of string 2022-03-02 15:47:32 +01:00
Jared Moulton
fdbc8056b3 Add an option to draw *'s instead of characters for password fields 2022-03-02 15:47:32 +01:00
Tobias Hunger
6795d3ee00
Introduce a FocusEventResult enum (#975) 2022-02-21 17:43:41 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
The README.md contains the warning that used to be in lib.rs.

Add README.md files to all internal crates

... pointing to the official public crate to use instead.

Rename internal crates

fixup: README files

fixup rename
2022-02-07 13:12:48 +01:00
Olivier Goffart
c00884d5a2 Rename SixtyFPSElement 2022-02-02 14:29:30 +01:00
Simon Hausmann
8399de5c6a Rename the sixtyfps-corelib-macros crate 2022-02-01 18:03:47 +01:00
Tobias Hunger
e6b24bceec [reorg]: Set up and populate the internal directory
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.

pre-commit applied some cleanups to the moved files:
 - Consistent newline at end of file policy
 - trimming trailing whitespace
 - Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00