]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormIndex.h
Dekel's lyxrc.example; Angus's FormDocument; John's build-listerrors; POTFILES.in...
[lyx.git] / src / frontends / gnome / FormIndex.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 FORMINDEX_H
13 #define FORMINDEX_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 <gnome--/entry.h>
26 #include <gtk--/label.h>
27
28 /** This class provides an Gnome implementation of the FormIndex Dialog.
29  */
30 class FormIndex : public DialogBase, public noncopyable {
31 public:
32   ///
33   FormIndex(LyXView *, Dialogs *);
34   ///
35   ~FormIndex();
36 private:
37   /// Slot launching dialog to (possibly) create a new inset
38   void createInset( string const & );
39   /// Slot launching dialog to an existing inset
40   void showInset( InsetCommand * const );
41   
42   /// Update dialog before showing it
43   virtual void update();
44   /// Apply from dialog (modify or create inset)
45   virtual void apply();
46   /// Explicitly free the dialog.
47   void free();
48   /// Create the dialog if necessary, update it and display it.
49   void show();
50   /// Hide the dialog.
51   void hide();
52   
53   /** Which LyXFunc do we use?
54       We could modify Dialogs to have a visible LyXFunc* instead and
55       save a couple of bytes per dialog.
56   */
57   LyXView * lv_;
58   /** Which Dialogs do we belong to?
59       Used so we can get at the signals we have to connect to.
60   */
61   Dialogs * d_;
62   /// pointer to the inset passed through showInset (if any)
63   InsetCommand * inset_;
64   /// the nitty-griity. What is modified and passed back
65   InsetCommandParams params;
66   /// Update connection.
67   Connection u_;
68   /// Hide connection.
69   Connection h_;
70   /// inset::hide connection.
71   Connection ih_;
72
73   /// Real GUI implementation.
74   Gtk::Container * dialog_;
75   Gnome::Entry * keyword_;
76   Gtk::Button * b_ok;
77   Gtk::Button * b_cancel;
78 };
79
80 #endif