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