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