]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
Disable various buttons when buffer is read only
[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
24 /** This class provides an XForms implementation of the Citation Dialog.
25  */
26 class ControlCitation;
27 struct FD_form_citation;
28
29 class FormCitation : public FormCB<ControlCitation, FormDB<FD_form_citation> > {
30 public:
31         ///
32         FormCitation(ControlCitation &);
33
34 private:
35         ///
36         enum State {
37                 ///
38                 ON,
39                 ///
40                 OFF
41         };
42
43         /// Set the Params variable for the Controller.
44         virtual void apply();
45         /// Build the dialog.
46         virtual void build();
47         /// Hide the dialog.
48         virtual void hide();
49         /// Update dialog before/whilst showing it.
50         virtual void update();
51         /// Filter the inputs on callback from xforms
52         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
53
54         /// Fdesign generated method
55         FD_form_citation * build_citation();
56
57         ///
58         void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
59         ///
60         void setBibButtons(State) const;
61         ///
62         void setCiteButtons(State) const;
63
64         ///
65         std::vector<string> citekeys;
66         ///
67         std::vector<string> bibkeys;
68 };
69
70 #endif // FORMCITATION_H