iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
23.06k stars 1.06k forks source link

Multi-line text input #320

Closed wesrer closed 7 months ago

wesrer commented 4 years ago

I am fairly new to iced, and have been trying to write some basic code to test the waters. I was just wondering if there is any easy way currently to have multi-line text input, because all the example code uses a single line input for TextInput.

hecrj commented 4 years ago

No, there is no multi-line text input support yet. This is definitely planned, but I believe we will need to tackle #33 and #34 first.

If you want to join the discussion, I shared some of my thoughts in a Zulip thread:

This will be pretty hard (see Text Editing Hates You Too).

I believe it should be a new widget with a retained API on top of some interface for text editing (ropey may be worth considering). Proper cursor movement and multi-line text selection will be a challenge, specially if we want to support different scripts.

I feel like we should focus on rendering and layouting text properly first. The idea here would be replacing wgpu_glyph with a more GUI-oriented text renderer (i.e. with shaping). There are many parts of the Rust ecosystem that need to mature for this to happen, which means there are many opportunities for contributing!

the-drunk-coder commented 3 years ago

I'm at the same point, looking for an easy, pure rust text editor widget ... my attempt to modify the current one wasn't fruitful so far ... I got multiple lines but everything else was off :sweat_smile:

dhardy commented 3 years ago

easy, pure rust text editor widget

If that's all you want, both KAS and Druid have multi-line text boxes. Don't expect them to be perfect and I'm not sure about easy. Text is insanely complicated once you start digging into the subject.

Dimev commented 2 years ago

How far along is at the moment?

13r0ck commented 2 years ago

@Dimev not sure, but I recommend that you be VERY patient.

benluelo commented 2 years ago

Hello, is there any progress on this issue? I would love to contribute to whatever needs help to get this issue moving. I see that #33 and #34 are mentioned in an above comment, where should I start?

CodeDead commented 2 years ago

Definitely a nice-to-have!

jellybobbin commented 2 years ago

Definitely a nice-to-have!

henry-lang commented 1 year ago

would appreciate

adracea commented 1 year ago

Hello, is there any status update for this? I'm seeing the two mentioned PRs are coming along but no idea how far away this would be.

jquesada2016 commented 9 months ago

I see #33 was closed, so not sure where this currently stands?

thunderstorm010 commented 9 months ago

According to the roadmap it is planned for 0.12.

max397574 commented 7 months ago

couldn't this be closed now?

hecrj commented 7 months ago

Implemented in #2123.