[go: up one dir, main page]

Menu

[r774]: / eddef.pas  Maximize  Restore  History

Download this file

186 lines (158 with data), 10.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{ $Id: eddef.pas 6975 2005-08-20 22:34:53Z stell $
OpenXP editor defines unit
Copyright (C) 1991-2001 Peter Mandrella
Copyright (C) 2000-2002 OpenXP team (www.openxp.de)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
{$I xpdefine.inc }
{ OpenXP editor defines unit }
unit eddef;
interface
uses xpglobal,keys;
type ECB = pointer;
const EditfLeft = 1; { Cursor links }
EditfRight = 2; { Cursor rechts }
EditfUp = 3; { Cursor oben }
EditfDown = 4; { Cursor unten }
EditfPgUp = 5; { Seite nach oben }
EditfPgDn = 6; { Seite nach unten }
EditfWordLeft = 7; { Wort links }
EditfWordRight = 8; { Wort rechts }
EditfTop = 9; { Textanfang }
EditfBottom = 10; { Textende }
EditfPageTop = 11; { 1. Bildschirmzeile }
EditfPageBottom = 12; { letzte Bildschirmzeile }
EditfEOL = 13; { Zeilenende }
EditfBOL = 14; { Zeilenanfang }
EditfNextPara = 15; { Beginn n„chster Absatz }
EditfPrevPara = 16; { Vorausgehender Absatzbeginn }
EditfScrollUp = 17; { Bild eine Zeile hochscrollen }
EditfScrollDown = 18; { Bild eine Zeile nach unten }
EditfMark1 = 30; { Marke 1 setzen }
EditfMark2 = 31; { Marke 2 setzen }
EditfMark3 = 32; { Marke 3 setzen }
EditfMark4 = 33; { Marke 4 setzen }
EditfMark5 = 34; { Marke 5 setzen }
EditfGoto1 = 35; { Sprung zu Marke 1 }
EditfGoto2 = 36; { Sprung zu Marke 2 }
EditfGoto3 = 37; { Sprung zu Marke 3 }
EditfGoto4 = 38; { Sprung zu Marke 4 }
EditfGoto5 = 39; { Sprung zu Marke 5 }
EditfLastpos = 40; { Ctrl-Q-P }
EditfGotoBStart = 41; { Blockanfang anspringen }
EditfGotoBEnd = 42; { Blockende anspringen }
EditfBS = 50; { Zeichen links l”schen }
EditfDEL = 51; { Zeichen unter Cursor l”schen }
EditfDelWordRght = 52; { Wort rechts l”schen }
EditfDelWordLeft = 53; { Wort links l”schen }
EditfDelLine = 54; { Zeile l”schen }
EditfDelBlock = 55; { markierten Block l”schen }
EditfBlockBegin = 56; { Blockbeginn setzen }
EditfBlockEnd = 57; { Blockende setzen }
EditfCopyBlock = 58; { Kopie an Cursorposition }
EditfMoveBlock = 59; { verschieben an Cursorposition }
EditfCutBlock = 60; { in Clipboard ausschneiden }
EditfCCopyBlock = 61; { in Clipboard kopieren }
EditfPasteBlock = 62; { aus Clipboard einfgen }
EditfWriteBlock = 63; { Block in Datei schreiben }
EditfReadBlock = 64; { Block aus Datei einlesen }
EditfMarkWord = 65; { Wort markieren }
EditfMarkLine = 66; { Zeile markieren }
EditfMarkPara = 67; { Absatz markieren }
EditfMarkAll = 68; { ganzen Text markieren }
EditfNewline = 69; { Enter }
EditfTAB = 70; { TAB-Sprung }
EditfUndelete = 71; { Undelete }
EditfHideBlock = 72; { Blockmarkierung abschalten }
EditfReformat = 73; { Block reformatieren }
EditfDelToEOF = 74; { alles ab Cursorposition l”schen }
EditfRot13 = 75; { Block Rot13-codieren }
EditfPrint = 76; { Block ausdrucken }
EditfDeltoEnd = 77; { L”schen bis Absatzende }
EditfParagraph = 78; { ^P^U }
EditfChangeCase = 79; { Alt-3 }
EditfReadUUeBlock= 80; { Block aus Datei einlesen & UU-Encode }
EditfFormatBlock = 81; { Block reformatieren }
EditfFind = 100; { Suchen }
EditfFindReplace = 101; { Suchen + Ersetzen }
EditfFindRepeat = 102; { wiederholen (^L) }
EditfCtrlPrefix = 103; { Steuerzeichen-Pr„fix }
EditfWrapOn = 104; { Absatzumbruch einschalten }
EditfWrapOff = 105; { Absatzumbruch ausschalten }
EditfAllwrapOn = 106; { Umbruch fr ganzen Text ein }
EditfAllwrapOff = 107; { Umbruch fr ganzen Text aus }
EditfSetMargin = 108; { rechten Rand einstellen }
EditfText = 109; { *** Zeicheneingabe *** }
EditfChangeInsert= 110; { Einfgemodus umschalten }
EditfAbsatzmarke = 111; { #20 ein/ausschalten }
EditfRestorePara = 112; { Žnderungen rckg„ngig machen }
EditfChangeIndent= 113; { Einrcken umschalten }
EditfMenu = 120; { F10 - lokales Men }
EditfSetup = 121; { Einstellungen }
EditfSaveSetup = 122; { Einstellungen speichern }
EditfSave = 123; { Speichern }
EditfBreak = 124; { Abbruch }
EditfSaveQuit = 125; { Speichern + Ende }
EditfGlossary = 126; { Kuerzelmacros mit STRG+ENTER }
EditCorrectWorkpos = 127; { CorrectWorkpos aufrufen }
MaxFindLen = 30;
EditMenuMps = 17;
QuoteCharSet : set of char = [':','|']; { Weitere Quotezeichen }
drBoth = true; // Both search Directions in GotoPos
drForward = false; // Only Forward search
type EdColrec = record
coltext,colstatus,colmarked,
colendmark : byte;
colquote : array[1..9] of byte;
colmenu,colmenuhi,colmenuinv,
colmenuhiinv : byte;
end;
LangData = record
zeile,spalte : string[8];
ja,nein : char;
errors : array[1..6] of string[30];
askquit : string[30]; { 'Ge„nderten Text speichern' }
askoverwrite : string[50]; { 'Datei existiert schon - berschreiben' }
askreplace : string[40]; { 'Text ersetzen (Ja/Nein/Alle/Esc)' }
replacechr : string[3]; { 'JNA' }
ersetzt : string[30]; { ' Textstellen ersetzt' }
drucken : string[15]; { 'Drucken ...' }
menue : array[0..editmenumps] of string[20];
end;
LdataPtr = ^LangData;
EdConfig = record
absatzendezeichen : char;
rechter_rand : word;
AutoIndent : boolean;
PersistentBlocks : boolean;
QuoteReflow : boolean;
CtrlXCV : boolean; { Ctrl-X/C/V = Cut/Copy/Paste }
end;
EdAskQuit = function(ed:ECB):taste; { J/N/Esc }
EdAskOverwrite = function(ed:ECB; fn:string):taste;
EdMessage = procedure(txt:string; error:boolean); { Meldung anzeigen }
EdAskFile = procedure(ed:ECB; var fn:string; save,uuenc:boolean); { Dateinameneingabe }
EdFindPanel = function(ed:ECB; var txt:string; var igcase:boolean):boolean;
EdReplPanel = function(ed:ECB; var txt,repby:string; var igcase:boolean):boolean;
EdConfigPanel = procedure(var cfg:EdConfig; var brk:boolean);
EdProcs = record
QuitFunc : EdAskQuit; { Frage bei Programmende }
Overwrite : EdAskOverwrite; { Datei berschreiben? }
MsgProc : EdMessage; { Meldung/Fehler }
FileProc : EdAskFile; { Dateiname abfragen }
FindFunc : EdFindPanel; { Such-Dialog }
ReplFunc : EdReplPanel; { Ersetze-Dialog }
CfgFunc : EdConfigPanel; { Config-Dialog }
end;
implementation
end.