]> git.lyx.org Git - lyx.git/blob - src/insets/inset.C
last updates from 1.0.4, no more updates expected from that branch now
[lyx.git] / src / insets / inset.C
1 /* This file is part of
2  * ======================================================
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright (C) 1995 Matthias Ettrich
7  *          Copyright (C) 1995-1998 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 "error.h"
19
20 //      $Id: inset.C,v 1.1 1999/09/27 18:44:38 larsbj Exp $     
21
22 #if !defined(lint) && !defined(WITH_WARNINGS)
23 static char vcid[] = "$Id: inset.C,v 1.1 1999/09/27 18:44:38 larsbj Exp $";
24 #endif /* lint */
25
26 /* Insets default methods */
27
28 bool Inset::Deletable() const
29 {
30   return true;
31 }
32
33
34 bool Inset::DirectWrite() const
35 {
36   return false;
37 }
38
39
40 unsigned char Inset::Editable() const
41 {
42   return 0;
43 }
44
45 void Inset::Validate(LaTeXFeatures &) const
46 {
47         // nothing by default
48 }
49
50
51
52 bool Inset::AutoDelete() const
53 {
54   return false;
55 }
56
57
58 void Inset::Edit(int, int)
59 {
60 }
61
62
63 LyXFont Inset::ConvertFont(LyXFont font)
64 {
65   return font;
66 }
67
68
69 // Inset::Code Inset::LyxCode() const
70 // {
71 //   return Inset::NO_CODE;
72 // }
73
74  /* some stuff for inset locking */
75
76
77 void UpdatableInset::InsetButtonPress(int x, int y, int button)
78 {
79         lyxerr.debug(LString("Inset Button Press x=")+ x +
80                       ", y=" + y + ", button=" + button);
81 }
82
83
84 void UpdatableInset::InsetButtonRelease(int x, int y, int button)
85 {
86         lyxerr.debug(LString("Inset Button Release x=")+ x +
87                       ", y=" + y + ", button=" + button);
88 }
89
90
91 void UpdatableInset::InsetKeyPress(XKeyEvent *)
92 {
93         lyxerr.debug("Inset Keypress");
94 }
95
96
97 void UpdatableInset::InsetMotionNotify(int x, int y, int state)
98 {
99         lyxerr.debug(LString("Inset Motion Notify x=")+ x +
100                       ", y=" + y + ", state=" + state);
101 }
102
103
104 void UpdatableInset::InsetUnlock()
105 {
106         lyxerr.debug("Inset Unlock", Error::ANY);
107 }
108
109
110 // An updatable inset is highly editable by definition
111 unsigned char UpdatableInset::Editable() const
112 {
113         return 2; // and what does "2" siginify? (Lgb)
114 }
115
116
117 void UpdatableInset::ToggleInsetCursor()
118 {
119   // nothing
120 }