]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/GUrl.h
Change existing ERT dialog to follow GNOME guidelines, implement About and Float...
[lyx.git] / src / frontends / gnome / GUrl.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  * \author Michael Koziarski
13  * */
14
15 #ifndef GURL_H
16 #define GURL_H
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 #include "ControlUrl.h"
23 #include "GnomeBase.h"
24
25 namespace Gtk {
26 class Button;
27 class CheckButton;
28 class Entry;
29 }
30
31 /**
32  * This class implements the dialog to insert/modify urls.
33  */
34 class GUrl : public FormCB<ControlUrl> {
35 public:
36         ///
37         GUrl(ControlUrl & c);
38         ///
39         ~GUrl();
40
41         void apply();
42         void update();
43         
44 private:
45         /// Build the dialog
46         void build();
47
48         /// Returns true if the dialog input is in a valid state.
49         bool validate() const;
50
51         /// Do the connection of signals
52         void connect_signals();
53         /// Disconnect the signals.
54         void disconnect_signals();
55
56         /// generated by accessors.py
57         Gtk::Button * restore_btn() const;
58         /// gene rated by accessors.py
59         Gtk::Button * ok_btn() const;
60         /// generated by accessors.py
61         Gtk::Button * apply_btn() const;
62         /// generated by accessors.py
63         Gtk::Button * cancel_btn() const;
64         /// generated by accessors.py
65         Gtk::Entry * url() const;
66         /// generated by accessors.py
67         Gtk::Entry * name() const;
68         /// generated by accessors.py
69         Gtk::CheckButton * html_cb() const;
70         
71         /// Keeps the connection to the input validator.
72         SigC::Connection slot_url_;
73         SigC::Connection slot_name_;
74         SigC::Connection slot_html_;
75 };
76
77 #endif