Go Down

Topic: Library for: Text editor + Render on an LCD display? (Read 945 times) previous topic - next topic



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!


--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


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


which points to http://www.youtube.com/watch?v=a2SDs7H5KDE

which points to http://www.mediafire.com/download/9v433myoo662bhl/Text+Editor+on+AVR.zip (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://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




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 (http://code.google.com/p/m2tklib/wiki/elref#TEXT), but it is far away from a complete word processor.

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



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

Go Up