Xft support under OpenMotif 2.3.3 - I've been using this for quite a while on
[nedit.git] / source / nedit.h
blob71ece001930ff843d0d92a12c9771ad7338796dd
1 /* $Id: nedit.h,v 1.69 2008/01/04 22:11:03 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 statsLineItem;
358 Widget iSearchLineItem;
359 Widget lineNumsItem;
360 Widget showMatchingOffItem;
361 Widget showMatchingDelimitItem;
362 Widget showMatchingRangeItem;
363 Widget matchSyntaxBasedItem;
364 Widget overtypeModeItem;
365 Widget highlightItem;
366 Widget windowMenuPane;
367 Widget shellMenuPane;
368 Widget macroMenuPane;
369 Widget bgMenuPane;
370 Widget tabMenuPane;
371 Widget prevOpenMenuPane;
372 Widget prevOpenMenuItem;
373 Widget unloadTagsMenuPane;
374 Widget unloadTagsMenuItem;
375 Widget unloadTipsMenuPane;
376 Widget unloadTipsMenuItem;
377 Widget filterItem;
378 Widget autoIndentOffDefItem;
379 Widget autoIndentDefItem;
380 Widget smartIndentDefItem;
381 Widget autoSaveDefItem;
382 Widget saveLastDefItem;
383 Widget noWrapDefItem;
384 Widget newlineWrapDefItem;
385 Widget contWrapDefItem;
386 Widget showMatchingOffDefItem;
387 Widget showMatchingDelimitDefItem;
388 Widget showMatchingRangeDefItem;
389 Widget matchSyntaxBasedDefItem;
390 Widget highlightOffDefItem;
391 Widget highlightDefItem;
392 Widget backlightCharsItem;
393 Widget backlightCharsDefItem;
394 Widget searchDlogsDefItem;
395 Widget beepOnSearchWrapDefItem;
396 Widget keepSearchDlogsDefItem;
397 Widget searchWrapsDefItem;
398 Widget appendLFItem;
399 Widget sortOpenPrevDefItem;
400 Widget allTagsDefItem;
401 Widget smartTagsDefItem;
402 Widget reposDlogsDefItem;
403 Widget autoScrollDefItem;
404 Widget openInTabDefItem;
405 Widget tabBarDefItem;
406 Widget tabBarHideDefItem;
407 Widget toolTipsDefItem;
408 Widget tabNavigateDefItem;
409 Widget tabSortDefItem;
410 Widget statsLineDefItem;
411 Widget iSearchLineDefItem;
412 Widget lineNumsDefItem;
413 Widget pathInWindowsMenuDefItem;
414 Widget modWarnDefItem;
415 Widget modWarnRealDefItem;
416 Widget exitWarnDefItem;
417 Widget searchLiteralDefItem;
418 Widget searchCaseSenseDefItem;
419 Widget searchLiteralWordDefItem;
420 Widget searchCaseSenseWordDefItem;
421 Widget searchRegexNoCaseDefItem;
422 Widget searchRegexDefItem;
423 #ifdef REPLACE_SCOPE
424 Widget replScopeWinDefItem;
425 Widget replScopeSelDefItem;
426 Widget replScopeSmartDefItem;
427 #endif
428 Widget size24x80DefItem;
429 Widget size40x80DefItem;
430 Widget size60x80DefItem;
431 Widget size80x80DefItem;
432 Widget sizeCustomDefItem;
433 Widget cancelShellItem;
434 Widget learnItem;
435 Widget finishLearnItem;
436 Widget cancelMacroItem;
437 Widget replayItem;
438 Widget repeatItem;
439 Widget splitPaneItem;
440 Widget closePaneItem;
441 Widget detachDocumentItem;
442 Widget moveDocumentItem;
443 Widget contextMoveDocumentItem;
444 Widget contextDetachDocumentItem;
445 Widget bgMenuUndoItem;
446 Widget bgMenuRedoItem;
447 #ifdef SGI_CUSTOM
448 Widget shortMenusDefItem;
449 Widget toggleShortItems[MAX_SHORTENED_ITEMS]; /* Menu items to be
450 managed and unmanaged to toggle
451 short menus on and off */
452 int nToggleShortItems;
453 #endif
454 char filename[MAXPATHLEN]; /* name component of file being edited*/
455 char path[MAXPATHLEN]; /* path component of file being edited*/
456 unsigned fileMode; /* permissions of file being edited */
457 uid_t fileUid; /* last recorded user id of the file */
458 gid_t fileGid; /* last recorded group id of the file */
459 int fileFormat; /* whether to save the file straight
460 (Unix format), or convert it to
461 MS DOS style with \r\n line breaks */
462 time_t lastModTime; /* time of last modification to file */
463 dev_t device; /* device where the file resides */
464 ino_t inode; /* file's inode */
465 UndoInfo *undo; /* info for undoing last operation */
466 UndoInfo *redo; /* info for redoing last undone op */
467 textBuffer *buffer; /* holds the text being edited */
468 int nPanes; /* number of additional text editing
469 areas, created by splitWindow */
470 int autoSaveCharCount; /* count of single characters typed
471 since last backup file generated */
472 int autoSaveOpCount; /* count of editing operations "" */
473 int undoOpCount; /* count of stored undo operations */
474 int undoMemUsed; /* amount of memory (in bytes)
475 dedicated to the undo list */
476 char fontName[MAX_FONT_LEN]; /* names of the text fonts in use */
477 char italicFontName[MAX_FONT_LEN];
478 char boldFontName[MAX_FONT_LEN];
479 char boldItalicFontName[MAX_FONT_LEN];
480 XmFontList fontList; /* fontList for the primary font */
481 XFontStruct *italicFontStruct; /* fontStructs for highlighting fonts */
482 XFontStruct *boldFontStruct;
483 XFontStruct *boldItalicFontStruct;
484 XtIntervalId flashTimeoutID; /* timer procedure id for getting rid
485 of highlighted matching paren. Non-
486 zero val. means highlight is drawn */
487 int flashPos; /* position saved for erasing matching
488 paren highlight (if one is drawn) */
489 int wasSelected; /* last selection state (for dim/undim
490 of selection related menu items */
491 Boolean filenameSet; /* is the window still "Untitled"? */
492 Boolean fileChanged; /* has window been modified? */
493 Boolean fileMissing; /* is the window's file gone? */
494 int lockReasons; /* all ways a file can be locked */
495 Boolean autoSave; /* is autosave turned on? */
496 Boolean saveOldVersion; /* keep old version in filename.bck */
497 char indentStyle; /* whether/how to auto indent */
498 char wrapMode; /* line wrap style: NO_WRAP,
499 NEWLINE_WRAP or CONTINUOUS_WRAP */
500 Boolean overstrike; /* is overstrike mode turned on ? */
501 char showMatchingStyle; /* How to show matching parens:
502 NO_FLASH, FLASH_DELIMIT, or
503 FLASH_RANGE */
504 char matchSyntaxBased; /* Use syntax info to show matching */
505 Boolean showStats; /* is stats line supposed to be shown */
506 Boolean showISearchLine; /* is incr. search line to be shown */
507 Boolean showLineNumbers; /* is the line number display shown */
508 Boolean highlightSyntax; /* is syntax highlighting turned on? */
509 Boolean backlightChars; /* is char backlighting turned on? */
510 char *backlightCharTypes; /* what backlighting to use */
511 Boolean modeMessageDisplayed; /* special stats line banner for learn
512 and shell command executing modes */
513 char *modeMessage; /* stats line banner content for learn
514 and shell command executing modes */
515 Boolean ignoreModify; /* ignore modifications to text area */
516 Boolean windowMenuValid; /* is window menu up to date? */
517 int rHistIndex, fHistIndex; /* history placeholders for */
518 int iSearchHistIndex; /* find and replace dialogs */
519 int iSearchStartPos; /* start pos. of current incr. search */
520 int iSearchLastBeginPos; /* beg. pos. last match of current i.s.*/
521 int nMarks; /* number of active bookmarks */
522 XtIntervalId markTimeoutID; /* backup timer for mark event handler*/
523 Bookmark markTable[MAX_MARKS]; /* marked locations in window */
524 void *highlightData; /* info for syntax highlighting */
525 void *shellCmdData; /* when a shell command is executing,
526 info. about it, otherwise, NULL */
527 void *macroCmdData; /* same for macro commands */
528 void *smartIndentData; /* compiled macros for smart indent */
529 Atom fileClosedAtom; /* Atom used to tell nc that the file is closed */
530 int languageMode; /* identifies language mode currently
531 selected in the window */
532 Boolean multiFileReplSelected; /* selected during last multi-window
533 replacement operation (history) */
534 struct _WindowInfo** /* temporary list of writable windows */
535 writableWindows; /* used during multi-file replacements */
536 int nWritableWindows; /* number of elements in the list */
537 Bool multiFileBusy; /* suppresses multiple beeps/dialogs
538 during multi-file replacements */
539 Bool replaceFailed; /* flags replacements failures during
540 multi-file replacements */
541 Bool replaceLastRegexCase; /* last state of the case sense button
542 in regex mode for replace dialog */
543 Bool replaceLastLiteralCase; /* idem, for literal mode */
544 Bool iSearchLastRegexCase; /* idem, for regex mode in
545 incremental search bar */
546 Bool iSearchLastLiteralCase; /* idem, for literal mode */
547 Bool findLastRegexCase; /* idem, for regex mode in find dialog */
548 Bool findLastLiteralCase; /* idem, for literal mode */
550 #ifdef REPLACE_SCOPE
551 int replaceScope; /* Current scope for replace dialog */
552 Widget replaceScopeWinToggle; /* Scope for replace = window */
553 Widget replaceScopeSelToggle; /* Scope for replace = selection */
554 Widget replaceScopeMultiToggle;/* Scope for replace = multiple files */
555 #endif
556 UserMenuCache *userMenuCache; /* cache user menus: */
557 UserBGMenuCache userBGMenuCache; /* shell & macro menu are shared over all
558 "tabbed" documents, while each document
559 has its own background menu. */
560 } WindowInfo;
562 extern WindowInfo *WindowList;
563 extern Display *TheDisplay;
564 extern Widget TheAppShell;
565 extern char *ArgV0;
566 extern Boolean IsServer;
568 #endif /* NEDIT_NEDIT_H_INCLUDED */