Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy way to access the Cursor of a TextEdit widget ? #1403

Open
the-drunk-coder opened this issue Dec 15, 2020 · 5 comments
Open

Easy way to access the Cursor of a TextEdit widget ? #1403

the-drunk-coder opened this issue Dec 15, 2020 · 5 comments
Labels

Comments

@the-drunk-coder
Copy link

Hi,

not sure if this is the right place to ask but I couldn't find anything anywhere else ...

I started digging my way into the TextEdit example, and it works more or less as expected, but I can't find any (obvious) way to access the Cursor/State of the TextEdit widget ... is there one that I'm missing ?

@alvinhochun
Copy link
Collaborator

I afraid this state is not currently exposed in the public API, at least there is none that I can see. I don't know if it really makes sense to expose it either, because in my point of view this doesn't really fit the immediate-mode paradigm.

@the-drunk-coder
Copy link
Author

Hmm not sure about the paradigm, but if I want to create a more sophisticated text editor based on conrod to embed in my application, I'd pretty much need access to the selected text, cursor positions etc.

@alvinhochun
Copy link
Collaborator

If you are making something like a sophisticated text editor, the built-in TextEdit widget in its current state most certainly wouldn't work well for the job at all, for multiple reasons...

@the-drunk-coder
Copy link
Author

Well ... there's probably several stages between simple displaying of text and an emacs-level of sophistication.

What I'm looking for right now is a simple widget that I can integrate into an application, that allows me to select text and access the current selection and do something with it. But if that's not what the builtin widget can provide right now, good to know.

@alvinhochun
Copy link
Collaborator

If you insist on using Conrod for this, I can only suggest copying the source of TextEdit into your project and modify it, or make a fork.

I don't know if this is something that can or should be implemented in Conrod, but I believe it will at least require some design changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants