]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormUrl.h
Implemented controller-view split for FormBibtex.
[lyx.git] / src / frontends / xforms / FormUrl.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 FORMURL_H
13 #define FORMURL_H
14
15 #include <boost/smart_ptr.hpp>
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "FormInset.h"
22
23 struct FD_form_url;
24
25 /** This class provides an XForms implementation of the FormUrl Dialog.
26  */
27 class FormUrl : public FormCommand {
28 public:
29         ///
30         FormUrl(LyXView *, Dialogs *);
31 private:
32         /// Pointer to the actual instantiation of the ButtonController.
33         virtual xformsBC & bc();
34         /// Connect signals etc. Set form's max size.
35         virtual void connect();
36         /// Build the dialog
37         virtual void build();
38         /// Update dialog before showing it
39         virtual void update();
40         /// Apply from dialog (modify or create inset)
41         virtual void apply();
42         /// Pointer to the actual instantiation of the xforms form
43         virtual FL_FORM * form() const;
44         ///
45         FD_form_url * build_url();
46         /// Real GUI implementation.
47         boost::scoped_ptr<FD_form_url> dialog_;
48         /// The ButtonController
49         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
50 };
51
52
53 inline
54 xformsBC & FormUrl::bc()
55 {
56         return bc_;
57 }
58 #endif