]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormToc.h
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormToc.h
index 9716c074f6d0256bd7ce4b234fd59ecc2751f68a..1e5bfeb1fc292de370dda6d6f6dca11ac4cdf67e 100644 (file)
@@ -4,65 +4,53 @@
  *
  *           LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *           Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
+ *
+ * \file FormToc.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
  */
 
 #ifndef FORMTOC_H
 #define FORMTOC_H
 
-#include <boost/smart_ptr.hpp>
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "FormInset.h"
+#include "FormBase.h"
 #include "buffer.h"
-#include "xformsBC.h"
 
+class ControlToc;
 struct FD_form_toc;
 
 /** This class provides an XForms implementation of the FormToc Dialog.
  */
-class FormToc : public FormCommand {
+class FormToc : public FormCB<ControlToc, FormDB<FD_form_toc> > {
 public:
        ///
-       FormToc(LyXView *, Dialogs *);
+       FormToc(ControlToc &);
 private:
-       /// Pointer to the actual instantiation of the ButtonController.
-       virtual xformsBC & bc();
-       /// Disconnect signals. Also perform any necessary housekeeping.
-       virtual void disconnect();
-
+       /// not needed
+       virtual void apply() {}
        /// Build the dialog
        virtual void build();
-       /// bool indicates if a buffer switch took place
-       virtual void updateSlot(bool) { update(); }
        /// Update dialog before showing it
        virtual void update();
        /// Filter the inputs on callback from xforms
-       virtual bool input( FL_OBJECT *, long);
-       /// Pointer to the actual instantiation of the xforms form
-       virtual FL_FORM * form() const;
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
        ///
-       void updateToc();
+       void updateType();
        ///
+       void updateContents();
+
+       /// Fdesign generated method
        FD_form_toc * build_toc();
 
        ///
-       Buffer::SingleList toclist;
-       /// Real GUI implementation.
-       boost::scoped_ptr<FD_form_toc> dialog_;
-       /// The ButtonController
-       ButtonController<OkCancelPolicy, xformsBC> bc_;
+       Buffer::SingleList toclist_;
 };
 
-
-inline
-xformsBC & FormToc::bc()
-{
-       return bc_;
-}
-#endif
+#endif // FORMTOC_H