|
Assembled 2
A column based text editor
|
Go to the source code of this file.
Classes | |
| struct | AS_SyntaxPoint |
| struct | AS_LLElement |
| struct | AS_TextBuf |
Functions | |
| struct AS_TextBuf * | new_buffer (int col_start, int col_end) |
| void | destroy_buffer (struct AS_TextBuf *buffer) |
| void | buffer_char_insert (char c) |
| void | buffer_char_del () |
| int | buffer_move_ln_down (struct AS_TextBuf *active_buffer) |
| int | buffer_move_ln_up (struct AS_TextBuf *active_buffer) |
Assembled - Column based text editor Copyright (C) 2023-2024 awewsomegamer
This file is apart of Assembled.
Assembled is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
This file handles actions related to struct AS_TextBufs, such as character insertion and deletion.
| void buffer_char_del | ( | ) |
Deletes the current character.
Deletes the current character in as_ctx.text_file->active_buffer->current_element. If current_element is completely empty, then it will be deleted.
| void buffer_char_insert | ( | char | c | ) |
Inserts a new character into the active buffer.
Insert the given character into as_ctx.text_file->active_buffer->current_element.
| char | c - The character to be inserted. If it is '\n', then a new struct AS_LLElement will be inserted. |
| int buffer_move_ln_down | ( | struct AS_TextBuf * | active_buffer | ) |
Moves the current line in the given buffer down.
| struct | AS_TextBuf *active_buffer - The buffer in which to move active_buffer->current_element down one. |
| int buffer_move_ln_up | ( | struct AS_TextBuf * | active_buffer | ) |
Moves the current line in the given buffer up.
| struct | AS_TextBuf *active_buffer - The buffer in which to move active_buffer->current_element up one. |
| void destroy_buffer | ( | struct AS_TextBuf * | buffer | ) |
Frees a struct AS_TextBuf
| struct | AS_TextBUf *buffer - The buffer to be freed. |
| struct AS_TextBuf * new_buffer | ( | int | col_start, |
| int | col_end ) |
Creates a new struct AS_TextBuf
Creates a new, and initializes all fields of a new struct AS_TextBuf.
| int | col_start - The 0-based index where the buffer's column starts |
| int | col_end - The 0-based index where the buffer's column ends |