]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormToc.h
Compile fixes for DEC cxx, John's maths and keymap patches.
[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 #include <boost/smart_ptr.hpp>
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "FormInset.h"
22 #include "buffer.h"
23
24 struct FD_form_toc;
25
26 /** This class provides an XForms implementation of the FormToc Dialog.
27  */
28 class FormToc : public FormCommand {
29 public:
30         ///
31         FormToc(LyXView *, Dialogs *);
32 private:
33         /// Pointer to the actual instantiation of the ButtonController.
34         virtual xformsBC & bc();
35         /// Disconnect signals. Also perform any necessary housekeeping.
36         virtual void disconnect();
37
38         /// Build the dialog
39         virtual void build();
40         /// bool indicates if a buffer switch took place
41         virtual void updateSlot(bool) { update(); }
42         /// Update dialog before showing it
43         virtual void update();
44         /// Filter the inputs on callback from xforms
45         virtual bool input( FL_OBJECT *, long);
46         /// Pointer to the actual instantiation of the xforms form
47         virtual FL_FORM * form() const;
48         ///
49         void updateToc();
50         ///
51         FD_form_toc * build_toc();
52
53         ///
54         Buffer::SingleList toclist;
55         /// Real GUI implementation.
56         boost::scoped_ptr<FD_form_toc> dialog_;
57         /// The ButtonController
58         ButtonController<OkCancelPolicy, xformsBC> bc_;
59 };
60
61
62 inline
63 xformsBC & FormToc::bc()
64 {
65         return bc_;
66 }
67 #endif