]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormUrl.h
fix problem with nroff detection, remove dead code with old floats, bogus message...
[lyx.git] / src / frontends / gnome / FormUrl.h
1 // -*- C++ -*-
2 /* This file is part of
3  * =================================================
4  * 
5  *          LyX, The Document Processor
6  *          Copyright 1995 Matthias Ettrich.
7  *          Copyright 1995-2000 The LyX Team.
8  *
9  * ================================================= 
10  *
11  * \author Baruch Even
12  * */
13
14 #ifndef FORMURL_H
15 #define FORMURL_H
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "ControlUrl.h"
22 #include "GnomeBase.h"
23
24 namespace Gtk {
25 class Button;
26 class CheckButton;
27 class Entry;
28 }
29
30 /**
31  * This class implements the dialog to insert/modify urls.
32  */
33 class FormUrl : public FormCB<ControlUrl> {
34 public:
35         ///
36         FormUrl(ControlUrl & c);
37         ///
38         ~FormUrl();
39
40         void apply();
41         void update();
42         
43 private:
44         /// Build the dialog
45         void build();
46
47         /// Returns true if the dialog input is in a valid state.
48         bool validate() const;
49
50         /// Do the connection of signals
51         void connect_signals();
52         /// Disconnect the signals.
53         void disconnect_signals();
54
55         void OKClicked() { OKButton(); }
56         void CancelClicked() { CancelButton(); }
57         void ApplyClicked() { ApplyButton(); }
58         void RestoreClicked() { RestoreButton(); }
59         void InputChanged() { bc().valid(validate()); }
60         
61         /// The url entry
62         Gtk::Entry * url() const;
63         /// The name entry
64         Gtk::Entry * name() const;
65         /// The html type checkbutton
66         Gtk::CheckButton * html() const;
67         /// The ok button
68         Gtk::Button * ok_btn() const;
69         /// The cancel button
70         Gtk::Button * cancel_btn() const;
71         /// The apply button
72         Gtk::Button * apply_btn() const;
73         /// The restore button
74         Gtk::Button * restore_btn() const;
75
76         /// Keeps the connection to the input validator.
77         SigC::Connection slot_url_;
78         SigC::Connection slot_name_;
79         SigC::Connection slot_html_;
80 };
81
82 #endif