3 * \file ControlDocument.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef CONTROLDOCUMENT_H
13 #define CONTROLDOCUMENT_H
16 #include "support/types.h"
17 #include <boost/scoped_ptr.hpp>
25 /** A controller for Document dialogs.
27 class ControlDocument : public Dialog::Controller {
29 /// font family names for BufferParams::fontsDefaultFamily
30 static char const * const fontfamilies[5];
31 /// GUI names corresponding fontfamilies
32 static char const * fontfamilies_gui[5];
34 ControlDocument(Dialog &);
38 virtual bool initialiseParams(std::string const & data);
40 virtual void clearParams();
42 virtual void dispatchParams();
44 virtual bool isBufferDependent() const { return true; }
45 /// always true since we don't manipulate document contents
46 virtual bool canApply() const { return true; }
48 LyXTextClass const & textClass() const;
50 BufferParams & params() const;
52 void setLanguage() const;
54 void saveAsDefault() const;
56 bool loadTextclass(textclass_type tc) const;
58 bool const isFontAvailable(std::string const & font) const;
59 /// does this font provide Old Style figures?
60 bool const providesOSF(std::string const & font) const;
61 /// does this font provide true Small Caps?
62 bool const providesSC(std::string const & font) const;
63 /// does this font provide size adjustment?
64 bool const providesScale(std::string const & font) const;
67 boost::scoped_ptr<BufferParams> bp_;
70 } // namespace frontend
73 #endif // CONTROLDOCUMENT_H