// -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file xforms/FormCitation.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 FORMCITATION_H
#pragma interface
#endif
-#include "FormCommand.h"
-struct FD_form_citation;
+#include "FormBase.h"
+#include "biblio.h"
-/** This class provides an XForms implementation of the FormCitation Dialog.
+/** This class provides an XForms implementation of the Citation Dialog.
*/
-class FormCitation : public FormCommand, public noncopyable {
+class ControlCitation;
+struct FD_citation;
+
+class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
public:
+ ///
+ FormCitation();
+private:
///
enum State {
- DOWN,
- UP,
- DELETE,
- ADD,
- BIBBRSR,
- CITEBRSR,
+ ///
ON,
+ ///
OFF
};
- /**@name Constructors and Destructors */
- //@{
- /// #FormCitation x(LyXFunc ..., Dialogs ...);#
- FormCitation(LyXView *, Dialogs *);
- ///
- ~FormCitation();
- //@}
-private:
- /**@name Slot Methods */
- //@{
- virtual void update();
- /// Apply from dialog
+ /// Set the Params variable for the Controller.
virtual void apply();
- /// Filter the inputs
- virtual void input( long );
- /// Build the dialog
+ /// Build the dialog.
virtual void build();
+ /// Hide the dialog.
+ virtual void hide();
+ /// Update dialog before/whilst showing it.
+ virtual void update();
+ /// Filter the inputs on callback from xforms
+ virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+ /// search for a citation
+ void findBiblio(biblio::Direction const dir);
+
///
- virtual FL_FORM * const form() const;
- ///
- void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
+ void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
///
- void setBibButtons( State ) const;
+ void setBibButtons(State) const;
///
- void setCiteButtons( State ) const;
+ void setCiteButtons(State) const;
+
///
- void setSize( int, bool ) const;
+ std::vector<string> citekeys;
///
- FD_form_citation * build_citation();
- //@}
-
- /// Real GUI implementation.
- FD_form_citation * dialog_;
+ std::vector<string> bibkeys;
};
-#endif
+#endif // FORMCITATION_H