]> git.lyx.org Git - lyx.git/blob - src/lyxtextclasslist.h
remove noload/don't typeset
[lyx.git] / src / lyxtextclasslist.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2001 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef LYXTEXTCLASSLIST_H
13 #define LYXTEXTCLASSLIST_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "support/types.h"
20
21 #include <boost/utility.hpp>
22
23 #include "LString.h"
24
25 #include <vector>
26
27 class LyXTextClass;
28 class LyXLayout;
29
30 /// Reads the style files
31 extern void LyXSetStyle();
32
33 ///
34 class LyXTextClassList : boost::noncopyable {
35 public:
36         ///
37         typedef std::vector<LyXTextClass> ClassList;
38         ///
39         typedef ClassList::const_iterator const_iterator;
40         ///
41         const_iterator begin() const { return classlist_.begin(); }
42         ///
43         const_iterator end() const { return classlist_.end(); }
44
45         /// Gets textclass number from name, -1 if textclass name does not exist
46         std::pair<bool, lyx::textclass_type> const
47         NumberOfClass(string const & textclass) const;
48
49         ///
50         LyXTextClass const & operator[](lyx::textclass_type textclass) const;
51
52         /// Read textclass list.  Returns false if this fails.
53         bool Read();
54 private:
55         ///
56         mutable ClassList classlist_;
57 };
58
59 ///
60 extern LyXTextClassList textclasslist;
61
62 #endif