]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormCitation.h
xforms clean-up, described in detail in my mail of 31 May. See
[features.git] / src / frontends / xforms / FormCitation.h
1 // -*- C++ -*-
2 /**
3  * \file xforms/FormCitation.h
4  * Copyright 2000-2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Angus Leeming, a.leeming@ic.ac.uk
8  */
9
10 #ifndef FORMCITATION_H
11 #define FORMCITATION_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "FormBase.h"
18 #include "biblio.h"
19
20 /** This class provides an XForms implementation of the Citation Dialog.
21  */
22 class ControlCitation;
23 struct FD_citation;
24
25 class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
26 public:
27         ///
28         FormCitation(ControlCitation &);
29
30 private:
31         ///
32         enum State {
33                 ///
34                 ON,
35                 ///
36                 OFF
37         };
38
39         /// Set the Params variable for the Controller.
40         virtual void apply();
41         /// Build the dialog.
42         virtual void build();
43         /// Hide the dialog.
44         virtual void hide();
45         /// Update dialog before/whilst showing it.
46         virtual void update();
47         /// Filter the inputs on callback from xforms
48         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
49
50         /// search for a citation
51         void findBiblio(biblio::Direction const dir);
52
53         ///
54         void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
55         ///
56         void setBibButtons(State) const;
57         ///
58         void setCiteButtons(State) const;
59
60         ///
61         std::vector<string> citekeys;
62         ///
63         std::vector<string> bibkeys;
64 };
65
66 #endif // FORMCITATION_H