]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
09ca816b041407b8513d5729e19ad9f18ec60ee1
[lyx.git] / src / frontends / xforms / FormCitation.h
1 // -*- C++ -*-
2 /**
3  * \file xforms/FormCitation.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef FORMCITATION_H
13 #define FORMCITATION_H
14
15
16 #include "FormDialogView.h"
17 #include "biblio.h"
18
19 /** This class provides an XForms implementation of the Citation Dialog.
20  */
21 class ControlCitation;
22 struct FD_citation;
23
24 class FormCitation : public FormController<ControlCitation, FormView<FD_citation> > {
25 public:
26         ///
27         FormCitation(Dialog &);
28 private:
29         ///
30         enum State {
31                 ///
32                 ON,
33                 ///
34                 OFF
35         };
36
37         /// Set the Params variable for the Controller.
38         virtual void apply();
39         /// Build the dialog.
40         virtual void build();
41         /// Hide the dialog.
42         virtual void hide();
43         /// Update dialog before/whilst showing it.
44         virtual void update();
45         /// Filter the inputs on callback from xforms
46         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
47
48         /// search for a citation
49         void findBiblio(biblio::Direction const dir);
50
51         ///
52         void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
53         ///
54         void setBibButtons(State) const;
55         ///
56         void setCiteButtons(State) const;
57
58         /// used keys (left panel)
59         std::vector<string> citekeys;
60         /// available keys (right panel)
61         std::vector<string> bibkeys;
62 };
63
64 #endif // FORMCITATION_H