]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormUrl.h
patch from Angus and patch from Kayvan
[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 "DialogBase.h"
16 #include "LString.h"
17
18 class Dialogs;
19 class LyXView;
20 class InsetCommandParams;
21 class InsetUrl;
22 struct FD_form_url;
23
24 /** This class provides an XForms implementation of the FormUrl Dialog.
25  */
26 class FormUrl : public DialogBase {
27 public:
28         /**@name Constructors and Destructors */
29         //@{
30         ///
31         FormUrl(LyXView *, Dialogs *);
32         ///
33         ~FormUrl();
34         //@}
35
36         /**@name Real per-instance Callback Methods */
37         //@{
38         static  int WMHideCB(FL_FORM *, void *);
39         static void OKCB(FL_OBJECT *, long);
40         static void CancelCB(FL_OBJECT *, long);
41         //@}
42
43 private:
44         FormUrl() {}
45         FormUrl(FormUrl &) : DialogBase() {}
46         
47         /**@name Slot Methods */
48         //@{
49         /// Create the dialog if necessary, update it and display it.
50         void createInset( string const & );
51         /// 
52         void showInset( InsetUrl * );
53         /// 
54         void show();
55         /// Hide the dialog.
56         void hide();
57         ///
58         void update();
59         //@}
60
61         /**@name Dialog internal methods */
62         //@{
63         /// Apply from dialog
64         void apply();
65         /// Build the dialog
66         void build();
67         ///
68         FD_form_url * build_url();
69         /// Explicitly free the dialog.
70         void free();
71         //@}
72
73         /**@name Private Data */
74         //@{
75         /// Real GUI implementation.
76         FD_form_url * dialog_;
77         /** Which LyXFunc do we use?
78             We could modify Dialogs to have a visible LyXFunc* instead and
79             save a couple of bytes per dialog.
80         */
81         LyXView * lv_;
82         /** Which Dialogs do we belong to?
83             Used so we can get at the signals we have to connect to.
84         */
85         Dialogs * d_;
86         /// Update connection.
87         Connection u_;
88         /// Hide connection.
89         Connection h_;
90         /// inset::hide connection.
91         Connection ih_;
92         ///
93         InsetUrl * inset_;
94         ///
95         bool dialogIsOpen;
96         ///
97         InsetCommandParams * params;
98         //@}
99 };
100
101 #endif