]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormToc.h
More pref work from Angus
[lyx.git] / src / frontends / xforms / FormToc.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef FORMTOC_H
13 #define FORMTOC_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "FormInset.h"
20 #include "buffer.h"
21 struct FD_form_toc;
22
23 /** This class provides an XForms implementation of the FormToc Dialog.
24  */
25 class FormToc : public FormCommand {
26 public:
27         ///
28         FormToc(LyXView *, Dialogs *);
29         ///
30         ~FormToc();
31 private:
32         /// Disconnect signals. Also perform any necessary housekeeping.
33         virtual void disconnect();
34
35         /// Build the dialog
36         virtual void build();
37         /// bool indicates if a buffer switch took place
38         virtual void updateSlot(bool) { update(); }
39         /// Update dialog before showing it
40         virtual void update();
41         /// Apply from dialog (modify or create inset)
42         virtual void apply();
43         /// Pointer to the actual instantiation of the xform's form
44         virtual FL_FORM * form() const;
45         ///
46         void updateToc();
47         ///
48         FD_form_toc * build_toc();
49
50         /// Real GUI implementation.
51         FD_form_toc * dialog_;
52         ///
53         std::vector<Buffer::TocItem> toclist;
54 };
55
56 #endif