]> git.lyx.org Git - features.git/blob - src/insets/insetindex.h
read the Changelog
[features.git] / src / insets / insetindex.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 1995 Matthias Ettrich
8  *          Copyright 1996-2000 the LyX Team.
9  * 
10  * ====================================================== */
11
12 #ifndef INSET_INDEX_H
13 #define INSET_INDEX_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcommand.h"
20
21 class Buffer;
22 struct LaTeXFeatures;
23 struct FD_index_form;
24
25 // Created by Lgb 970227
26
27
28 /** Used to insert index labels  
29   */
30 class InsetIndex : public InsetCommand {
31 public:
32         ///
33         InsetIndex() : InsetCommand("index") {}
34         ///
35         explicit
36         InsetIndex(string const & key);
37         ///
38         ~InsetIndex();
39         ///
40         Inset * Clone() const { return new InsetIndex(getContents());}
41         ///
42         void Edit(BufferView *, int, int, unsigned int);
43         ///
44         EDITABLE Editable() const
45         {
46                 return IS_EDITABLE;
47         }
48         ///
49         string getScreenLabel() const;
50         ///
51         void callback( FD_index_form *, long );
52         ///
53         struct Holder {
54                 InsetIndex * inset;
55                 BufferView * view;
56         };
57  private:
58         ///
59         Holder holder;
60 };
61
62
63 class InsetPrintIndex : public InsetCommand {
64 public:
65 #if 0
66         ///
67         InsetPrintIndex();
68 #endif
69         ///
70         InsetPrintIndex(Buffer *);
71 #if 0
72         ///
73         ~InsetPrintIndex();
74 #endif
75         /// Updates needed features for this inset.
76         void Validate(LaTeXFeatures & features) const;
77         ///
78         void Edit(BufferView *, int, int, unsigned int) {}
79         ///
80         EDITABLE Editable() const{
81                 return IS_EDITABLE;
82         }
83         /// WHY is clone missing? (Lgb)
84         ///
85         bool display() const { return true; }
86         ///
87         Inset::Code LyxCode() const;
88         ///
89         string getScreenLabel() const;
90 private:
91         ///
92         Buffer * owner;
93 };
94
95 // this was shifted here rather than a separate
96 // file because its little and only need by
97 // insetindex.C and lyx_gui_misc.C ARRae 981020
98 struct FD_index_form {
99         FL_FORM * index_form;
100         FL_OBJECT * key;
101 };
102
103 extern FD_index_form * index_form;
104 #endif