]> git.lyx.org Git - lyx.git/blob - src/insets/inset.C
continue the crusade to get rid of current_view
[lyx.git] / src / insets / inset.C
1 /* This file is part of
2  * ====================================================== 
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright 1995 Matthias Ettrich
7  *          Copyright 1995-1999 The LyX Team.
8  *
9  * ====================================================== */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation "lyxinset.h"
15 #endif
16
17 #include "lyxinset.h"
18 #include "debug.h"
19 #include "support/lstrings.h"
20
21 /* Insets default methods */
22
23 bool Inset::Deletable() const
24 {
25   return true;
26 }
27
28
29 bool Inset::DirectWrite() const
30 {
31   return false;
32 }
33
34
35 unsigned char Inset::Editable() const
36 {
37   return 0;
38 }
39
40
41 void Inset::Validate(LaTeXFeatures &) const
42 {
43 }
44
45
46 bool Inset::AutoDelete() const
47 {
48   return false;
49 }
50
51
52 void Inset::Edit(BufferView *, int, int)
53 {
54 }
55
56
57 LyXFont Inset::ConvertFont(LyXFont font)
58 {
59   return font;
60 }
61
62
63  /* some stuff for inset locking */
64
65 void UpdatableInset::InsetButtonPress(BufferView *, int x, int y, int button)
66 {
67         lyxerr.debug() << "Inset Button Press x=" << x
68                        << ", y=" << y << ", button=" << button << endl;
69 }
70
71
72 void UpdatableInset::InsetButtonRelease(BufferView *, int x, int y, int button)
73 {
74         lyxerr.debug() << "Inset Button Release x=" << x
75                        << ", y=" << y << ", button=" << button << endl;
76 }
77
78
79 void UpdatableInset::InsetKeyPress(XKeyEvent *)
80 {
81         lyxerr.debug() << "Inset Keypress" << endl;
82 }
83
84
85 void UpdatableInset::InsetMotionNotify(BufferView *, int x, int y, int state)
86 {
87         lyxerr.debug() << "Inset Motion Notify x=" << x
88                        << ", y=" << y << ", state=" << state << endl;
89 }
90
91
92 void UpdatableInset::InsetUnlock(BufferView *)
93 {
94         lyxerr.debug() << "Inset Unlock" << endl;
95 }
96
97
98 // An updatable inset is highly editable by definition
99 unsigned char UpdatableInset::Editable() const
100 {
101         return 2; // and what does "2" siginify? (Lgb)
102 }
103
104
105 void UpdatableInset::ToggleInsetCursor(BufferView *)
106 {
107 }