]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCharacter.h
fix crash with "save as"
[lyx.git] / src / frontends / xforms / FormCharacter.h
index 5fc537783cc8d59f726ac456df85c7f74af4a8db..8de86771e47e79849c3c0615ca19d8ebd2f0df0c 100644 (file)
@@ -1,58 +1,77 @@
-/** 
+// -*- C++ -*-
+/**
  * \file FormCharacter.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- * 
- * \author Edwin Leuven, leuven@fee.uva.nl
+ * 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 "FormBase.h"
-
-#ifdef __GNUG_
+#ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBase.h"
+#include "lyxfont.h"          // for LyXFont enums
+#include "ControlCharacter.h" // for ControlCharacter enum
+#include "LColor.h"           // for LColor enum
+#include "character.h"        // for FONT_STATE enum
+
+#include <boost/scoped_ptr.hpp>
 
-class LyXView;
-class Dialogs;
 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 FormBaseBD {
+class FormCharacter
+       : public FormCB<ControlCharacter, FormDB<FD_character> > {
 public:
-   ///
-   FormCharacter(LyXView *, Dialogs *);
-   ///
-   ~FormCharacter();
-
+       ///
+       FormCharacter();
 private:
-       
-   /// Build the popup
-   virtual void build();
-   
-   /// Apply from popup
-   virtual void apply();
-   
-   /// Update the popup.
-   virtual void update();
-   
-   /// Pointer to the actual instantiation of the xform's form
-   virtual FL_FORM * form() const;
-
-   FD_form_character * build_character();
-       
-   /// Real GUI implementation.
-   FD_form_character  * dialog_;
-   
-   Combox * combo_language2;
+
+       /// Apply from dialog
+       virtual void apply();
+
+       /// 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);
+
+       /** Callback method (used only to activate Apply button when
+           combox is changed */
+       static void ComboInputCB(int, void *, Combox *);
+
+       ///
+       boost::scoped_ptr<Combox> combo_language2_;
+       ///
+       std::vector<LyXFont::FONT_FAMILY>  family_;
+       ///
+       std::vector<LyXFont::FONT_SERIES>  series_;
+       ///
+       std::vector<LyXFont::FONT_SHAPE>   shape_;
+       ///
+       std::vector<LyXFont::FONT_SIZE>    size_;
+       ///
+       std::vector<frnt::FONT_STATE>      bar_;
+       ///
+       std::vector<LColor::color>         color_;
+       ///
+       std::vector<string>                lang_;
 };
 
 #endif