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