]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
create and use a little setEnabled() xforms wrapper function.
[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
12 #ifndef FORMCITATION_H
13 #define FORMCITATION_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "FormInset.h"
20 struct FD_form_citation;
21
22 /** This class provides an XForms implementation of the FormCitation Dialog.
23  */
24 class FormCitation : public FormCommand {
25 public:
26         ///
27         FormCitation(LyXView *, Dialogs *);
28         ///
29         ~FormCitation();
30 private:
31         ///
32         enum State {
33                 ON,
34                 ///
35                 OFF
36         };
37         /// Connect signals etc. Set form's max size.
38         virtual void connect();
39         /// Disconnect signals. Also perform any necessary housekeeping.
40         virtual void disconnect();
41
42         /// Build the dialog
43         virtual void build();
44         /// Filter the inputs
45         virtual bool input(FL_OBJECT *, long);
46         /// Update dialog before showing it
47         virtual void update();
48         /// Apply from dialog (modify or create inset)
49         virtual void apply();
50         /// Pointer to the actual instantiation of the xforms form
51         virtual FL_FORM * form() const;
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         void setSize(int, bool) const;
61         /// Type definition from the fdesign produced header file.
62         FD_form_citation * build_citation();
63
64         /// Real GUI implementation.
65         FD_form_citation * dialog_;
66         ///
67         std::vector<string> citekeys;
68         ///
69         std::vector<string> bibkeys;
70         ///
71         std::vector<string> bibkeysInfo;
72 };
73
74 #endif