]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
d35c256a15b75e4bdae3bf99e9147a41f808b306
[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 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \author Angus Leeming <a.leeming@ic.ac.uk>
12  */
13
14 #ifndef FORMCITATION_H
15 #define FORMCITATION_H
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "FormBase.h"
22
23 /** This class provides an XForms implementation of the Citation Dialog.
24  */
25 class ControlCitation;
26 struct FD_form_citation;
27
28 class FormCitation : public FormCB<ControlCitation, FormDB<FD_form_citation> > {
29 public:
30         ///
31         FormCitation(ControlCitation &);
32
33         // Functions accessible to the Controller.
34
35         /// Set the Params variable for the Controller.
36         virtual void apply();
37         /// Build the dialog.
38         virtual void build();
39         /// Hide the dialog.
40         virtual void hide();
41         /// Update dialog before/whilst showing it.
42         virtual void update();
43
44 private:
45         ///
46         enum State {
47                 ///
48                 ON,
49                 ///
50                 OFF
51         };
52
53         /// Filter the inputs on callback from xforms
54         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
55
56         /// Type definition from the fdesign produced header file.
57         FD_form_citation * build_citation();
58
59         ///
60         void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
61         ///
62         void setBibButtons(State) const;
63         ///
64         void setCiteButtons(State) const;
65         ///
66         void setSize(int, bool) const;
67
68         ///
69         std::vector<string> citekeys;
70         ///
71         std::vector<string> bibkeys;
72 };
73
74 #endif // FORMCITATION_H