Assembled 2
A column based text editor
Loading...
Searching...
No Matches
editor.h
Go to the documentation of this file.
1
31#ifndef AS_EDITOR_H
32#define AS_EDITOR_H
33
35#define AS_MAX_COLUMNS 32
36
37#include <editor/config.h>
39
40#include <includes.h>
41
69
81
91struct AS_TextFile *load_file(char *name);
92
97void reload_file(struct AS_TextFile *file);
98
102void reload_all();
103
109void save_file(struct AS_TextFile *file);
110
114void save_all();
115
124void destroy_file(struct AS_TextFile *file);
125
129void destroy_all();
130
144struct AS_CfgTok *configure_editor(struct AS_CfgTok *token);
145
146#endif
void reload_all()
Definition editor.c:232
void save_all()
Definition editor.c:291
struct AS_CfgTok * configure_editor(struct AS_CfgTok *token)
Definition editor.c:339
void save_file(struct AS_TextFile *file)
Definition editor.c:243
void destroy_all()
Definition editor.c:326
void destroy_file(struct AS_TextFile *file)
Definition editor.c:302
struct AS_TextFile * load_file(char *name)
Definition editor.c:170
void reload_file(struct AS_TextFile *file)
Definition editor.c:218
Definition config.h:148
Definition editor.h:73
int * column_positions
Array of indices describing the start of each column.
Definition editor.h:75
int column_count
The number of columns in column_positions array.
Definition editor.h:77
int delimiter
The character by which each column is separated.
Definition editor.h:79
Definition buffer.h:79
Definition editor.h:45
struct AS_TextBuf ** buffers
Array of pointers to all buffers.
Definition editor.h:61
int buffer_count
Number of buffers present in buffers list (as_ctx.col_descs[as_ctx.col_desc_i].column_count).
Definition editor.h:53
int load_offset
The offset within.
Definition editor.h:55
struct AS_TextFile * next
Pointer to the next struct AS_TextFile, NULL if this is the last open file.
Definition editor.h:65
int cy
0-based index of current line.
Definition editor.h:47
char * name
Path to the file.
Definition editor.h:57
struct AS_TextFile * prev
Pointer to the previous struct AS_TextFile, NULL if this is the first open file.
Definition editor.h:67
int selected_buffers
Number of buffers selected.
Definition editor.h:49
struct AS_TextBuf * active_buffer
The buffer which is currently selected by the user.
Definition editor.h:63
int active_buffer_idx
0-based index of the active buffer.
Definition editor.h:51
FILE * file
Pointer to the open file.
Definition editor.h:59