]> git.lyx.org Git - lyx.git/blob - src/insets/inset.C
8216147c35c0e6492cf74b230a923a48fec57769
[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 void Inset::Validate(LaTeXFeatures &) const
41 {
42         // nothing by default
43 }
44
45
46
47 bool Inset::AutoDelete() const
48 {
49   return false;
50 }
51
52
53 void Inset::Edit(int, int)
54 {
55 }
56
57
58 LyXFont Inset::ConvertFont(LyXFont font)
59 {
60   return font;
61 }
62
63
64 // Inset::Code Inset::LyxCode() const
65 // {
66 //   return Inset::NO_CODE;
67 // }
68
69  /* some stuff for inset locking */
70
71
72 void UpdatableInset::InsetButtonPress(int x, int y, int button)
73 {
74         lyxerr.debug() << "Inset Button Press x=" << x
75                        << ", y=" << y << ", button=" << button << endl;
76 }
77
78
79 void UpdatableInset::InsetButtonRelease(int x, int y, int button)
80 {
81         lyxerr.debug() << "Inset Button Release x=" << x
82                        << ", y=" << y << ", button=" << button << endl;
83 }
84
85
86 void UpdatableInset::InsetKeyPress(XKeyEvent *)
87 {
88         lyxerr.debug() << "Inset Keypress" << endl;
89 }
90
91
92 void UpdatableInset::InsetMotionNotify(int x, int y, int state)
93 {
94         lyxerr.debug() << "Inset Motion Notify x=" << x
95                        << ", y=" << y << ", state=" << state << endl;
96 }
97
98
99 void UpdatableInset::InsetUnlock()
100 {
101         lyxerr.debug() << "Inset Unlock" << endl;
102 }
103
104
105 // An updatable inset is highly editable by definition
106 unsigned char UpdatableInset::Editable() const
107 {
108         return 2; // and what does "2" siginify? (Lgb)
109 }
110
111
112 void UpdatableInset::ToggleInsetCursor()
113 {
114   // nothing
115 }