]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
Introduce LFUN_PRINT.
[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
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
25         : public FormController<ControlCitation, FormView<FD_citation> > {
26 public:
27         ///
28         FormCitation(Dialog &);
29 private:
30         ///
31         enum State {
32                 ///
33                 ON,
34                 ///
35                 OFF
36         };
37
38         /// Set the Params variable for the Controller.
39         virtual void apply();
40         /// Build the dialog.
41         virtual void build();
42         /// Hide the dialog.
43         virtual void hide();
44         /// Update dialog before/whilst showing it.
45         virtual void update();
46         /// Filter the inputs on callback from xforms
47         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
48
49         /// search for a citation
50         void findBiblio(biblio::Direction const dir);
51
52         ///
53         void updateBrowser(FL_OBJECT *, std::vector<std::string> const &) const;
54         ///
55         void setBibButtons(State) const;
56         ///
57         void setCiteButtons(State) const;
58
59         /// used keys (left panel)
60         std::vector<std::string> citekeys;
61         /// available keys (right panel)
62         std::vector<std::string> bibkeys;
63 };
64
65 #endif // FORMCITATION_H