SDL text editing window library

I’ve written a little text editor engine which is quite like the
richedit control in Windows. It’s based around a linked-list of lines of
text, which is quite efficient. The editor codebase is 1100 lines of
portable C (no C++), while the SDL component runs about 800. It works
with monospaced or variable-width fonts because it counts the widths of
the characters and prepares the text, creating wordwrap/linewrap
pointers without altering the text. It also has a draw() method to put
all the text into an array, which is easy to draw in SDL (just go round
adding the fontsize to Y, and blitting the lines of text from the
array).

Would anyone be interested in an SDL_Edit library (probably GPL with a
commercial license for TinyWP) which simply lets you put text in a
fixed-size window and let people edit using the keyboard (keystrokes are
passed to the engine, independent of the keyboard device)? It doesn’t
yet support text selection or cursor selection with the mouse.

Not relevant to the SDL version, but the editor’s engine is currently
called TinyWP and there is a Curses port of this too (for Linux and
Windows and any platform with NCurses). It has a very small memory
footprint (Curses version compiles to 14k on Linux) and is quite
efficient, which is useful for older machines or embedded use.

Cheers,

Jeremy.

Glancing at my unstarted “Tux Writer” word-processor-for-little-kids project…

Yes. :slight_smile:

-bill!
bill at newbreedsoftware.com Check out the new, improved Tux Paint site!
http://newbreedsoftware.com/bill/ http://newbreedsoftware.com/tuxpaint/On Fri, Mar 26, 2004 at 02:04:23AM +0000, Jeremy Smith wrote:

Would anyone be interested in an SDL_Edit library (probably GPL with a
commercial license for TinyWP) which simply lets you put text in a
fixed-size window and let people edit using the keyboard (keystrokes are
passed to the engine, independent of the keyboard device)? It doesn’t
yet support text selection or cursor selection with the mouse.

It
works with monospaced or variable-width fonts because it counts the
widths of the characters and prepares the text, creating
wordwrap/linewrap pointers without altering the text. It also has a
draw() method to put all the text into an array, which is easy to draw
in SDL (just go round adding the fontsize to Y, and blitting the lines
of text from the array).

What kind of fonts does it support? Or does the user have to supply the
size of each character, and then draw the text himself?
Can it be used with OpenGL?

Would anyone be interested in an SDL_Edit library (probably GPL with a
commercial license for TinyWP)

It could be very useful, though a GPL version would be useless to me.
LGPL would be much better :-).On 26/03/2004, Jeremy Smith, you wrote:


Please remove “.ARGL.invalid” from my email when replying.
Incoming HTML mails are automatically deleted.