lyx_mirror/src/frontends/controllers/ControlDocument.h

75 lines
1.8 KiB
C
Raw Normal View History

// -*- C++ -*-
/**
* \file ControlDocument.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Edwin Leuven
*
* Full author contact details are available in file CREDITS.
*/
#ifndef CONTROLDOCUMENT_H
#define CONTROLDOCUMENT_H
#include "Dialog.h"
#include "support/types.h"
#include <boost/scoped_ptr.hpp>
namespace lyx {
class BufferParams;
class LyXTextClass;
namespace frontend {
/** A controller for Document dialogs.
*/
class ControlDocument : public Dialog::Controller {
public:
The Grand Font Selection Redesign: * lib/lyx2lyx/LyX.py (format_relation): add file format 247 (from Georg BAUM). * lib/lyx2lyx/lyx_1_5.py: add convert_font_settings, revert_font_settings (from Georg BAUM). * lib/chkconfig.ltx: Test for newly supported font packages * lib/doc/LaTeXConfig.lyx.in: document newly supported font packages * lib/doc/UserGuide.lyx: document new UI. * lib/doc/Extended.lyx: update PostScript font documentation * development/FORMAT: document file format change 246->247. * src/tex-strings.[Ch]: new strings tex_fonts_roman, tex_fonts_sans, tex_fonts_monospaced (with GUI equivalents). * src/buffer.C: Format up to 247. * src/bufferparams.C: new params fontsRoman, fontsSans, fontsTypewriter, fontsDefaultFamily, fontsSC, fontsOSF, fontsSansScale and fontsTypewriterScale (LyXFont const BufferParams::getFont): consider switch of default family. (string const BufferParams::loadFonts): new method to get all the LaTeX font stuff done. * src/paragraph.C (LyXFont const Paragraph::getFont): (LyXFont const Paragraph::getLabelFont): (LyXFont const Paragraph::getLayoutFont): user buffer's not textclass's default font * src/text.C (int LyXText::leftMargin): (int LyXText::rightMargin): user buffer's not textclass's default font * src/text2.C (LyXFont LyXText::getFont): (LyXFont LyXText::getLayoutFont): (LyXFont LyXText::getLabelFont): check if the family of the default document font has been customized. * src/frontends/gtk/GDocument.[Ch]: implement new font ui (from Georg BAUM). * src/frontends/gtk/glade/document.glade: implement new font ui (from Georg BAUM). * src/frontends/qt3/Makefile.dialogs: add new FontModuleBase * src/frontends/qt3/ui/FontModuleBase.ui: new File * src/frontends/qt3/ui/TextLayoutModuleBase.ui: remove font widgets * src/frontends/qt3/QDocument.C * src/frontends/qt3/QDocumentDialog.[Ch]: implement new font ui * src/frontends/qt4/Makefile.dialogs: add new FontUi * src/frontends/qt4/QDocumentDialog.[Ch]: implement new font ui * src/frontends/qt4/ui/FontUi.ui: new File * src/frontends/qt4/ui/TextLayoutUi.ui: remove font widgets * src/frontends/qt4/ui/compile_uic.sh: add new FontUi * src/frontends/xforms/FormDocument.[Ch]: implement new font ui * src/frontends/xforms/forms/form_document.fd: add new font tab. * src/frontends/controllers/ControlDocument.[Ch] (char ControlDocument::fontfamilies): (char ControlDocument::fontfamilies_gui): (bool ControlDocument::isFontAvailable): (bool ControlDocument::providesSC): (bool ControlDocument::providesOSF): (bool ControlDocument::providesScale): new methods, providing font info. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14143 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-19 08:10:17 +00:00
/// font family names for BufferParams::fontsDefaultFamily
static char const * const fontfamilies[5];
/// GUI names corresponding fontfamilies
static char const * fontfamilies_gui[5];
///
ControlDocument(Dialog &);
///
~ControlDocument();
///
virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
virtual void dispatchParams();
///
virtual bool isBufferDependent() const { return true; }
/// always true since we don't manipulate document contents
virtual bool canApply() const { return true; }
///
LyXTextClass const & textClass() const;
///
BufferParams & params() const;
///
void setLanguage() const;
///
void saveAsDefault() const;
///
bool loadTextclass(textclass_type tc) const;
The Grand Font Selection Redesign: * lib/lyx2lyx/LyX.py (format_relation): add file format 247 (from Georg BAUM). * lib/lyx2lyx/lyx_1_5.py: add convert_font_settings, revert_font_settings (from Georg BAUM). * lib/chkconfig.ltx: Test for newly supported font packages * lib/doc/LaTeXConfig.lyx.in: document newly supported font packages * lib/doc/UserGuide.lyx: document new UI. * lib/doc/Extended.lyx: update PostScript font documentation * development/FORMAT: document file format change 246->247. * src/tex-strings.[Ch]: new strings tex_fonts_roman, tex_fonts_sans, tex_fonts_monospaced (with GUI equivalents). * src/buffer.C: Format up to 247. * src/bufferparams.C: new params fontsRoman, fontsSans, fontsTypewriter, fontsDefaultFamily, fontsSC, fontsOSF, fontsSansScale and fontsTypewriterScale (LyXFont const BufferParams::getFont): consider switch of default family. (string const BufferParams::loadFonts): new method to get all the LaTeX font stuff done. * src/paragraph.C (LyXFont const Paragraph::getFont): (LyXFont const Paragraph::getLabelFont): (LyXFont const Paragraph::getLayoutFont): user buffer's not textclass's default font * src/text.C (int LyXText::leftMargin): (int LyXText::rightMargin): user buffer's not textclass's default font * src/text2.C (LyXFont LyXText::getFont): (LyXFont LyXText::getLayoutFont): (LyXFont LyXText::getLabelFont): check if the family of the default document font has been customized. * src/frontends/gtk/GDocument.[Ch]: implement new font ui (from Georg BAUM). * src/frontends/gtk/glade/document.glade: implement new font ui (from Georg BAUM). * src/frontends/qt3/Makefile.dialogs: add new FontModuleBase * src/frontends/qt3/ui/FontModuleBase.ui: new File * src/frontends/qt3/ui/TextLayoutModuleBase.ui: remove font widgets * src/frontends/qt3/QDocument.C * src/frontends/qt3/QDocumentDialog.[Ch]: implement new font ui * src/frontends/qt4/Makefile.dialogs: add new FontUi * src/frontends/qt4/QDocumentDialog.[Ch]: implement new font ui * src/frontends/qt4/ui/FontUi.ui: new File * src/frontends/qt4/ui/TextLayoutUi.ui: remove font widgets * src/frontends/qt4/ui/compile_uic.sh: add new FontUi * src/frontends/xforms/FormDocument.[Ch]: implement new font ui * src/frontends/xforms/forms/form_document.fd: add new font tab. * src/frontends/controllers/ControlDocument.[Ch] (char ControlDocument::fontfamilies): (char ControlDocument::fontfamilies_gui): (bool ControlDocument::isFontAvailable): (bool ControlDocument::providesSC): (bool ControlDocument::providesOSF): (bool ControlDocument::providesScale): new methods, providing font info. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14143 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-19 08:10:17 +00:00
///
bool const isFontAvailable(std::string const & font) const;
/// does this font provide Old Style figures?
bool const providesOSF(std::string const & font) const;
/// does this font provide true Small Caps?
bool const providesSC(std::string const & font) const;
/// does this font provide size adjustment?
bool const providesScale(std::string const & font) const;
private:
///
boost::scoped_ptr<BufferParams> bp_;
};
} // namespace frontend
} // namespace lyx
#endif // CONTROLDOCUMENT_H