]> git.lyx.org Git - lyx.git/blob - src/buffer_funcs.h
ws changes mostly
[lyx.git] / src / buffer_funcs.h
1 // -*- C++ -*-
2 /* \file buffer_funcs.h
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author Alfredo Braunstein
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef BUFFER_FUNCS_H
13 #define BUFFER_FUNCS_H
14
15 #include <string>
16
17
18 class Buffer;
19 class DocIterator;
20 class ErrorList;
21 class TeXErrors;
22
23 /**
24  *  Loads a LyX file \c filename into \c Buffer
25  *  and \return success status.
26  */
27 bool loadLyXFile(Buffer *, std::string const & filename);
28
29 /* Make a new file (buffer) with name \c filename based on a template
30  * named \c templatename
31  */
32 Buffer * newFile(std::string const & filename, std::string const & templatename,
33                  bool isNamed = false);
34
35 ///return the format of the buffer on a string
36 std::string const BufferFormat(Buffer const & buffer);
37 ///
38 void bufferErrors(Buffer const &, TeXErrors const &);
39 ///
40 void bufferErrors(Buffer const &, ErrorList const &);
41
42 /// Count the number of words in the text between these two iterators
43 int countWords(DocIterator const & from, DocIterator const & to);
44
45
46 #endif // BUFFER_FUNCS_H