2006-04-28 18:22:03 -07:00
|
|
|
/*
|
2005-10-13 07:08:18 -07:00
|
|
|
* moolinebuffer.h
|
|
|
|
*
|
2006-02-23 06:03:17 -08:00
|
|
|
* Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
2005-10-13 07:08:18 -07:00
|
|
|
*
|
|
|
|
* This program 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; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* See COPYING file that comes with this distribution.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MOOEDIT_COMPILATION
|
|
|
|
#error "This file may not be included"
|
|
|
|
#endif
|
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
#ifndef __MOO_LINE_BUFFER_H__
|
|
|
|
#define __MOO_LINE_BUFFER_H__
|
|
|
|
|
2005-10-13 07:08:18 -07:00
|
|
|
#include <gtk/gtktextbuffer.h>
|
|
|
|
#include "mooedit/mootextbtree.h"
|
|
|
|
#include "mooedit/mootextbuffer.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _LineBuffer LineBuffer;
|
|
|
|
typedef struct _BTData Line;
|
|
|
|
|
|
|
|
struct _LineBuffer {
|
|
|
|
BTree *tree;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
LineBuffer *_moo_line_buffer_new (void);
|
|
|
|
void _moo_line_buffer_free (LineBuffer *line_buf);
|
2005-10-13 07:08:18 -07:00
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
Line *_moo_line_buffer_get_line (LineBuffer *line_buf,
|
2005-10-13 07:08:18 -07:00
|
|
|
int index);
|
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
Line *_moo_line_buffer_insert (LineBuffer *line_buf,
|
2005-10-13 07:08:18 -07:00
|
|
|
int index);
|
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
guint _moo_line_buffer_get_stamp (LineBuffer *line_buf);
|
|
|
|
int _moo_line_buffer_get_line_index (LineBuffer *line_buf,
|
2005-12-10 20:23:32 -08:00
|
|
|
Line *line);
|
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
void _moo_line_buffer_add_mark (LineBuffer *line_buf,
|
2005-12-10 20:23:32 -08:00
|
|
|
MooLineMark *mark,
|
|
|
|
int line);
|
2006-04-28 18:22:03 -07:00
|
|
|
void _moo_line_buffer_remove_mark (LineBuffer *line_buf,
|
2005-12-10 20:23:32 -08:00
|
|
|
MooLineMark *mark);
|
2006-04-28 18:22:03 -07:00
|
|
|
void _moo_line_buffer_move_mark (LineBuffer *line_buf,
|
2005-12-10 20:23:32 -08:00
|
|
|
MooLineMark *mark,
|
|
|
|
int line);
|
2006-04-28 18:22:03 -07:00
|
|
|
GSList *_moo_line_buffer_get_marks_in_range (LineBuffer *line_buf,
|
2005-12-10 20:23:32 -08:00
|
|
|
int first_line,
|
|
|
|
int last_line);
|
|
|
|
|
2006-04-28 18:22:03 -07:00
|
|
|
void _moo_line_buffer_split_line (LineBuffer *line_buf,
|
2005-11-22 10:39:05 -08:00
|
|
|
int line,
|
2006-06-21 02:50:36 -07:00
|
|
|
int num_new_lines);
|
2006-04-28 18:22:03 -07:00
|
|
|
void _moo_line_buffer_delete (LineBuffer *line_buf,
|
2005-10-13 07:08:18 -07:00
|
|
|
int first,
|
2005-12-10 20:23:32 -08:00
|
|
|
int num,
|
2005-12-10 20:26:39 -08:00
|
|
|
int move_to,
|
|
|
|
GSList **moved_marks,
|
|
|
|
GSList **deleted_marks);
|
2005-10-13 07:08:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __MOO_LINE_BUFFER_H__ */
|