]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
major GUII cleanup + Baruchs patch + Angus's patch + removed a couple of generated...
[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 "FormCommand.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         /**@name Constructors and Destructors */
27         //@{
28         ///
29         FormCitation(LyXView *, Dialogs *);
30         ///
31         ~FormCitation();
32         //@}
33
34 private:
35         ///
36         enum State {
37                 DOWN,
38                 UP,
39                 DELETE,
40                 ADD,
41                 BIBBRSR,
42                 CITEBRSR,
43                 ON,
44                 OFF
45         };
46         /// Build the dialog
47         virtual void build();
48         /// Filter the inputs
49         virtual void input( long );
50         /// Update dialog before showing it
51         virtual void update();
52         /// Apply from dialog (modify or create inset)
53         virtual void apply();
54         /// delete derived class variables from hide()
55         virtual void clearStore();
56         /// Pointer to the actual instantiation of the xform's form
57         virtual FL_FORM * const form() const;
58
59         ///
60         void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
61         ///
62         void setBibButtons( State ) const;
63         ///
64         void setCiteButtons( State ) const;
65         ///
66         void setSize( int, bool ) const;
67         ///
68         FD_form_citation * build_citation();
69
70         /// Real GUI implementation.
71         FD_form_citation * dialog_;
72         ///
73         std::vector<string> citekeys;
74         ///
75         std::vector<string> bibkeys;
76         ///
77         std::vector<string> bibkeysInfo;
78 };
79
80 #endif