// -*- C++ -*-
-/**
+/**
* \file FormCharacter.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Edwin Leuven, leuven@fee.uva.nl
- * \author Angus Leeming, a.leeming@.ac.uk
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Edwin Leuven
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS.
*/
#ifndef FORM_CHARACTER_H
#define FORM_CHARACTER_H
-#include <boost/smart_ptr.hpp>
+#include "FormDialogView.h"
+#include "ControlCharacter.h" // for ControlCharacter enum
-#ifdef __GNUG_
-#pragma interface
-#endif
+#include "LColor.h"
-#include "FormBase.h"
-#include "lyxfont.h" // for LyXFont enums
-#include "ControlCharacter.h" // for ControlCharacter enum
-#include "LColor.h" // for LColor enum
+namespace lyx {
+namespace frontend {
-class Combox;
-struct FD_form_character;
+struct FD_character;
-/**
- * This class provides an XForms implementation of the FormCharacter Dialog.
+/**
+ * This class provides an XForms implementation of the Character Dialog.
* The character dialog allows users to change the character settings
* in their documents.
*/
class FormCharacter
- : public FormCB<ControlCharacter, FormDB<FD_form_character> > {
+ : public FormController<ControlCharacter, FormView<FD_character> > {
public:
///
- FormCharacter(ControlCharacter &);
+ FormCharacter(Dialog &);
private:
- /// Build the popup
- virtual void build();
-
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
-
- /// Nothing to update...
- virtual void update() {}
- /** Callback method (used only to activate Apply button when
- combox is changed */
- static void ComboInputCB(int, void *, Combox *);
+ /// Build the dialog
+ virtual void build();
+
+ /// Update the dialog.
+ virtual void update();
+
+ /// Filter the inputs on callback from xforms
+ virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
- /// Type definition from the fdesign produced header file.
- FD_form_character * build_character();
-
///
- boost::scoped_ptr<Combox> combo_language2_;
+ std::vector<LyXFont::FONT_FAMILY> family_;
///
- std::vector<LyXFont::FONT_FAMILY> family_;
+ std::vector<LyXFont::FONT_SERIES> series_;
///
- std::vector<LyXFont::FONT_SERIES> series_;
+ std::vector<LyXFont::FONT_SHAPE> shape_;
///
- std::vector<LyXFont::FONT_SHAPE> shape_;
+ std::vector<LyXFont::FONT_SIZE> size_;
///
- std::vector<LyXFont::FONT_SIZE> size_;
+ std::vector<FONT_STATE> bar_;
///
- std::vector<ControlCharacter::FONT_STATE> bar_;
+ std::vector<LColor_color> color_;
///
- std::vector<LColor::color> color_;
+ std::vector<std::string> lang_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif