]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCitation.h
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormCitation.h
index a056b449c33ba856163ec96c4bb607ed18b9c3c5..cef3dc4edb3642dd05b5ea7b8bca26e7569d4305 100644 (file)
@@ -4,9 +4,12 @@
  *
  *           LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *           Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
+ *
+ * \file FormCitation.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
  */
 
 #ifndef FORMCITATION_H
 #pragma interface
 #endif
 
-#include "FormInset.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 {
+class ControlCitation;
+struct FD_form_citation;
+
+class FormCitation : public FormCB<ControlCitation, FormDB<FD_form_citation> > {
 public:
        ///
-       FormCitation(LyXView *, Dialogs *);
-       ///
-       ~FormCitation();
+       FormCitation(ControlCitation &);
+
 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
+       /// Set the Params variable for the Controller.
+       virtual void apply();
+       /// Build the dialog.
        virtual void build();
-       /// Filter the inputs
-       virtual bool input( FL_OBJECT *, long );
-       /// Update dialog before showing it
+       /// Hide the dialog.
+       virtual void hide();
+       /// Update dialog before/whilst showing it.
        virtual void update();
-       /// Apply from dialog (modify or create inset)
-       virtual void apply();
-       /// Pointer to the actual instantiation of the xform's form
-       virtual FL_FORM * form() const;
+       /// Filter the inputs on callback from xforms
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+       /// Fdesign generated method
+       FD_form_citation * build_citation();
+
+       /// search for a citation
+       void findBiblio(biblio::Direction const dir);
 
        ///
-       void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
-       ///
-       void setBibButtons( State ) const;
+       void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
        ///
-       void setCiteButtons( State ) const;
+       void setBibButtons(State) const;
        ///
-       void setSize( int, bool ) const;
-       /// Type definition from the fdesign produced header file.
-       FD_form_citation * build_citation();
+       void setCiteButtons(State) const;
 
-       /// Real GUI implementation.
-       FD_form_citation * dialog_;
        ///
        std::vector<string> citekeys;
        ///
        std::vector<string> bibkeys;
-       ///
-       std::vector<string> bibkeysInfo;
 };
 
-#endif
+#endif // FORMCITATION_H