// -*- 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
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "FormCommand.h"
-struct FD_form_toc;
+#include "FormDialogView.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 FormController<ControlToc, FormView<FD_toc> > {
public:
- /**@name Constructors and Destructors */
- //@{
- ///
- FormToc(LyXView *, Dialogs *);
///
- ~FormToc();
-
+ FormToc(Dialog &);
private:
- /**@name Slot Methods */
- //@{
- ///
- virtual void update();
- /// Apply from dialog
- virtual void apply();
- ///
- virtual void input( long ) {};
+ /// not needed
+ virtual void apply() {}
/// Build the dialog
virtual void build();
+ /// Update dialog before showing it
+ virtual void update();
+ /// Filter the inputs on callback from xforms
+ virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
///
- virtual FL_FORM * const form() const;
- ///
- void updateToc();
+ void updateType();
///
- FD_form_toc * build_toc();
- //@}
+ void updateContents();
- /// Real GUI implementation.
- FD_form_toc * dialog_;
+ ///
+ lyx::toc::Toc toc_;
};
-#endif
+#endif // FORMTOC_H