|
static struct line_info * | format_textutf8 (char *text, int width, enum form_wrap wrap, int format) |
| Allocates a line_info table describing the layout of the textarea buffer.
|
static struct line_info * | format_text (char *text, int width, enum form_wrap wrap, int format) |
| Allocates a line_info table describing the layout of the textarea buffer.
|
static int | get_textarea_line_number (struct line_info *line, int cursor_position) |
| Searches for cursor_position (aka.
|
int | area_cursor (struct el_form_control *fc, struct form_state *fs, int utf8) |
| Fixes up the form_state.vpos and form_state.vypos members.
|
static void | draw_textarea_utf8 (struct terminal *term, struct form_state *fs, struct document_view *doc_view, struct link *link) |
void | draw_textarea (struct terminal *term, struct form_state *fs, struct document_view *doc_view, struct link *link) |
char * | encode_textarea (struct submitted_value *sv) |
static char * | save_textarea_file (char *value) |
| We use some evil hacking in order to make external textarea editor working.
|
static struct textarea_data * | init_textarea_data (struct terminal *term, struct form_state *fs, struct document_view *doc_view, struct link *link) |
static void | done_textarea_data (struct textarea_data *td) |
void | free_textarea_data (struct terminal *term) |
void | textarea_edit (int op, struct terminal *term_, struct form_state *fs_, struct document_view *doc_view_, struct link *link_) |
void | menu_textarea_edit (struct terminal *term, void *xxx, void *ses_) |
static enum frame_event_status | textarea_op (struct form_state *fs, struct el_form_control *fc, int utf8, int(*do_op)(struct form_state *, struct line_info *, int, int)) |
void | new_pos (struct form_state *fs, struct line_info *line, int current, int max_cells) |
static int | do_op_home (struct form_state *fs, struct line_info *line, int current, int utf8) |
static int | do_op_up (struct form_state *fs, struct line_info *line, int current, int utf8) |
static int | do_op_down (struct form_state *fs, struct line_info *line, int current, int utf8) |
static int | do_op_end (struct form_state *fs, struct line_info *line, int current, int utf8) |
static int | do_op_bob (struct form_state *fs, struct line_info *line, int current, int utf8) |
static int | do_op_eob (struct form_state *fs, struct line_info *line, int current, int utf8) |
enum frame_event_status | textarea_op_home (struct form_state *fs, struct el_form_control *fc, int utf8) |
enum frame_event_status | textarea_op_up (struct form_state *fs, struct el_form_control *fc, int utf8) |
enum frame_event_status | textarea_op_down (struct form_state *fs, struct el_form_control *fc, int utf8) |
enum frame_event_status | textarea_op_end (struct form_state *fs, struct el_form_control *fc, int utf8) |
enum frame_event_status | textarea_op_bob (struct form_state *fs, struct el_form_control *fc, int utf8) |
enum frame_event_status | textarea_op_eob (struct form_state *fs, struct el_form_control *fc, int utf8) |
| Set the form state so the cursor is on the last line of the buffer.
|
enum frame_event_status | textarea_op_enter (struct form_state *fs, struct el_form_control *fc, int utf8) |
static int | do_op_left (struct form_state *fs, struct line_info *line, int current, int utf8) |
static int | do_op_right (struct form_state *fs, struct line_info *line, int current, int utf8) |
enum frame_event_status | textarea_op_left (struct form_state *fs, struct el_form_control *fc, int utf8) |
enum frame_event_status | textarea_op_right (struct form_state *fs, struct el_form_control *fc, int utf8) |
void | set_textarea (struct document_view *doc_view, int direction) |
Textarea form item handlers.
char * save_textarea_file |
( |
char * | value | ) |
|
|
static |
We use some evil hacking in order to make external textarea editor working.
We need to have some way how to be notified that the editor finished and we should reload content of the textarea. So we use global variable textarea_editor
as a flag whether we have one running, and if we have, we just call textarea_edit(1, ...). Then we recover our state from static variables, reload content of textarea back from file and clean up.
Unfortunately, we can't support calling of editor from non-master links session, as it would be extremely ugly to hack (you would have to transfer the content of it back to master somehow, add special flags for not deleting of 'delete' etc) and I'm not going to do that now. Inter-links communication NEEDS rewrite, as it looks just like quick messy hack now. –pasky