]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormToc.h
fix crash with "save as"
[lyx.git] / src / frontends / xforms / FormToc.h
index 78cbaa5263090b0e42ff1a6429dfb73ff9611aee..eb8e627af38ce99454298f0f599a96ab58a4cd33 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
-/* This file is part of
- * ====================================================== 
+/**
+ * \file xforms/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
 #pragma interface
 #endif
 
-#include "FormCommand.h"
-#include "buffer.h"
-struct FD_form_toc;
+#include "FormBase.h"
+#include "toc.h"
+
+class ControlToc;
+struct FD_toc;
 
 /** This class provides an XForms implementation of the FormToc Dialog.
  */
-class FormToc : public FormCommand {
+class FormToc : public FormCB<ControlToc, FormDB<FD_toc> > {
 public:
        ///
-       FormToc(LyXView *, Dialogs *);
-       ///
-       ~FormToc();
+       FormToc();
 private:
+       /// not needed
+       virtual void apply() {}
        /// Build the dialog
        virtual void build();
-       /// Not used but must be instantiated
-       virtual void input( long ) {}
        /// Update dialog before showing it
        virtual void update();
-       /// Apply from dialog (modify or create inset)
-       virtual void apply();
-       /// delete derived class variables from hide()
-       virtual void clearStore();
-       /// Pointer to the actual instantiation of the xform's form
-       virtual FL_FORM * const form() const;
+       /// Filter the inputs on callback from xforms
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
        ///
-       void updateToc();
+       void updateType();
        ///
-       FD_form_toc * build_toc();
+       void updateContents();
 
-       /// Real GUI implementation.
-       FD_form_toc * dialog_;
        ///
-       std::vector<Buffer::TocItem> toclist;
+       toc::Toc toc_;
 };
 
-#endif
+#endif // FORMTOC_H