2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ======================================================
19 #include "DialogBase.h"
21 #include "boost/utility.hpp"
22 #include "insets/insetcommand.h"
24 #include <gtk--/container.h>
25 #include <gtk--/clist.h>
26 #include <gtk--/button.h>
27 #include <gnome--/entry.h>
28 #include <gtk--/optionmenu.h>
29 #include <gtk--/menu.h>
30 #include "pixbutton.h"
32 /** This class provides an Gnome implementation of the FormRef Dialog.
34 class FormRef : public DialogBase, public noncopyable {
37 FormRef(LyXView *, Dialogs *);
69 /// Slot launching dialog to (possibly) create a new inset
70 void createInset( string const & );
71 /// Slot launching dialog to an existing inset
72 void showInset( InsetCommand * const );
74 /// Update dialog before showing it (not used in this implementation)
75 virtual void update() { }
76 virtual void updateSlot(bool = false);
77 /// Apply from dialog (modify or create inset)
79 /// Explicitly free the dialog.
82 virtual void show() { }
83 /// Show selection of the references
84 void showStageSelect();
86 void showStageAction();
88 void showStageError(string const & mess);
91 /// Go to reference or return back
94 /// moves from Search to Select "stage"
95 void moveFromSelectToAction();
97 /// changes the type of the reference
98 void changeType(Type);
100 Type getType() const;
102 string getName( Type type ) const;
104 /** Which LyXFunc do we use?
105 We could modify Dialogs to have a visible LyXFunc* instead and
106 save a couple of bytes per dialog.
109 /** Which Dialogs do we belong to?
110 Used so we can get at the signals we have to connect to.
113 /// pointer to the inset passed through showInset (if any)
114 InsetCommand * inset_;
115 /// the nitty-griity. What is modified and passed back
116 InsetCommandParams params;
117 /// Update connection.
121 /// inset::hide connection.
124 std::vector<string> refs;
132 /// Real GUI implementation.
133 Gtk::Container * dialog_;
136 Gtk::Button * b_cancel;
137 Gnome::Entry * name_;
138 Gtk::OptionMenu * choice_;
139 Gnome::PixButton * b_goto;