lyx_mirror/src/lyxtextclasslist.h
Georg Baum da9cdaf218 Reduce calls of ::exit()
* src/main.C
	(main): return LyX::exec()

	* src/frontends/{gtk,qt3,qt4}/lyx_gui.C
	(lyx_gui::exec): Change return value to int
	(lyx_gui::start): ditto

	* src/frontends/qt[3,4]/lyx_gui.C
	(lyx_gui::exit): Call QApplication::exit instead of ::exit, this
	hack is not needed anymore

	* src/frontends/lyx_gui.h
	(lyx_gui::exec): Change return value to int
	(lyx_gui::start): ditto

	* src/lyxtextclasslist.[Ch]
	(LyXSetStyle): SChange return value to bool and don't call ::exit

	* src/lyx_main.C
	(showFileError): Don't exit anymore

	* src/lyx_main.[Ch]
	(LyX::exec): Change return value to int
	(LyX::priv_exec): ditto
	(LyX::exec2): ditto
	(LyX::init): Change return value to bool
	(LyX::readRcFile): ditto
	(LyX::readUIFile): ditto



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14339 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-05 17:01:26 +00:00

65 lines
1.4 KiB
C++

// -*- C++ -*-
/**
* \file lyxtextclasslist.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
*
* Full author contact details are available in file CREDITS.
*/
#ifndef LYXTEXTCLASSLIST_H
#define LYXTEXTCLASSLIST_H
#include "lyxtextclass.h"
#include "support/types.h"
#include <boost/utility.hpp>
#include <string>
#include <vector>
class LyXLayout;
/// Reads the style files
extern bool LyXSetStyle();
///
class LyXTextClassList : boost::noncopyable {
public:
///
typedef std::vector<LyXTextClass> ClassList;
///
typedef ClassList::const_iterator const_iterator;
///
const_iterator begin() const { return classlist_.begin(); }
///
const_iterator end() const { return classlist_.end(); }
/// Gets textclass number from name, -1 if textclass name does not exist
std::pair<bool, lyx::textclass_type> const
numberOfClass(std::string const & textclass) const;
///
LyXTextClass const & operator[](lyx::textclass_type textclass) const;
/// Read textclass list. Returns false if this fails.
bool read();
/// add a textclass from user local directory.
/// Return ture/false, and textclass number
std::pair<bool, lyx::textclass_type> const
addTextClass(std::string const & textclass, std::string const & path);
private:
///
mutable ClassList classlist_;
};
///
extern LyXTextClassList textclasslist;
#endif