]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
Yet more dialog tweaking from Rob.
[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 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "FormBase.h"
20 #include "biblio.h"
21
22 /** This class provides an XForms implementation of the Citation Dialog.
23  */
24 class ControlCitation;
25 struct FD_citation;
26
27 class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
28 public:
29         ///
30         FormCitation();
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<string> const &) const;
56         ///
57         void setBibButtons(State) const;
58         ///
59         void setCiteButtons(State) const;
60
61         ///
62         std::vector<string> citekeys;
63         ///
64         std::vector<string> bibkeys;
65 };
66
67 #endif // FORMCITATION_H