]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormBibtex.h
Merging BRANCH_MVC back into HEAD.
[lyx.git] / src / frontends / xforms / FormBibtex.h
1 // -*- C++ -*-
2 /**
3  * \file FormBibtex.h
4  * Copyright 2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Angus Leeming
8  * \author John Levon
9  */
10
11 #ifndef FORMBIBTEX_H
12 #define FORMBIBTEX_H
13
14 #include <boost/smart_ptr.hpp>
15
16 #include "FormInset.h"
17 #include "xformsBC.h"
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 struct FD_form_bibtex;
24
25 /**
26  * For bibtex database setting
27  */
28 class FormBibtex : public FormCommand {
29 public:
30         ///
31         FormBibtex(LyXView *, Dialogs *);
32 private:
33         /// Pointer to the actual instantiation of the ButtonController.
34         virtual xformsBC & bc();
35         /// Connect signals etc. Set form's max size.
36         virtual void connect();
37         /// Build the dialog
38         virtual void build();
39         /// Update dialog before showing it
40         virtual void update();
41         /// input handler
42         virtual bool input(FL_OBJECT *, long);
43         /// Apply from dialog (modify or create inset)
44         virtual void apply();
45         /// Pointer to the actual instantiation of the xforms form
46         virtual FL_FORM * form() const;
47         ///
48         FD_form_bibtex * build_bibtex();
49         /// Real GUI implementation.
50         boost::scoped_ptr<FD_form_bibtex> dialog_;
51         /// The ButtonController
52         ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
53 };
54
55
56 inline
57 xformsBC & FormBibtex::bc()
58 {
59   return bc_;
60 }
61 #endif // FORMBIBTEX_H