]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormToc.h
small patch from Dekel, begin introducing the real boost framework, get rid of the...
[lyx.git] / src / frontends / gnome / 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 "DialogBase.h"
20 #include "LString.h"
21 #include "support/utility.hpp"
22 #include "insets/insetcommand.h"
23 #include "buffer.h"
24
25 #include <gnome--/dialog.h>
26 #include <gtk--/optionmenu.h>
27 #include <gtk--/list.h>
28
29 /** This class provides an Gnome implementation of the FormToc Dialog.
30  */
31 class FormToc : public DialogBase, public noncopyable {
32 public:
33   ///
34   FormToc(LyXView *, Dialogs *);
35   ///
36   ~FormToc();
37 private:
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 );
42   
43   /// Update dialog before showing it
44   virtual void update();
45   /// Explicitly free the dialog.
46   void free();
47   /// Create the dialog if necessary, update it and display it.
48   void show();
49   /// Hide the dialog.
50   void hide();
51   /// move cursor in LyXView
52   void apply(Buffer::TocItem);
53   /// change type of the list
54   void changeList(Buffer::TocType);
55   
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.
59   */
60   LyXView * lv_;
61   /** Which Dialogs do we belong to?
62       Used so we can get at the signals we have to connect to.
63   */
64   Dialogs * d_;
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.
70   Connection u_;
71   /// Hide connection.
72   Connection h_;
73   /// inset::hide connection.
74   Connection ih_;
75
76   /// Real GUI implementation.
77   Gnome::Dialog * dialog_;
78
79   Gtk::OptionMenu * choice_;
80
81   Gtk::List * list_;
82
83   bool ignore_callback_;
84 };
85
86 #endif