// -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file xforms/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
#pragma interface
#endif
-#include "FormCommand.h"
-struct FD_form_ref;
+#include "FormBase.h"
+
+class ControlRef;
+struct FD_ref;
/** This class provides an XForms implementation of the FormRef Dialog.
*/
-class FormRef : public FormCommand {
+class FormRef : public FormCB<ControlRef, FormDB<FD_ref> > {
public:
- /**@name Constructors and Destructors */
- //@{
- ///
- FormRef(LyXView *, Dialogs *);
///
- ~FormRef();
- //@}
-
+ FormRef();
private:
- ///
- enum Type{ REF=0, PAGEREF, VREF, VPAGEREF, PRETTYREF };
- ///
- enum Goto{ GOREF=0, GOBACK, GOFIRST };
-
+ /// Set the Params variable for the Controller.
+ virtual void apply();
/// Build the dialog
virtual void build();
- /// Filter the input
- virtual void input( 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();
- /// 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;
///
- void updateBrowser( std::vector<string> ) const;
+ void updateBrowser(std::vector<string> const &) 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;
-
- /// Real GUI implementation.
- FD_form_ref * dialog_;
+ void switch_go_button();
///
- Goto toggle;
- ///
- std::vector<string> refs;
+ bool at_ref_;
+ ///
+ std::vector<string> refs_;
};
-#endif
+#endif // FORMREF_H