]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/GUrl.h
A lean, clean and working start to the new, improved gnome frontend.
[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  * */
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         /// generated by accessors.py
56         Gtk::Button * restore_btn() const;
57         /// gene rated by accessors.py
58         Gtk::Button * ok_btn() const;
59         /// generated by accessors.py
60         Gtk::Button * apply_btn() const;
61         /// generated by accessors.py
62         Gtk::Button * cancel_btn() const;
63         /// generated by accessors.py
64         Gtk::Entry * url() const;
65         /// generated by accessors.py
66         Gtk::Entry * name() const;
67         /// generated by accessors.py
68         Gtk::CheckButton * html_cb() const;
69         
70         /// Keeps the connection to the input validator.
71         SigC::Connection slot_url_;
72         SigC::Connection slot_name_;
73         SigC::Connection slot_html_;
74 };
75
76 #endif