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(bool = false);
76 /// Apply from dialog (modify or create inset)
78 /// Explicitly free the dialog.
81 virtual void show() { }
82 /// Show selection of the references
83 void showStageSelect();
85 void showStageAction();
87 void showStageError(string const & mess);
90 /// Go to reference or return back
93 /// moves from Search to Select "stage"
94 void moveFromSelectToAction();
96 /// changes the type of the reference
97 void changeType(Type);
101 string getName( Type type ) const;
103 /** Which LyXFunc do we use?
104 We could modify Dialogs to have a visible LyXFunc* instead and
105 save a couple of bytes per dialog.
108 /** Which Dialogs do we belong to?
109 Used so we can get at the signals we have to connect to.
112 /// pointer to the inset passed through showInset (if any)
113 InsetCommand * inset_;
114 /// the nitty-griity. What is modified and passed back
115 InsetCommandParams params;
116 /// Update connection.
120 /// inset::hide connection.
123 std::vector<string> refs;
131 /// Real GUI implementation.
132 Gtk::Container * dialog_;
135 Gtk::Button * b_cancel;
136 Gnome::Entry * name_;
137 Gtk::OptionMenu * choice_;
138 Gnome::PixButton * b_goto;