]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GToc.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GToc.h
1 // -*- C++ -*-
2 /**
3  * \file GToc.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Spray
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GTOC_H
13 #define GTOC_H
14
15 #include "GViewBase.h"
16 #include "toc.h"
17
18 namespace lyx {
19 namespace frontend {
20
21 class ControlToc;
22
23 /** This class provides a GTK+ implementation of the Toc Dialog.
24  */
25 class GToc : public GViewCB<ControlToc, GViewGladeB> {
26 public:
27         ///
28         GToc(Dialog &);
29 private:
30         /// not needed
31         virtual void apply() {}
32         /// Build the dialog
33         virtual void doBuild();
34         /// Update dialog
35         virtual void update();
36
37         void updateType();
38         void updateContents();
39
40         void onTocViewSelected();
41         void onTypeComboChanged();
42
43         // Makes TocViewSelected ignore events
44         bool changing_views_;
45
46         Gtk::TreeView * tocview_;
47         Gtk::ComboBox * typecombo_;
48         Gtk::TreeModelColumn<Glib::ustring> listCol_;
49         Gtk::TreeModelColumn<unsigned int> listColIndex_;
50         Gtk::TreeModel::ColumnRecord listCols_;
51         Glib::RefPtr<Gtk::ListStore> tocstore_;
52         Glib::RefPtr<Gtk::ListStore> typestore_;
53         Glib::RefPtr<Gtk::TreeSelection> listSel_;
54
55         toc::Toc toc_;
56 };
57
58 } // namespace frontend
59 } // namespace lyx
60
61 #endif // GTOC_H