]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
Implemented controller-view split for FormError and FormInclude.
[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 private:
34         ///
35         enum State {
36                 ///
37                 ON,
38                 ///
39                 OFF
40         };
41
42         /// Set the Params variable for the Controller.
43         virtual void apply();
44         /// Build the dialog.
45         virtual void build();
46         /// Hide the dialog.
47         virtual void hide();
48         /// Update dialog before/whilst showing it.
49         virtual void update();
50         /// Filter the inputs on callback from xforms
51         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
52
53         /// Type definition from the fdesign produced header file.
54         FD_form_citation * build_citation();
55
56         ///
57         void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
58         ///
59         void setBibButtons(State) const;
60         ///
61         void setCiteButtons(State) const;
62         ///
63         void setSize(int, bool) const;
64
65         ///
66         std::vector<string> citekeys;
67         ///
68         std::vector<string> bibkeys;
69 };
70
71 #endif // FORMCITATION_H