Library for: Text editor + Render on an LCD display?

Hi,

I'm trying to make a Word Processor using the USB Shield + library r2.0, with Max_LCD driving a 4 x 20 HD44780 screen on the GPOUT pins. Right now I can type keys on the keyboard and they're written sequentially to it's memory (line 1, line 3, line 2, then line 4, repeat.)

What I'd like to develop, or graciously steal / port from existing code, is a library for editing a text buffer, moving a cursor around, and rendering it to the LCD - even if the dimensions of the text window are larger than what the screen can display at one time.

Given that there are a bunch of cheap word processors out there that pretty much do the same thing, I figure someone has to have written something similar before.

Features I'm hoping to implement:

  • Write text using keyboard into a buffer;
  • Inserting or deleting shifts the characters in the buffer (given the speed of Arduino, should I use a 'gap buffer' strategy?)
  • Render text document (say, 80 cols x 25 lines) to whatever size screen is being used - 1, 2 or 4 lines; 16, 20, 40 or 80 columns, etc.)
  • Navigate around the virtual text document using arrow keys, modifier keys to jump by word, or home/end, pgup/dn.
  • Shift-select text; invert selected text; cut, copy and paste
  • Special control combos to display onscreen help, show how much memory is available, etc.
  • Auto scroll while typing or navigating; word wrap text to virtual window size.

If memory becomes an issue I can use a board with more onboard RAM.

I will post a followup to this with some projects and libraries I found that are somewhat similar.

Your thoughts & advice would be much appreciated!

Why?

Doc

Here are the results of some of my google searches for various keywords related to this project:

which points to PS/2 keyboard interfacing with AVR - YouTube

which points to Text Editor on AVR (which is a good start)

Other good examples I'm checking out:

MemoComponentUnit.pas in http://tigcc.ticalc.org/ (Compiler for TI Graphing Calculators)

Ncurses - could some small subset be ported to Arduino?
http://fixunix.com/embedded/6114-ncurses-hd44780-lcd.html

PicoGUI
http://picogui.org/ - In particular they have a Python based editor called Nifty that seems nice

Minigui - standalone? Seems overkill and again, is graphical, much of it would be unneeded

Docedison,

Because I have trouble falling asleep without emptying my brain of all of my crazy ideas.
But if I grab my phone or tablet, then I'm too tempted to google more aspects of those ideas, or get on Facebook, etc.

So I'm trying to create something that I can ONLY use for this purpose - as a place to capture short messages or ideas, without the temptation of internet access.

If I can get this piece working to some level, then I may look into the next stage, which would be to create a note in the cloud (Evernote, etc) so I can easily access the information later. (Also, if I can get the info off of the device, then I don't have to worry about file storage, and don't have to worry if it loses power, etc.)

M2tklib has a single line text input field (Google Code Archive - Long-term storage for Google Code Project Hosting.), but it is far away from a complete word processor.

M2tklib will work fine with a 4x20 LCD and Arduino Uno.

Oliver

Thanks for the tip - it also looks like a good source of inspiration!