From Ivan Skytte Jørgensen: remove duplicate declarations
[nedit.git] / source / nedit.h
blob6cde9afade425d8d9a3fa7553ff9ce82108c711f
1 /* $Id: nedit.h,v 1.68 2006/11/22 13:45:52 yooden Exp $ */
2 /*******************************************************************************
3 * *
4 * nedit.h -- Nirvana Editor Common Header File *
5 * *
6 * Copyright 2004 The NEdit Developers *
7 * *
8 * This is free software; you can redistribute it and/or modify it under the *
9 * terms of the GNU General Public License as published by the Free Software *
10 * Foundation; either version 2 of the License, or (at your option) any later *
11 * version. In addition, you may distribute versions of this program linked to *
12 * Motif or Open Motif. See README for details. *
13 * *
14 * This software is distributed in the hope that it will be useful, but WITHOUT *
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
17 * more details. *
18 * *
19 * You should have received a copy of the GNU General Public License along with *
20 * software; if not, write to the Free Software Foundation, Inc., 59 Temple *
21 * Place, Suite 330, Boston, MA 02111-1307 USA *
22 * *
23 * Nirvana Text Editor *
24 * July 31, 2001 *
25 * *
26 *******************************************************************************/
28 #ifndef NEDIT_NEDIT_H_INCLUDED
29 #define NEDIT_NEDIT_H_INCLUDED
31 #include "textBuf.h"
32 #include <sys/types.h>
34 #include <X11/Intrinsic.h>
35 #include <Xm/Xm.h>
36 #include <Xm/XmStrDefs.h>
37 #ifdef VMS
38 #include "../util/VMSparam.h"
39 #else
40 #ifndef __MVS__
41 #include <sys/param.h>
42 #endif
43 #endif /*VMS*/
45 #define NEDIT_VERSION 5
46 #define NEDIT_REVISION 5
48 /* Some default colors */
49 #define NEDIT_DEFAULT_FG "black"
50 #define NEDIT_DEFAULT_TEXT_BG "rgb:e5/e5/e5"
51 #define NEDIT_DEFAULT_SEL_FG "black"
52 #define NEDIT_DEFAULT_SEL_BG "rgb:cc/cc/cc"
53 #define NEDIT_DEFAULT_HI_FG "white" /* These are colors for flashing */
54 #define NEDIT_DEFAULT_HI_BG "red" /* matching parens. */
55 #define NEDIT_DEFAULT_LINENO_FG "black"
56 #define NEDIT_DEFAULT_CURSOR_FG "black"
57 #define NEDIT_DEFAULT_HELP_FG "black"
58 #define NEDIT_DEFAULT_HELP_BG "rgb:cc/cc/cc"
61 /* Tuning parameters */
62 #define SEARCHMAX 5119 /* Maximum length of search/replace strings */
63 #define MAX_SEARCH_HISTORY 100 /* Maximum length of search string history */
64 #define MAX_PANES 6 /* Max # of ADDITIONAL text editing panes
65 that can be added to a window */
66 #ifndef VMS
67 #define AUTOSAVE_CHAR_LIMIT 30 /* number of characters user can type before
68 NEdit generates a new backup file */
69 #else
70 #define AUTOSAVE_CHAR_LIMIT 80 /* set higher on VMS becaus saving is slower */
71 #endif /*VMS*/
72 #define AUTOSAVE_OP_LIMIT 8 /* number of distinct editing operations user
73 can do before NEdit gens. new backup file */
74 #define MAX_FONT_LEN 100 /* maximum length for a font name */
75 #define MAX_COLOR_LEN 30 /* maximum length for a color name */
76 #define MAX_MARKS 36 /* max. # of bookmarks (one per letter & #) */
77 #define MIN_LINE_NUM_COLS 4 /* Min. # of columns in line number display */
78 #define APP_NAME "nedit" /* application name for loading resources */
79 #define APP_CLASS "NEdit" /* application class for loading resources */
81 /* The accumulated list of undo operations can potentially consume huge
82 amounts of memory. These tuning parameters determine how much undo infor-
83 mation is retained. Normally, the list is kept between UNDO_OP_LIMIT and
84 UNDO_OP_TRIMTO in length (when the list reaches UNDO_OP_LIMIT, it is
85 trimmed to UNDO_OP_TRIMTO then allowed to grow back to UNDO_OP_LIMIT).
86 When there are very large amounts of saved text held in the list,
87 UNDO_WORRY_LIMIT and UNDO_PURGE_LIMIT take over and cause the list to
88 be trimmed back further to keep its size down. */
89 #define UNDO_PURGE_LIMIT 15000000 /* If undo list gets this large (in bytes),
90 trim it to length of UNDO_PURGE_TRIMTO */
91 #define UNDO_PURGE_TRIMTO 1 /* Amount to trim the undo list in a purge */
92 #define UNDO_WORRY_LIMIT 2000000 /* If undo list gets this large (in bytes),
93 trim it to length of UNDO_WORRY_TRIMTO */
94 #define UNDO_WORRY_TRIMTO 5 /* Amount to trim the undo list when memory
95 use begins to get serious */
96 #define UNDO_OP_LIMIT 400 /* normal limit for length of undo list */
97 #define UNDO_OP_TRIMTO 200 /* size undo list is normally trimmed to
98 when it exceeds UNDO_OP_TRIMTO in length */
99 #ifdef SGI_CUSTOM
100 #define MAX_SHORTENED_ITEMS 100 /* max. number of items excluded in short- */
101 #endif /* menus mode */
103 enum indentStyle {NO_AUTO_INDENT, AUTO_INDENT, SMART_INDENT};
104 enum wrapStyle {NO_WRAP, NEWLINE_WRAP, CONTINUOUS_WRAP};
105 enum showMatchingStyle {NO_FLASH, FLASH_DELIMIT, FLASH_RANGE};
106 enum virtKeyOverride { VIRT_KEY_OVERRIDE_NEVER, VIRT_KEY_OVERRIDE_AUTO,
107 VIRT_KEY_OVERRIDE_ALWAYS };
109 /* This enum must be kept in parallel to the array TruncSubstitutionModes[]
110 in preferences.c */
111 enum truncSubstitution {TRUNCSUBST_SILENT, TRUNCSUBST_FAIL, TRUNCSUBST_WARN, TRUNCSUBST_IGNORE};
113 #define NO_FLASH_STRING "off"
114 #define FLASH_DELIMIT_STRING "delimiter"
115 #define FLASH_RANGE_STRING "range"
117 #define CHARSET (XmStringCharSet)XmSTRING_DEFAULT_CHARSET
119 #define MKSTRING(string) \
120 XmStringCreateLtoR(string, XmSTRING_DEFAULT_CHARSET)
122 #define SET_ONE_RSRC(widget, name, newValue) \
124 static Arg args[1] = {{name, (XtArgVal)0}}; \
125 args[0].value = (XtArgVal)newValue; \
126 XtSetValues(widget, args, 1); \
129 #define GET_ONE_RSRC(widget, name, valueAddr) \
131 static Arg args[1] = {{name, (XtArgVal)0}}; \
132 args[0].value = (XtArgVal)valueAddr; \
133 XtGetValues(widget, args, 1); \
136 /* This handles all the different reasons files can be locked */
137 #define USER_LOCKED_BIT 0
138 #define PERM_LOCKED_BIT 1
139 #define TOO_MUCH_BINARY_DATA_LOCKED_BIT 2
141 #define LOCKED_BIT_TO_MASK(bitNum) (1 << (bitNum))
142 #define SET_LOCKED_BY_REASON(reasons, onOrOff, reasonBit) ((onOrOff) ? \
143 ((reasons) |= LOCKED_BIT_TO_MASK(reasonBit)) : \
144 ((reasons) &= ~LOCKED_BIT_TO_MASK(reasonBit)))
146 #define IS_USER_LOCKED(reasons) (((reasons) & LOCKED_BIT_TO_MASK(USER_LOCKED_BIT)) != 0)
147 #define SET_USER_LOCKED(reasons, onOrOff) SET_LOCKED_BY_REASON(reasons, onOrOff, USER_LOCKED_BIT)
148 #define IS_PERM_LOCKED(reasons) (((reasons) & LOCKED_BIT_TO_MASK(PERM_LOCKED_BIT)) != 0)
149 #define SET_PERM_LOCKED(reasons, onOrOff) SET_LOCKED_BY_REASON(reasons, onOrOff, PERM_LOCKED_BIT)
150 #define IS_TMBD_LOCKED(reasons) (((reasons) & LOCKED_BIT_TO_MASK(TOO_MUCH_BINARY_DATA_LOCKED_BIT)) != 0)
151 #define SET_TMBD_LOCKED(reasons, onOrOff) SET_LOCKED_BY_REASON(reasons, onOrOff, TOO_MUCH_BINARY_DATA_LOCKED_BIT)
153 #define IS_ANY_LOCKED_IGNORING_USER(reasons) (((reasons) & ~LOCKED_BIT_TO_MASK(USER_LOCKED_BIT)) != 0)
154 #define IS_ANY_LOCKED_IGNORING_PERM(reasons) (((reasons) & ~LOCKED_BIT_TO_MASK(PERM_LOCKED_BIT)) != 0)
155 #define IS_ANY_LOCKED(reasons) ((reasons) != 0)
156 #define CLEAR_ALL_LOCKS(reasons) ((reasons) = 0)
158 /* determine a safe size for a string to hold an integer-like number contained in xType */
159 #define TYPE_INT_STR_SIZE(xType) ((sizeof(xType) * 3) + 2)
161 /* Record on undo list */
162 typedef struct _UndoInfo {
163 struct _UndoInfo *next; /* pointer to the next undo record */
164 int type;
165 int startPos;
166 int endPos;
167 int oldLen;
168 char *oldText;
169 char inUndo; /* flag to indicate undo command on
170 this record in progress. Redirects
171 SaveUndoInfo to save the next mod-
172 ifications on the redo list instead
173 of the undo list. */
174 char restoresToSaved; /* flag to indicate undoing this
175 operation will restore file to
176 last saved (unmodified) state */
177 } UndoInfo;
179 /* Element in bookmark table */
180 typedef struct {
181 char label;
182 int cursorPos;
183 selection sel;
184 } Bookmark;
186 /* Identifiers for the different colors that can be adjusted. */
187 enum colorTypes {
188 TEXT_FG_COLOR,
189 TEXT_BG_COLOR,
190 SELECT_FG_COLOR,
191 SELECT_BG_COLOR,
192 HILITE_FG_COLOR,
193 HILITE_BG_COLOR,
194 LINENO_FG_COLOR,
195 CURSOR_FG_COLOR,
196 NUM_COLORS
199 /* cache user menus: manage mode of user menu list element */
200 typedef enum {
201 UMMM_UNMANAGE, /* user menu item is unmanaged */
202 UMMM_UNMANAGE_ALL, /* user menu item is a sub menu and is
203 completely unmanaged (including nested
204 sub menus) */
205 UMMM_MANAGE, /* user menu item is managed; menu items
206 of potential sub menu are (un)managed
207 individually */
208 UMMM_MANAGE_ALL /* user menu item is a sub menu and is
209 completely managed */
210 } UserMenuManageMode;
212 /* structure representing one user menu item */
213 typedef struct _UserMenuListElement {
214 UserMenuManageMode umleManageMode; /* current manage mode */
215 UserMenuManageMode umlePrevManageMode; /* previous manage mode */
216 char *umleAccKeys; /* accelerator keys of item */
217 Boolean umleAccLockPatchApplied; /* indicates, if accelerator
218 lock patch is applied */
219 Widget umleMenuItem; /* menu item represented by
220 this element */
221 Widget umleSubMenuPane; /* holds menu pane, if item
222 represents a sub menu */
223 struct _UserMenuList *umleSubMenuList; /* elements of sub menu, if
224 item represents a sub menu */
225 } UserMenuListElement;
227 /* structure holding a list of user menu items */
228 typedef struct _UserMenuList {
229 int umlNbrItems;
230 UserMenuListElement **umlItems;
231 } UserMenuList;
233 /* structure holding cache info about Shell and Macro menus, which are
234 shared over all "tabbed" documents (needed to manage/unmanage this
235 user definable menus when language mode changes) */
236 typedef struct _UserMenuCache {
237 int umcLanguageMode; /* language mode applied for shared
238 user menus */
239 Boolean umcShellMenuCreated; /* indicating, if all shell menu items
240 were created */
241 Boolean umcMacroMenuCreated; /* indicating, if all macro menu items
242 were created */
243 UserMenuList umcShellMenuList; /* list of all shell menu items */
244 UserMenuList umcMacroMenuList; /* list of all macro menu items */
245 } UserMenuCache;
247 /* structure holding cache info about Background menu, which is
248 owned by each document individually (needed to manage/unmanage this
249 user definable menu when language mode changes) */
250 typedef struct _UserBGMenuCache {
251 int ubmcLanguageMode; /* language mode applied for background
252 user menu */
253 Boolean ubmcMenuCreated; /* indicating, if all background menu
254 items were created */
255 UserMenuList ubmcMenuList; /* list of all background menu items */
256 } UserBGMenuCache;
258 /* The WindowInfo structure holds the information on a Document. A number
259 of 'tabbed' documents may reside within a shell window, hence some of
260 its members are of 'shell-level'; namely the find/replace dialogs, the
261 menu bar & its associated members, the components on the stats area
262 (i-search line, statsline and tab bar), plus probably a few others.
263 See CreateWindow() and CreateDocument() for more info.
265 Each document actually 'lives' within its splitPane widget member,
266 which can be raised to become the 'top' (visible) document by function
267 RaiseDocument(). The non-top documents may still be accessed through
268 macros, or the context menu on the tab bar.
270 Prior to the introduction of tabbed mode, each window may house only
271 one document, making it effectively an 'editor window', hence the name
272 WindowInfo. This struct name has been preserved to ease the transition
273 when tabbed mode was introduced after NEdit 5.4.
275 typedef struct _WindowInfo {
276 struct _WindowInfo *next;
277 Widget shell; /* application shell of window */
278 Widget mainWin; /* main window of shell */
279 Widget splitPane; /* paned win. for splitting text area */
280 Widget textArea; /* the first text editing area widget */
281 Widget textPanes[MAX_PANES]; /* additional ones created on demand */
282 Widget lastFocus; /* the last pane to have kbd. focus */
283 Widget statsLine; /* file stats information display */
284 Widget statsLineForm;
285 Widget statsLineColNo; /* Line/Column information display */
286 Widget iSearchForm; /* incremental search line widgets */
287 Widget iSearchFindButton;
288 Widget iSearchText;
289 Widget iSearchClearButton;
290 Widget iSearchRegexToggle;
291 Widget iSearchCaseToggle;
292 Widget iSearchRevToggle;
293 Widget menuBar; /* the main menu bar */
294 Widget tabBar; /* tab bar for tabbed window */
295 Widget tab; /* tab for this document */
296 Widget replaceDlog; /* replace dialog */
297 Widget replaceText; /* replace dialog settable widgets... */
298 Widget replaceWithText;
299 Widget replaceCaseToggle;
300 Widget replaceWordToggle;
301 Widget replaceRegexToggle;
302 Widget replaceRevToggle;
303 Widget replaceKeepBtn;
304 Widget replaceBtns;
305 Widget replaceBtn;
306 Widget replaceAllBtn;
307 #ifndef REPLACE_SCOPE
308 Widget replaceInWinBtn;
309 Widget replaceInSelBtn;
310 #endif
311 Widget replaceSearchTypeBox;
312 Widget replaceFindBtn;
313 Widget replaceAndFindBtn;
314 Widget findDlog; /* find dialog */
315 Widget findText; /* find dialog settable widgets... */
316 Widget findCaseToggle;
317 Widget findWordToggle;
318 Widget findRegexToggle;
319 Widget findRevToggle;
320 Widget findKeepBtn;
321 Widget findBtns;
322 Widget findBtn;
323 Widget findSearchTypeBox;
324 Widget replaceMultiFileDlog; /* Replace in multiple files */
325 Widget replaceMultiFileList;
326 Widget replaceMultiFilePathBtn;
327 Widget fontDialog; /* NULL, unless font dialog is up */
328 Widget colorDialog; /* NULL, unless color dialog is up */
329 Widget readOnlyItem; /* menu bar settable widgets... */
330 Widget autoSaveItem;
331 Widget saveLastItem;
332 Widget openSelItem;
333 Widget newOppositeItem;
334 Widget closeItem;
335 Widget printSelItem;
336 Widget undoItem;
337 Widget redoItem;
338 Widget cutItem;
339 Widget delItem;
340 Widget copyItem;
341 Widget lowerItem;
342 Widget upperItem;
343 Widget findSelItem;
344 Widget findAgainItem;
345 Widget replaceFindAgainItem;
346 Widget replaceAgainItem;
347 Widget gotoSelItem;
348 Widget langModeCascade;
349 Widget findDefItem;
350 Widget showTipItem;
351 Widget autoIndentOffItem;
352 Widget autoIndentItem;
353 Widget smartIndentItem;
354 Widget noWrapItem;
355 Widget newlineWrapItem;
356 Widget continuousWrapItem;
357 Widget showTabBarItem;
358 Widget statsLineItem;
359 Widget iSearchLineItem;
360 Widget lineNumsItem;
361 Widget showMatchingOffItem;
362 Widget showMatchingDelimitItem;
363 Widget showMatchingRangeItem;
364 Widget matchSyntaxBasedItem;
365 Widget overtypeModeItem;
366 Widget highlightItem;
367 Widget windowMenuPane;
368 Widget shellMenuPane;
369 Widget macroMenuPane;
370 Widget bgMenuPane;
371 Widget tabMenuPane;
372 Widget prevOpenMenuPane;
373 Widget prevOpenMenuItem;
374 Widget unloadTagsMenuPane;
375 Widget unloadTagsMenuItem;
376 Widget unloadTipsMenuPane;
377 Widget unloadTipsMenuItem;
378 Widget filterItem;
379 Widget autoIndentOffDefItem;
380 Widget autoIndentDefItem;
381 Widget smartIndentDefItem;
382 Widget autoSaveDefItem;
383 Widget saveLastDefItem;
384 Widget noWrapDefItem;
385 Widget newlineWrapDefItem;
386 Widget contWrapDefItem;
387 Widget showMatchingOffDefItem;
388 Widget showMatchingDelimitDefItem;
389 Widget showMatchingRangeDefItem;
390 Widget matchSyntaxBasedDefItem;
391 Widget highlightOffDefItem;
392 Widget highlightDefItem;
393 Widget backlightCharsItem;
394 Widget backlightCharsDefItem;
395 Widget searchDlogsDefItem;
396 Widget beepOnSearchWrapDefItem;
397 Widget keepSearchDlogsDefItem;
398 Widget searchWrapsDefItem;
399 Widget appendLFItem;
400 Widget sortOpenPrevDefItem;
401 Widget allTagsDefItem;
402 Widget smartTagsDefItem;
403 Widget reposDlogsDefItem;
404 Widget autoScrollDefItem;
405 Widget openInTabDefItem;
406 Widget tabBarDefItem;
407 Widget tabBarHideDefItem;
408 Widget toolTipsDefItem;
409 Widget tabNavigateDefItem;
410 Widget tabSortDefItem;
411 Widget statsLineDefItem;
412 Widget iSearchLineDefItem;
413 Widget lineNumsDefItem;
414 Widget pathInWindowsMenuDefItem;
415 Widget modWarnDefItem;
416 Widget modWarnRealDefItem;
417 Widget exitWarnDefItem;
418 Widget searchLiteralDefItem;
419 Widget searchCaseSenseDefItem;
420 Widget searchLiteralWordDefItem;
421 Widget searchCaseSenseWordDefItem;
422 Widget searchRegexNoCaseDefItem;
423 Widget searchRegexDefItem;
424 #ifdef REPLACE_SCOPE
425 Widget replScopeWinDefItem;
426 Widget replScopeSelDefItem;
427 Widget replScopeSmartDefItem;
428 #endif
429 Widget size24x80DefItem;
430 Widget size40x80DefItem;
431 Widget size60x80DefItem;
432 Widget size80x80DefItem;
433 Widget sizeCustomDefItem;
434 Widget cancelShellItem;
435 Widget learnItem;
436 Widget finishLearnItem;
437 Widget cancelMacroItem;
438 Widget replayItem;
439 Widget repeatItem;
440 Widget splitPaneItem;
441 Widget closePaneItem;
442 Widget detachDocumentItem;
443 Widget moveDocumentItem;
444 Widget contextMoveDocumentItem;
445 Widget contextDetachDocumentItem;
446 Widget bgMenuUndoItem;
447 Widget bgMenuRedoItem;
448 #ifdef SGI_CUSTOM
449 Widget shortMenusDefItem;
450 Widget toggleShortItems[MAX_SHORTENED_ITEMS]; /* Menu items to be
451 managed and unmanaged to toggle
452 short menus on and off */
453 int nToggleShortItems;
454 #endif
455 char filename[MAXPATHLEN]; /* name component of file being edited*/
456 char path[MAXPATHLEN]; /* path component of file being edited*/
457 unsigned fileMode; /* permissions of file being edited */
458 uid_t fileUid; /* last recorded user id of the file */
459 gid_t fileGid; /* last recorded group id of the file */
460 int fileFormat; /* whether to save the file straight
461 (Unix format), or convert it to
462 MS DOS style with \r\n line breaks */
463 time_t lastModTime; /* time of last modification to file */
464 dev_t device; /* device where the file resides */
465 ino_t inode; /* file's inode */
466 UndoInfo *undo; /* info for undoing last operation */
467 UndoInfo *redo; /* info for redoing last undone op */
468 textBuffer *buffer; /* holds the text being edited */
469 int nPanes; /* number of additional text editing
470 areas, created by splitWindow */
471 int autoSaveCharCount; /* count of single characters typed
472 since last backup file generated */
473 int autoSaveOpCount; /* count of editing operations "" */
474 int undoOpCount; /* count of stored undo operations */
475 int undoMemUsed; /* amount of memory (in bytes)
476 dedicated to the undo list */
477 char fontName[MAX_FONT_LEN]; /* names of the text fonts in use */
478 char italicFontName[MAX_FONT_LEN];
479 char boldFontName[MAX_FONT_LEN];
480 char boldItalicFontName[MAX_FONT_LEN];
481 XmFontList fontList; /* fontList for the primary font */
482 XFontStruct *italicFontStruct; /* fontStructs for highlighting fonts */
483 XFontStruct *boldFontStruct;
484 XFontStruct *boldItalicFontStruct;
485 XtIntervalId flashTimeoutID; /* timer procedure id for getting rid
486 of highlighted matching paren. Non-
487 zero val. means highlight is drawn */
488 int flashPos; /* position saved for erasing matching
489 paren highlight (if one is drawn) */
490 int wasSelected; /* last selection state (for dim/undim
491 of selection related menu items */
492 Boolean filenameSet; /* is the window still "Untitled"? */
493 Boolean fileChanged; /* has window been modified? */
494 Boolean fileMissing; /* is the window's file gone? */
495 int lockReasons; /* all ways a file can be locked */
496 Boolean autoSave; /* is autosave turned on? */
497 Boolean saveOldVersion; /* keep old version in filename.bck */
498 char indentStyle; /* whether/how to auto indent */
499 char wrapMode; /* line wrap style: NO_WRAP,
500 NEWLINE_WRAP or CONTINUOUS_WRAP */
501 Boolean overstrike; /* is overstrike mode turned on ? */
502 char showMatchingStyle; /* How to show matching parens:
503 NO_FLASH, FLASH_DELIMIT, or
504 FLASH_RANGE */
505 char matchSyntaxBased; /* Use syntax info to show matching */
506 Boolean showStats; /* is stats line supposed to be shown */
507 Boolean showISearchLine; /* is incr. search line to be shown */
508 Boolean showLineNumbers; /* is the line number display shown */
509 Boolean highlightSyntax; /* is syntax highlighting turned on? */
510 Boolean backlightChars; /* is char backlighting turned on? */
511 char *backlightCharTypes; /* what backlighting to use */
512 Boolean modeMessageDisplayed; /* special stats line banner for learn
513 and shell command executing modes */
514 char *modeMessage; /* stats line banner content for learn
515 and shell command executing modes */
516 Boolean ignoreModify; /* ignore modifications to text area */
517 Boolean windowMenuValid; /* is window menu up to date? */
518 int rHistIndex, fHistIndex; /* history placeholders for */
519 int iSearchHistIndex; /* find and replace dialogs */
520 int iSearchStartPos; /* start pos. of current incr. search */
521 int iSearchLastBeginPos; /* beg. pos. last match of current i.s.*/
522 int nMarks; /* number of active bookmarks */
523 XtIntervalId markTimeoutID; /* backup timer for mark event handler*/
524 Bookmark markTable[MAX_MARKS]; /* marked locations in window */
525 void *highlightData; /* info for syntax highlighting */
526 void *shellCmdData; /* when a shell command is executing,
527 info. about it, otherwise, NULL */
528 void *macroCmdData; /* same for macro commands */
529 void *smartIndentData; /* compiled macros for smart indent */
530 Atom fileClosedAtom; /* Atom used to tell nc that the file is closed */
531 int languageMode; /* identifies language mode currently
532 selected in the window */
533 Boolean multiFileReplSelected; /* selected during last multi-window
534 replacement operation (history) */
535 struct _WindowInfo** /* temporary list of writable windows */
536 writableWindows; /* used during multi-file replacements */
537 int nWritableWindows; /* number of elements in the list */
538 Bool multiFileBusy; /* suppresses multiple beeps/dialogs
539 during multi-file replacements */
540 Bool replaceFailed; /* flags replacements failures during
541 multi-file replacements */
542 Bool replaceLastRegexCase; /* last state of the case sense button
543 in regex mode for replace dialog */
544 Bool replaceLastLiteralCase; /* idem, for literal mode */
545 Bool iSearchLastRegexCase; /* idem, for regex mode in
546 incremental search bar */
547 Bool iSearchLastLiteralCase; /* idem, for literal mode */
548 Bool findLastRegexCase; /* idem, for regex mode in find dialog */
549 Bool findLastLiteralCase; /* idem, for literal mode */
551 #ifdef REPLACE_SCOPE
552 int replaceScope; /* Current scope for replace dialog */
553 Widget replaceScopeWinToggle; /* Scope for replace = window */
554 Widget replaceScopeSelToggle; /* Scope for replace = selection */
555 Widget replaceScopeMultiToggle;/* Scope for replace = multiple files */
556 #endif
557 UserMenuCache *userMenuCache; /* cache user menus: */
558 UserBGMenuCache userBGMenuCache; /* shell & macro menu are shared over all
559 "tabbed" documents, while each document
560 has its own background menu. */
561 } WindowInfo;
563 extern WindowInfo *WindowList;
564 extern Display *TheDisplay;
565 extern Widget TheAppShell;
566 extern char *ArgV0;
567 extern Boolean IsServer;
569 #endif /* NEDIT_NEDIT_H_INCLUDED */