]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormCitation.h
cf542c1703feef7fe2fae34080fac9c9b9ea1f3f
[features.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         ///
27         enum State {
28                 DOWN,
29                 UP,
30                 DELETE,
31                 ADD,
32                 BIBBRSR,
33                 CITEBRSR,
34                 ON,
35                 OFF
36         };
37         /**@name Constructors and Destructors */
38         //@{
39         /// #FormCitation x(LyXFunc ..., Dialogs ...);#
40         FormCitation(LyXView *, Dialogs *);
41         ///
42         ~FormCitation();
43         //@}
44
45 private:
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
74 #endif