2001-12-28 13:26:54 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-23 00:17:00 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file lyxtextclasslist.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
2001-12-28 13:26:54 +00:00
|
|
|
|
|
|
|
|
|
#ifndef LYXTEXTCLASSLIST_H
|
|
|
|
|
#define LYXTEXTCLASSLIST_H
|
|
|
|
|
|
|
|
|
|
#include "support/types.h"
|
|
|
|
|
|
|
|
|
|
#include <boost/utility.hpp>
|
|
|
|
|
|
2003-10-07 06:45:25 +00:00
|
|
|
|
#include <string>
|
2001-12-28 13:26:54 +00:00
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
class LyXTextClass;
|
|
|
|
|
class LyXLayout;
|
|
|
|
|
|
|
|
|
|
/// Reads the style files
|
|
|
|
|
extern void LyXSetStyle();
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
class LyXTextClassList : boost::noncopyable {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
typedef std::vector<LyXTextClass> ClassList;
|
|
|
|
|
///
|
|
|
|
|
typedef ClassList::const_iterator const_iterator;
|
|
|
|
|
///
|
2002-07-21 21:21:06 +00:00
|
|
|
|
const_iterator begin() const { return classlist_.begin(); }
|
2001-12-28 13:26:54 +00:00
|
|
|
|
///
|
2002-07-21 21:21:06 +00:00
|
|
|
|
const_iterator end() const { return classlist_.end(); }
|
2001-12-28 13:26:54 +00:00
|
|
|
|
|
2002-05-29 13:28:11 +00:00
|
|
|
|
/// Gets textclass number from name, -1 if textclass name does not exist
|
2001-12-28 13:26:54 +00:00
|
|
|
|
std::pair<bool, lyx::textclass_type> const
|
2003-10-06 15:43:21 +00:00
|
|
|
|
NumberOfClass(std::string const & textclass) const;
|
2001-12-28 13:26:54 +00:00
|
|
|
|
|
|
|
|
|
///
|
2002-03-02 16:39:54 +00:00
|
|
|
|
LyXTextClass const & operator[](lyx::textclass_type textclass) const;
|
2001-12-28 13:26:54 +00:00
|
|
|
|
|
2002-05-29 13:28:11 +00:00
|
|
|
|
/// Read textclass list. Returns false if this fails.
|
2001-12-28 13:26:54 +00:00
|
|
|
|
bool Read();
|
|
|
|
|
private:
|
|
|
|
|
///
|
2002-07-21 21:21:06 +00:00
|
|
|
|
mutable ClassList classlist_;
|
2001-12-28 13:26:54 +00:00
|
|
|
|
};
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
///
|
2001-12-28 13:26:54 +00:00
|
|
|
|
extern LyXTextClassList textclasslist;
|
|
|
|
|
|
|
|
|
|
#endif
|