]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
ca49a7973a273ac7cb3ca1d3cc0fe9ef9fccb620
[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                 ///
34                 DOWN,
35                 ///
36                 UP,
37                 ///
38                 DELETE,
39                 ///
40                 ADD,
41                 ///
42                 BIBBRSR,
43                 ///
44                 CITEBRSR,
45                 ///
46                 ON,
47                 ///
48                 OFF
49         };
50         /// Disconnect signals. Also perform any necessary housekeeping.
51         virtual void disconnect();
52
53         /// Build the dialog
54         virtual void build();
55         /// Filter the inputs
56         virtual bool input( FL_OBJECT *, long );
57         /// Update dialog before showing it
58         virtual void update(bool switched = false);
59         /// Apply from dialog (modify or create inset)
60         virtual void apply();
61         /// Pointer to the actual instantiation of the xform's form
62         virtual FL_FORM * form() const;
63
64         ///
65         void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
66         ///
67         void setBibButtons( State ) const;
68         ///
69         void setCiteButtons( State ) const;
70         ///
71         void setSize( int, bool ) const;
72         ///
73         FD_form_citation * build_citation();
74
75         /// Real GUI implementation.
76         FD_form_citation * dialog_;
77         ///
78         std::vector<string> citekeys;
79         ///
80         std::vector<string> bibkeys;
81         ///
82         std::vector<string> bibkeysInfo;
83 };
84
85 #endif