]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormUrl.h
Merging BRANCH_MVC back into HEAD.
[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 #include "xformsBC.h"
23
24 struct FD_form_url;
25
26 /** This class provides an XForms implementation of the FormUrl Dialog.
27  */
28 class FormUrl : public FormCommand {
29 public:
30         ///
31         FormUrl(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         /// Apply from dialog (modify or create inset)
42         virtual void apply();
43         /// Pointer to the actual instantiation of the xforms form
44         virtual FL_FORM * form() const;
45         ///
46         FD_form_url * build_url();
47         /// Real GUI implementation.
48         boost::scoped_ptr<FD_form_url> dialog_;
49         /// The ButtonController
50         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
51 };
52
53
54 inline
55 xformsBC & FormUrl::bc()
56 {
57         return bc_;
58 }
59 #endif