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"
25 #include <gnome--/dialog.h>
26 #include <gtk--/optionmenu.h>
27 #include <gtk--/list.h>
29 /** This class provides an Gnome implementation of the FormToc Dialog.
31 class FormToc : public DialogBase, public noncopyable {
34 FormToc(LyXView *, Dialogs *);
38 /// Slot launching dialog to (possibly) create a new inset
39 void createInset( string const & );
40 /// Slot launching dialog to an existing inset
41 void showInset( InsetCommand * const );
43 /// Update dialog before showing it
44 virtual void update(bool = false);
45 /// Explicitly free the dialog.
47 /// Create the dialog if necessary, update it and display it.
51 /// move cursor in LyXView
52 void apply(Buffer::TocItem);
53 /// change type of the list
54 void changeList(Buffer::TocType);
56 /** Which LyXFunc do we use?
57 We could modify Dialogs to have a visible LyXFunc* instead and
58 save a couple of bytes per dialog.
61 /** Which Dialogs do we belong to?
62 Used so we can get at the signals we have to connect to.
65 /// pointer to the inset passed through showInset (if any)
66 InsetCommand * inset_;
67 /// the nitty-griity. What is modified and passed back
68 InsetCommandParams params;
69 /// Update connection.
73 /// inset::hide connection.
76 /// Real GUI implementation.
77 Gnome::Dialog * dialog_;
79 Gtk::OptionMenu * choice_;
83 bool ignore_callback_;