]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.h
pos=string::npos for regex not found, use handcoded transform in lstring.C, fix the...
[lyx.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-1999 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
24 // Created by Lgb 970227
25
26
27 /** Used to insert index labels  
28   */
29 class InsetIndex: public InsetCommand {
30 public:
31         ///
32         InsetIndex() : InsetCommand("index") {}
33         ///
34         InsetIndex(string const & key);
35         ///
36         ~InsetIndex();
37         ///
38         Inset * Clone() const { return new InsetIndex(contents);}
39         ///
40         void Edit(int, int);
41         ///
42         unsigned char Editable() const
43         {
44                 return 1;
45         }
46         ///
47         string getScreenLabel() const;
48 };
49
50
51 class InsetPrintIndex : public InsetCommand {
52 public:
53         ///
54         InsetPrintIndex();
55         ///
56         InsetPrintIndex(Buffer *);
57         ///
58         ~InsetPrintIndex();
59         /// Updates needed features for this inset.
60         void Validate(LaTeXFeatures & features) const;
61         ///
62         void Edit(int, int) {}
63         ///
64         unsigned char Editable() const{
65                 return 1;
66         }
67         /// WHY is clone missing? (Lgb)
68         ///
69         bool display() const { return true; }
70         ///
71         Inset::Code LyxCode() const;
72         ///
73         string getScreenLabel() const;
74 private:
75         ///
76         Buffer * owner;
77 };
78
79 // this was shifted here rather than a separate
80 // file because its little and only need by
81 // insetindex.C and lyx_gui_misc.C ARRae 981020
82 struct FD_index_form {
83         FL_FORM * index_form;
84         FL_OBJECT * key;
85 };
86
87 extern FD_index_form * index_form;
88 #endif