]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormUrl.h
Mathed fix from Dekel, GNOME patch from Marko, language-code from Garst
[lyx.git] / src / frontends / gnome / FormUrl.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef FORMURL_H
13 #define FORMURL_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "DialogBase.h"
20 #include "LString.h"
21 #include "support/utility.hpp"
22 #include "insets/insetcommand.h"
23
24 #include <gtk--/container.h>
25 #include <gtk--/checkbutton.h>
26 #include <gnome--/entry.h>
27 #include <gtk--/button.h>
28
29 /** This class provides an Gnome implementation of the FormUrl Dialog.
30  */
31 class FormUrl : public DialogBase, public noncopyable {
32 public:
33   /**@name Constructors and Destructors */
34   //@{
35   ///
36   FormUrl(LyXView *, Dialogs *);
37   ///
38   ~FormUrl();
39   //@}
40   
41 private:
42   /// Slot launching dialog to (possibly) create a new inset
43   void createInset( string const & );
44   /// Slot launching dialog to an existing inset
45   void showInset( InsetCommand * const );
46   
47   /// Update dialog before showing it
48   virtual void update();
49   /// Apply from dialog (modify or create inset)
50   virtual void apply();
51   /// Explicitly free the dialog.
52   void free();
53   /// Create the dialog if necessary, update it and display it.
54   void show();
55   /// Hide the dialog.
56   void hide();
57   
58   /** Which LyXFunc do we use?
59       We could modify Dialogs to have a visible LyXFunc* instead and
60       save a couple of bytes per dialog.
61   */
62   LyXView * lv_;
63   /** Which Dialogs do we belong to?
64       Used so we can get at the signals we have to connect to.
65   */
66   Dialogs * d_;
67   /// pointer to the inset passed through showInset (if any)
68   InsetCommand * inset_;
69   /// the nitty-griity. What is modified and passed back
70   InsetCommandParams params;
71   /// Update connection.
72   Connection u_;
73   /// Hide connection.
74   Connection h_;
75   /// inset::hide connection.
76   Connection ih_;
77
78   /// Real GUI implementation.
79   Gtk::Container * dialog_;
80
81   Gtk::CheckButton * html_type_;
82
83   Gnome::Entry * url_;
84   Gnome::Entry * name_;  
85
86   Gtk::Button * b_ok;
87   Gtk::Button * b_cancel;
88 };
89
90 #endif