]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/FormUrl.h
Angus's FormInset work; Dekel's languages patch; my reworking of Angus's stuff +...
[lyx.git] / src / frontends / kde / FormUrl.h
1 /* FormUrl.h
2  * (C) 2000 LyX Team
3  * John Levon, moz@compsoc.man.ac.uk
4  */
5
6 /***************************************************************************
7  *                                                                         *
8  *   This program is free software; you can redistribute it and/or modify  *
9  *   it under the terms of the GNU General Public License as published by  *
10  *   the Free Software Foundation; either version 2 of the License, or     *
11  *   (at your option) any later version.                                   *
12  *                                                                         *
13  ***************************************************************************/
14
15 #ifndef FORMURL_H
16 #define FORMURL_H
17
18 #include "DialogBase.h"
19 #include "LString.h"
20 #include "boost/utility.hpp"
21 #include "insets/inseturl.h"
22
23 class Dialogs;
24 class LyXView;
25 class FormUrlDialog;
26
27 class FormUrl : public DialogBase, public noncopyable {
28 public: 
29         /**@name Constructors and Destructors */
30         //@{
31         ///
32         FormUrl(LyXView *, Dialogs *);
33         /// 
34         ~FormUrl();
35         //@}
36
37         /// Apply changes
38         void apply();
39         /// close the connections
40         void close();
41  
42 private: 
43         /// Create the dialog if necessary, update it and display it.
44         void show();
45         /// Hide the dialog.
46         void hide();
47         /// Update the dialog.
48         void update(bool switched = false);
49
50         /// create a URL inset
51         void createUrl(string const &);
52         /// edit a URL inset
53         void showUrl(InsetCommand * const);
54  
55         /// Real GUI implementation.
56         FormUrlDialog * dialog_;
57
58         /// the LyXView we belong to
59         LyXView * lv_;
60  
61         /** Which Dialogs do we belong to?
62             Used so we can get at the signals we have to connect to.
63         */
64         Dialogs * d_;
65         /// pointer to the inset if any
66         InsetCommand * inset_;
67         /// insets params
68         InsetCommandParams params;
69         /// is the inset we are reading from a readonly buffer
70         bool readonly;
71         
72         /// Hide connection.
73         Connection h_;
74         /// Update connection.
75         Connection u_;
76         /// Inset hide connection.
77         Connection ih_;
78 };
79
80 #endif