]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.h
76db96764f012d2ffc0e39d7c7e2f8c3797b9f5e
[lyx.git] / src / insets / insetindex.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright (C) 1995 Matthias Ettrich
8  *                        1996-1998 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() { 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         ///
68         bool Display() const { return true; }
69         ///
70         Inset::Code LyxCode() const;
71         ///
72         string getScreenLabel() const;
73 private:
74         ///
75         Buffer *owner;
76 };
77
78 // this was shifted here rather than a separate
79 // file because its little and only need by
80 // insetindex.C and lyx_gui_misc.C ARRae 981020
81 struct FD_index_form {
82         FL_FORM *index_form;
83         FL_OBJECT *key;
84         void *vdata;
85         long ldata;
86 };
87
88 extern FD_index_form *index_form;
89 #endif