]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCharacter.h
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormCharacter.h
index ca7cdaebab5c5be4f5b92892edaa8924627a4f52..8e6fd23233e7812d37b40fc88d4692edc07c4a1b 100644 (file)
@@ -5,6 +5,7 @@
  * See the file COPYING.
  * 
  * \author Edwin Leuven, leuven@fee.uva.nl
+ * \author Angus Leeming, a.leeming@.ac.uk
  */
 
 #ifndef FORM_CHARACTER_H
 #pragma interface
 #endif
 
-#include "FormBaseDeprecated.h"
+#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
 
 class Combox;
 struct FD_form_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_form_character> > {
 public:
        ///
-       FormCharacter(LyXView *, Dialogs *);
+       FormCharacter(ControlCharacter &);
 private:
-       
-       /// Pointer to the actual instantiation of the ButtonController.
-       virtual xformsBC & bc();
 
-       /// Build the popup
-       virtual void build();
-   
-       /// Apply from popup
+       /// Apply from dialog
        virtual void apply();
    
-       /// Update the popup.
-       virtual void update();
+       /// Build the dialog
+       virtual void build();
    
-       /// Pointer to the actual instantiation of the xform's form
-       virtual FL_FORM * form() const;
+       /// 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 *);
+
+       /// Fdesign generated method
        FD_form_character * build_character();
        
-       /// Real GUI implementation.
-       boost::scoped_ptr<FD_form_character> dialog_;
-
        ///
        boost::scoped_ptr<Combox> combo_language2_;
-
-       /// The ButtonController
-       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
+       ///
+       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<character::FONT_STATE> bar_;
+       ///
+       std::vector<LColor::color>         color_;
 };
 
-
-inline
-xformsBC & FormCharacter::bc()
-{
-       return bc_;
-}
 #endif