I can't download the gui_read.c file
Sorry for the death link, here is a new one. One of these days I will pay for hosting instead of using these free sites that erase your files from time to time.
http://wontolla.freehostia.com/CHDK/FileEditor/gui_read.cAnd the video that explains the keyboard usage, similar to iPods. (so I guess, because I don't have one).
http://wontolla.freehostia.com/CHDK/FileEditor/MQwerty.flvThe code is fairly commented and most of my changes are between lines in the form:
Begin Wontolla's mess...End Wontolla's messBut you don't really need to understand or change what I did. All my functions are just to draw here and there on the screen and control the buttons. You should focus at the end, in the main
switch for this feature to be completed. I marked the places where the code to actually write on a file should be added. For example:
gui_read_draw_keyboard_square(square, COLOUR_CENTER, page, key);
//DISPLAY CHARACTER
stage = 2;
}
else if (stage==2) {
//WRITE CHARACTER
gui_read_draw_keyboard_section(state, black, page);
state=left;
qui_read_draw_button_margin(left, COLOUR_SELECTED);
gui_read_draw_keyboard_section(left, coloured, page);
key=0;
stage = 1;
Where the
//WRITE CHARACTER comment must be replaced by the code that writes the present character to the file, using the standard I/O C code functions like
fopen,
fwrite etc.
I recommend adding some code to create a new file and write on it first. Then, move to the modification of an existing file and insert/erase/modify in any place on that file. Unfortunately, nowadays I don't have time to work on this. Sadly, not even to go out and take pictures. But I hope one of you guys find the way to finish this feature as it will be useful for all those CHDK script writers out there.
I will happily answer any questions about the code etc.
Have fun!