+// -*- C++ -*-
/**
* \file ControlCharacter.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Angus Leeming, a.leeming@.ac.uk
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
*/
#ifndef CONTROLCHARACTER_H
#define CONTROLCHARACTER_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "ControlDialogs.h"
-#include "lyxfont.h"
-#include "LColor.h"
+#include "ControlDialog_impl.h"
+#include "character.h"
+
+#include <boost/scoped_ptr.hpp>
/** A controller for Character dialogs.
*/
-class ControlCharacter : public ControlDialog<ControlConnectBD>
-{
+class ControlCharacter : public ControlDialogBD {
public:
- ///
- enum FONT_STATE {
- ///
- IGNORE,
- ///
- EMPH_TOGGLE,
- ///
- UNDERBAR_TOGGLE,
- ///
- NOUN_TOGGLE,
- ///
- LATEX_TOGGLE,
- ///
- INHERIT
- };
-
- ///
- typedef std::pair<string, LyXFont::FONT_FAMILY> FamilyPair;
- ///
- typedef std::pair<string, LyXFont::FONT_SERIES> SeriesPair;
- ///
- typedef std::pair<string, LyXFont::FONT_SHAPE> ShapePair;
- ///
- typedef std::pair<string, LyXFont::FONT_SIZE> SizePair;
- ///
- typedef std::pair<string, FONT_STATE> BarPair;
- ///
- typedef std::pair<string, LColor::color> ColorPair;
-
///
ControlCharacter(LyXView &, Dialogs &);
///
void setSize(LyXFont::FONT_SIZE);
///
- void setBar(FONT_STATE);
+ void setBar(frnt::FONT_STATE);
///
void setColor(LColor::color);
///
///
void setToggleAll(bool);
-private:
+ ///
+ LyXFont::FONT_FAMILY getFamily() const;
+ ///
+ LyXFont::FONT_SERIES getSeries() const;
+ ///
+ LyXFont::FONT_SHAPE getShape() const;
+ ///
+ LyXFont::FONT_SIZE getSize() const;
+ ///
+ frnt::FONT_STATE getBar() const;
+ ///
+ LColor::color getColor() const;
+ ///
+ string getLanguage() const;
+ ///
+ bool getToggleAll() const;
+
/// Get changed parameters and Dispatch them to the kernel.
virtual void apply();
+private:
/// set the params before show or update.
virtual void setParams();
- /// clean-up on hide.
- virtual void clearParams();
///
- LyXFont * font_;
+ boost::scoped_ptr<LyXFont> font_;
///
bool toggleall_;
};
-/// Helper functions
-std::vector<ControlCharacter::FamilyPair> const getFamilyData();
-///
-std::vector<ControlCharacter::SeriesPair> const getSeriesData();
-///
-std::vector<ControlCharacter::ShapePair> const getShapeData();
-///
-std::vector<ControlCharacter::SizePair> const getSizeData();
-///
-std::vector<ControlCharacter::BarPair> const getBarData();
-///
-std::vector<ControlCharacter::ColorPair> const getColorData();
-///
-std::vector<string> const getLanguageData();
-
#endif // CONTROLCHARACTER_H