]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCitation.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormCitation.h
index a8ac4cfb33b1c6ae2fb1110846ff914fb157d68c..7d58e12d726fc903119fade3302facb64a7f62b8 100644 (file)
@@ -1,87 +1,64 @@
 // -*- C++ -*-
-/* This file is part of
- * ====================================================== 
+/**
+ * \file 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
 #define FORMCITATION_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
-#include "FormInset.h"
-struct FD_form_citation;
+#include "FormDialogView.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 {
+class ControlCitation;
+struct FD_citation;
+
+class FormCitation : public FormController<ControlCitation, FormView<FD_citation> > {
 public:
        ///
-       FormCitation(LyXView *, Dialogs *);
-       ///
-       ~FormCitation();
+       FormCitation(Dialog &);
 private:
        ///
        enum State {
-               ///
-               DOWN,
-               ///
-               UP,
-               ///
-               DELETE,
-               ///
-               ADD,
-               ///
-               BIBBRSR,
-               ///
-               CITEBRSR,
                ///
                ON,
                ///
                OFF
        };
-       /// Connect signals etc. Set form's max size.
-       virtual void connect();
-       /// Disconnect signals. Also perform any necessary housekeeping.
-       virtual void disconnect();
 
-       /// Build the dialog
-       virtual void build();
-       /// Filter the inputs
-       virtual bool input( FL_OBJECT *, long );
-       /// Update dialog before showing it
-       virtual void update(bool switched = false);
-       /// Apply from dialog (modify or create inset)
+       /// Set the Params variable for the Controller.
        virtual void apply();
-       /// Pointer to the actual instantiation of the xform's form
-       virtual FL_FORM * form() const;
+       /// 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);
 
        ///
-       void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
-       ///
-       void setBibButtons( State ) const;
-       ///
-       void setCiteButtons( State ) const;
+       void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
        ///
-       void setSize( int, bool ) const;
+       void setBibButtons(State) const;
        ///
-       FD_form_citation * build_citation();
+       void setCiteButtons(State) const;
 
-       /// Real GUI implementation.
-       FD_form_citation * dialog_;
-       ///
+       /// used keys (left panel)
        std::vector<string> citekeys;
-       ///
+       /// available keys (right panel)
        std::vector<string> bibkeys;
-       ///
-       std::vector<string> bibkeysInfo;
 };
 
-#endif
+#endif // FORMCITATION_H