]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCharacter.h
Implemented controller-view split for FormBibtex.
[lyx.git] / src / frontends / xforms / FormCharacter.h
index 17ee3ad3aa2fa3582a353fba90b689a23b90826e..ca7cdaebab5c5be4f5b92892edaa8924627a4f52 100644 (file)
 #ifndef FORM_CHARACTER_H
 #define FORM_CHARACTER_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG_
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
 
-class LyXView;
-class Dialogs;
 class Combox;
 struct FD_form_character;
 
@@ -29,31 +28,42 @@ struct FD_form_character;
  */
 class FormCharacter : public FormBaseBD {
 public:
-   ///
-   FormCharacter(LyXView *, Dialogs *);
-   ///
-   ~FormCharacter();
-
+       ///
+       FormCharacter(LyXView *, Dialogs *);
 private:
        
-   /// Build the popup
-   virtual void build();
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
+
+       /// Build the popup
+       virtual void build();
    
-   /// Apply from popup
-   virtual void apply();
+       /// Apply from popup
+       virtual void apply();
    
-   /// Update the popup.
-   virtual void update();
+       /// Update the popup.
+       virtual void update();
    
-   /// Pointer to the actual instantiation of the xforms form
-   virtual FL_FORM * form() const;
+       /// Pointer to the actual instantiation of the xform's form
+       virtual FL_FORM * form() const;
 
-   FD_form_character * build_character();
+       ///
+       FD_form_character * build_character();
        
-   /// Real GUI implementation.
-   FD_form_character * dialog_;
-   
-   Combox * combo_language2_;
+       /// Real GUI implementation.
+       boost::scoped_ptr<FD_form_character> dialog_;
+
+       ///
+       boost::scoped_ptr<Combox> combo_language2_;
+
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormCharacter::bc()
+{
+       return bc_;
+}
 #endif