]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormToc.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormToc.h
index ad7ec136bf1d0eb6bfab28274798615dfefd61de..e5861c5081fcdf490a36a523f7ab4e78022b96bd 100644 (file)
@@ -1,67 +1,47 @@
 // -*- C++ -*-
-/* This file is part of
- * ====================================================== 
+/**
+ * \file FormToc.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author Angus Leeming
  *
- *           Copyright 2000 The LyX Team.
- *
- * ======================================================
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef FORMTOC_H
 #define FORMTOC_H
 
-#include <boost/smart_ptr.hpp>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
 
-#include "FormInset.h"
-#include "buffer.h"
+#include "FormDialogView.h"
+#include "toc.h"
 
-struct FD_form_toc;
+class ControlToc;
+struct FD_toc;
 
 /** This class provides an XForms implementation of the FormToc Dialog.
  */
-class FormToc : public FormCommand {
+class FormToc : public FormController<ControlToc, FormView<FD_toc> > {
 public:
        ///
-       FormToc(LyXView *, Dialogs *);
+       FormToc(Dialog &);
 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();
        ///
-       FD_form_toc * build_toc();
+       void updateContents();
 
        ///
-       Buffer::SingleList toclist;
-       /// Real GUI implementation.
-       boost::scoped_ptr<FD_form_toc> dialog_;
-       /// The ButtonController
-       ButtonController<OkCancelPolicy, xformsBC> bc_;
+       toc::Toc toc_;
 };
 
-
-inline
-xformsBC & FormToc::bc()
-{
-       return bc_;
-}
-#endif
+#endif // FORMTOC_H