2 /* This file is part of
3 * =================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich.
7 * Copyright 1995-2000 The LyX Team.
9 * =================================================
21 #include "ControlUrl.h"
22 #include "GnomeBase.h"
24 //#include <gnome--/dialog.h>
36 * This class implements the dialog to insert/modify urls.
38 class FormUrl : public FormCB<ControlUrl> {
41 FormUrl(ControlUrl & c);
54 /// Returns true if the dialog input is in a valid state.
55 bool validate() const;
57 /// Do the connection of signals
58 void connect_signals();
59 /// Disconnect the signals.
60 void disconnect_signals();
62 void OKClicked() { OKButton(); }
63 void CancelClicked() { CancelButton(); }
64 void ApplyClicked() { ApplyButton(); }
65 void RestoreClicked() { RestoreButton(); }
66 void InputChanged() { bc().valid(validate()); }
69 Gnome::Dialog * dialog();
71 Gtk::Entry * url() const;
73 Gtk::Entry * name() const;
74 /// The html type checkbutton
75 Gtk::CheckButton * html() const;
77 Gtk::Button * ok_btn() const;
79 Gtk::Button * cancel_btn() const;
81 Gtk::Button * apply_btn() const;
82 /// The restore button
83 Gtk::Button * restore_btn() const;
86 //boost::shared_ptr<Gnome::Dialog> dialog_;
87 Gnome::Dialog * dialog_;
89 /// Keeps the connection to the input validator.
90 SigC::Connection slot_url_;
91 SigC::Connection slot_name_;
92 SigC::Connection slot_html_;