]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCitation.h
The forms resize patch, and small updates
[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         /// Connect signals etc. Set form's max size.
51         virtual void connect();
52         /// Disconnect signals. Also perform any necessary housekeeping.
53         virtual void disconnect();
54
55         /// Build the dialog
56         virtual void build();
57         /// Filter the inputs
58         virtual bool input( FL_OBJECT *, long );
59         /// Update dialog before showing it
60         virtual void update(bool switched = false);
61         /// Apply from dialog (modify or create inset)
62         virtual void apply();
63         /// Pointer to the actual instantiation of the xform's form
64         virtual FL_FORM * form() const;
65
66         ///
67         void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
68         ///
69         void setBibButtons( State ) const;
70         ///
71         void setCiteButtons( State ) const;
72         ///
73         void setSize( int, bool ) const;
74         ///
75         FD_form_citation * build_citation();
76
77         /// Real GUI implementation.
78         FD_form_citation * dialog_;
79         ///
80         std::vector<string> citekeys;
81         ///
82         std::vector<string> bibkeys;
83         ///
84         std::vector<string> bibkeysInfo;
85 };
86
87 #endif