]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
2d40374d2fa1f4f94aa7f3a411a325f2c611b049
[lyx.git] / src / frontends / xforms / FormCitation.h
1 // -*- C++ -*-
2 /**
3  * \file FormCitation.h
4  * Copyright 2000-2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Angus Leeming, a.leeming@ic.ac.uk
8  */
9
10 #ifndef FORMCITATION_H
11 #define FORMCITATION_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "FormBase.h"
18 #include "biblio.h"
19
20 /** This class provides an XForms implementation of the Citation Dialog.
21  */
22 class ControlCitation;
23 struct FD_form_citation;
24
25 class FormCitation : public FormCB<ControlCitation, FormDB<FD_form_citation> > {
26 public:
27         ///
28         FormCitation(ControlCitation &);
29
30 private:
31         ///
32         enum State {
33                 ///
34                 ON,
35                 ///
36                 OFF
37         };
38
39         /// Set the Params variable for the Controller.
40         virtual void apply();
41         /// Build the dialog.
42         virtual void build();
43         /// Hide the dialog.
44         virtual void hide();
45         /// Update dialog before/whilst showing it.
46         virtual void update();
47         /// Filter the inputs on callback from xforms
48         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
49
50         /// Fdesign generated method
51         FD_form_citation * build_citation();
52
53         /// search for a citation
54         void findBiblio(biblio::Direction const dir);
55
56         ///
57         void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
58         ///
59         void setBibButtons(State) const;
60         ///
61         void setCiteButtons(State) const;
62
63         ///
64         std::vector<string> citekeys;
65         ///
66         std::vector<string> bibkeys;
67 };
68
69 #endif // FORMCITATION_H