]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormUrl.h
try this for distinguishing inner and outer tabs
[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 "boost/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   virtual void updateSlot(bool = false);
50   /// Apply from dialog (modify or create inset)
51   virtual void apply();
52   /// Explicitly free the dialog.
53   void free();
54   /// Create the dialog if necessary, update it and display it.
55   void show();
56   /// Hide the dialog.
57   void hide();
58   
59   /** Which LyXFunc do we use?
60       We could modify Dialogs to have a visible LyXFunc* instead and
61       save a couple of bytes per dialog.
62   */
63   LyXView * lv_;
64   /** Which Dialogs do we belong to?
65       Used so we can get at the signals we have to connect to.
66   */
67   Dialogs * d_;
68   /// pointer to the inset passed through showInset (if any)
69   InsetCommand * inset_;
70   /// the nitty-griity. What is modified and passed back
71   InsetCommandParams params;
72   /// Update connection.
73   Connection u_;
74   /// Hide connection.
75   Connection h_;
76   /// inset::hide connection.
77   Connection ih_;
78
79   /// Real GUI implementation.
80   Gtk::Container * dialog_;
81
82   Gtk::CheckButton * html_type_;
83
84   Gnome::Entry * url_;
85   Gnome::Entry * name_;  
86
87   Gtk::Button * b_ok;
88   Gtk::Button * b_cancel;
89 };
90
91 #endif