// -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file FormRef.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 FORMREF_H
#define FORMREF_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "FormInset.h"
-struct FD_form_ref;
+#include "FormDialogView.h"
+
+class ControlRef;
+struct FD_ref;
/** This class provides an XForms implementation of the FormRef Dialog.
*/
-class FormRef : public FormCommand {
+class FormRef : public FormController<ControlRef, FormView<FD_ref> > {
public:
///
- FormRef(LyXView *, Dialogs *);
- ///
- ~FormRef();
+ FormRef(Dialog &);
private:
- ///
- enum Type{
- ///
- REF,
- ///
- PAGEREF,
- ///
- VREF,
- ///
- VPAGEREF,
- ///
- PRETTYREF
- };
- ///
- enum Goto{
- ///
- GOREF,
- ///
- GOBACK,
- ///
- GOFIRST
- };
-
- /// Connect signals etc. Set form's max size.
- virtual void connect();
- /// Disconnect signals. Also perform any necessary housekeeping.
- virtual void disconnect();
-
+ /// 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(bool switched = false);
- /// Not used but must be instantiated
- virtual void apply();
- /// Pointer to the actual instantiation of the xform's form
- virtual FL_FORM * form() const;
+ virtual void update();
///
- void updateBrowser( std::vector<string> ) const;
- ///
- void showBrowser() const;
- ///
- void hideBrowser() const;
- ///
- void setSize( int, int, int ) const;
- ///
- FD_form_ref * build_ref();
- ///
- Type getType() const;
- ///
- string getName( Type type ) const;
+ void updateBrowser(std::vector<std::string> const &) const;
///
- Goto toggle;
- ///
- std::vector<string> refs;
+ void switch_go_button();
- /// Real GUI implementation.
- FD_form_ref * dialog_;
+ ///
+ bool at_ref_;
+ ///
+ std::vector<std::string> refs_;
};
-#endif
+#endif // FORMREF_H