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() { }
45 virtual void updateSlot(bool = false);
46 /// Explicitly free the dialog.
48 /// Create the dialog if necessary, update it and display it.
52 /// move cursor in LyXView
53 void apply(Buffer::TocItem);
54 /// change type of the list
55 void changeList(Buffer::TocType);
57 /** Which LyXFunc do we use?
58 We could modify Dialogs to have a visible LyXFunc* instead and
59 save a couple of bytes per dialog.
62 /** Which Dialogs do we belong to?
63 Used so we can get at the signals we have to connect to.
66 /// pointer to the inset passed through showInset (if any)
67 InsetCommand * inset_;
68 /// the nitty-griity. What is modified and passed back
69 InsetCommandParams params;
70 /// Update connection.
74 /// inset::hide connection.
77 /// Real GUI implementation.
78 Gnome::Dialog * dialog_;
80 Gtk::OptionMenu * choice_;
84 bool ignore_callback_;