]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormCitation.h
1 // -*- C++ -*-
2 /**
3  * \file 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 #include "FormDialogView.h"
16 #include "biblio.h"
17
18 namespace lyx {
19 namespace frontend {
20
21 class ControlCitation;
22 struct FD_citation;
23
24 /** This class provides an XForms implementation of the Citation Dialog.
25  */
26 class FormCitation
27         : public FormController<ControlCitation, FormView<FD_citation> > {
28 public:
29         ///
30         FormCitation(Dialog &);
31 private:
32         ///
33         enum State {
34                 ///
35                 ON,
36                 ///
37                 OFF
38         };
39
40         /// Set the Params variable for the Controller.
41         virtual void apply();
42         /// Build the dialog.
43         virtual void build();
44         /// Hide the dialog.
45         virtual void hide();
46         /// Update dialog before/whilst showing it.
47         virtual void update();
48         /// Filter the inputs on callback from xforms
49         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
50
51         /// search for a citation
52         void findBiblio(biblio::Direction const dir);
53
54         ///
55         void updateBrowser(FL_OBJECT *, std::vector<std::string> const &) const;
56         ///
57         void setBibButtons(State) const;
58         ///
59         void setCiteButtons(State) const;
60
61         /// used keys (left panel)
62         std::vector<std::string> citekeys;
63         /// available keys (right panel)
64         std::vector<std::string> bibkeys;
65 };
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #endif // FORMCITATION_H