Libui: rich text editor

Created on 8 Jul 2016  路  8Comments  路  Source: andlabs/libui

Hello,

simple question.
I didn't find any element that i can use (i'm looked in the ui.h).
But, ... is there any stuff like this avaible?
If not, can you add this stuff?

Thanks for the answere

enhancement

Most helpful comment

I am itching to use libui via Nim to build an IDE for Spry (sprylang.org) but... a code editor component is probably a prerequisite for that.

All 8 comments

The GTK and Cocoa documentation suggests using text view widgets and manipulation of the cursor/contents for providing simple text editors. These are exposed as multiline entry widgets in libui, albeit without the cursor manipulation bits...

uiMultilineEntry is not rich text. Not sure how I'm going to approach this.

In other words, I doubt there are existing widgets that can be reused, unless libui pulls in Scintilla and makes it available on each platform. IUP did go for that approach.

Scintilla is specifically a source code editor. That's ultimately the problem that I have to figure out: how do other programs that use rich text, like presentation programs, do it? (See also #74.)

Under Cocoa, NSTextView handles rich text viewing + editing quite nicely. TextEdit on OS X is almost exclusively a build-out of NSTextView, with very little code being unique to TextEdit itself. NSTextView alongside NSAttributedString do most of the heavy lifting.

I don't know if other platforms have direct counterparts to these, though.

Windows have Rich Edit.

I am itching to use libui via Nim to build an IDE for Spry (sprylang.org) but... a code editor component is probably a prerequisite for that.

I've started working on this; you can follow the utflib-and-attrstr branch if you want to see the prerequisite steps of redoing the text system.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andlabs picture andlabs  路  11Comments

zevv picture zevv  路  9Comments

mohammed-altmimi picture mohammed-altmimi  路  5Comments

parro-it picture parro-it  路  3Comments

andlabs picture andlabs  路  9Comments