// -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file xforms/FormRef.h
+ * Copyright 2000-2001 the LyX Team
+ * Read the file COPYING
*
- * LyX, The Document Processor
- *
- * Copyright 2000 The LyX Team.
- *
- * ======================================================
+ * \author Angus Leeming, a.leeming@ic.ac.uk
*/
#ifndef FORMREF_H
#pragma interface
#endif
-#include "FormInset.h"
+#include "FormBase.h"
+
+class ControlRef;
struct FD_form_ref;
/** This class provides an XForms implementation of the FormRef Dialog.
*/
-class FormRef : public FormCommand {
+class FormRef : public FormCB<ControlRef, FormDB<FD_form_ref> > {
public:
///
- FormRef(LyXView *, Dialogs *);
- ///
- ~FormRef();
-private:
- ///
- enum Type {
- ///
- REF,
- ///
- PAGEREF,
- ///
- VREF,
- ///
- VPAGEREF,
- ///
- PRETTYREF
- };
- ///
- enum Goto {
- ///
- GOREF,
- ///
- GOBACK,
- ///
- GOFIRST
- };
-
- /// Disconnect signals. Also perform any necessary housekeeping.
- virtual void disconnect();
+ FormRef(ControlRef &);
+private:
+ /// Set the Params variable for the Controller.
+ virtual void apply();
/// Build the dialog
virtual void build();
- /// Filter the input
- virtual bool input(FL_OBJECT *, long);
+ /// Filter the inputs on callback from xforms
+ virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
/// Update dialog before showing it
virtual void update();
- /// Not used but must be instantiated
- virtual void apply();
- /// Pointer to the actual instantiation of the xform's form
- virtual FL_FORM * form() const;
///
void updateBrowser(std::vector<string> const &) const;
- ///
+
+ /// Fdesign generated method
FD_form_ref * build_ref();
- ///
- Type getType() const;
- ///
- string const getName(Type type) const;
///
- Goto toggle;
- ///
- std::vector<string> refs;
-
- /// Real GUI implementation.
- FD_form_ref * dialog_;
+ bool at_ref_;
+ ///
+ std::vector<string> refs_;
};
-#endif
+#endif // FORMREF_H