Added missing shell/macroMenuValid initializations.
[nedit.git] / source / preferences.h
blob66ecbc803ba3e22b00385ec7fc41823b3d17a67e
1 /* $Id: preferences.h,v 1.38 2004/01/16 02:59:15 tksoh Exp $ */
3 #ifndef NEDIT_PREFERENCES_H_INCLUDED
4 #define NEDIT_PREFERENCES_H_INCLUDED
6 #include "nedit.h"
8 #include <X11/Intrinsic.h>
9 #include <X11/Xresource.h>
10 #include <Xm/Xm.h>
11 #include <X11/Xlib.h>
13 #define PLAIN_LANGUAGE_MODE -1
15 /* maximum number of language modes allowed */
16 #define MAX_LANGUAGE_MODES 127
18 #define MAX_TITLE_FORMAT_LEN 50
20 /* Identifiers for individual fonts in the help fonts list */
21 enum helpFonts {HELP_FONT, BOLD_HELP_FONT, ITALIC_HELP_FONT,
22 BOLD_ITALIC_HELP_FONT, FIXED_HELP_FONT, BOLD_FIXED_HELP_FONT,
23 ITALIC_FIXED_HELP_FONT, BOLD_ITALIC_FIXED_HELP_FONT, HELP_LINK_FONT,
24 H1_HELP_FONT, H2_HELP_FONT, H3_HELP_FONT, NUM_HELP_FONTS
27 XrmDatabase CreateNEditPrefDB(int *argcInOut, char **argvInOut);
28 void RestoreNEditPrefs(XrmDatabase prefDB, XrmDatabase appDB);
29 void SaveNEditPrefs(Widget parent, int quietly);
30 void ImportPrefFile(const char *filename, int convertOld);
31 void MarkPrefsChanged(void);
32 int CheckPrefsChangesSaved(Widget dialogParent);
33 void SetPrefWrap(int state);
34 int GetPrefWrap(int langMode);
35 void SetPrefWrapMargin(int margin);
36 int GetPrefWrapMargin(void);
37 void SetPrefSearchDlogs(int state);
38 int GetPrefSearchDlogs(void);
39 void SetPrefKeepSearchDlogs(int state);
40 int GetPrefKeepSearchDlogs(void);
41 void SetPrefSearchWraps(int state);
42 int GetPrefSearchWraps(void);
43 void SetPrefStatsLine(int state);
44 int GetPrefStatsLine(void);
45 void SetPrefISearchLine(int state);
46 int GetPrefISearchLine(void);
47 void SetPrefTabBar(int state);
48 int GetPrefTabBar(void);
49 void SetPrefTabBarHideOne(int state);
50 int GetPrefTabBarHideOne(void);
51 void SetPrefGlobalTabNavigate(int state);
52 int GetPrefGlobalTabNavigate(void);
53 void SetPrefToolTips(int state);
54 int GetPrefToolTips(void);
55 void SetPrefLineNums(int state);
56 int GetPrefLineNums(void);
57 void SetPrefShowPathInWindowsMenu(int state);
58 int GetPrefShowPathInWindowsMenu(void);
59 void SetPrefWarnFileMods(int state);
60 int GetPrefWarnFileMods(void);
61 void SetPrefWarnRealFileMods(int state);
62 int GetPrefWarnRealFileMods(void);
63 void SetPrefWarnExit(int state);
64 int GetPrefWarnExit(void);
65 void SetPrefSearch(int searchType);
66 int GetPrefSearch(void);
67 void SetPrefAutoIndent(int state);
68 int GetPrefAutoIndent(int langMode);
69 void SetPrefAutoSave(int state);
70 int GetPrefAutoSave(void);
71 void SetPrefSaveOldVersion(int state);
72 int GetPrefSaveOldVersion(void);
73 void SetPrefRows(int nRows);
74 int GetPrefRows(void);
75 void SetPrefCols(int nCols);
76 int GetPrefCols(void);
77 void SetPrefTabDist(int tabDist);
78 int GetPrefTabDist(int langMode);
79 void SetPrefEmTabDist(int tabDist);
80 int GetPrefEmTabDist(int langMode);
81 void SetPrefInsertTabs(int state);
82 int GetPrefInsertTabs(void);
83 void SetPrefShowMatching(int state);
84 int GetPrefShowMatching(void);
85 void SetPrefMatchSyntaxBased(int state);
86 int GetPrefMatchSyntaxBased(void);
87 void SetPrefHighlightSyntax(int state);
88 int GetPrefHighlightSyntax(void);
89 void SetPrefBacklightChars(int state);
90 int GetPrefBacklightChars(void);
91 void SetPrefBacklightCharTypes(char *types);
92 char *GetPrefBacklightCharTypes(void);
93 void SetPrefRepositionDialogs(int state);
94 int GetPrefRepositionDialogs(void);
95 void SetPrefAppendLF(int state);
96 int GetPrefAppendLF(void);
97 void SetPrefSortOpenPrevMenu(int state);
98 int GetPrefSortOpenPrevMenu(void);
99 void SetPrefTagFile(const char *tagFileName);
100 char *GetPrefTagFile(void);
101 int GetPrefSmartTags(void);
102 void SetPrefSmartTags(int state);
103 int GetPrefAlwaysCheckRelTagsSpecs(void);
104 void SetPrefFont(char *fontName);
105 void SetPrefBoldFont(char *fontName);
106 void SetPrefItalicFont(char *fontName);
107 void SetPrefBoldItalicFont(char *fontName);
108 char *GetPrefFontName(void);
109 char *GetPrefBoldFontName(void);
110 char *GetPrefItalicFontName(void);
111 char *GetPrefBoldItalicFontName(void);
112 XmFontList GetPrefFontList(void);
113 XFontStruct *GetPrefBoldFont(void);
114 XFontStruct *GetPrefItalicFont(void);
115 XFontStruct *GetPrefBoldItalicFont(void);
116 char *GetPrefTooltipBgColor(void);
117 char *GetPrefHelpFontName(int index);
118 char *GetPrefHelpLinkColor();
119 char *GetPrefColorName(int colorIndex);
120 void SetPrefColorName(int colorIndex, const char *color);
121 void SetPrefShell(const char *shell);
122 char *GetPrefShell(void);
123 void SetPrefGeometry(const char *geometry);
124 char *GetPrefGeometry(void);
125 char *GetPrefServerName(void);
126 char *GetPrefBGMenuBtn(void);
127 void RowColumnPrefDialog(Widget parent);
128 void TabsPrefDialog(Widget parent, WindowInfo *forWindow);
129 void WrapMarginDialog(Widget parent, WindowInfo *forWindow);
130 void SetPrefMapDelete(int state);
131 int GetPrefMapDelete(void);
132 void SetPrefStdOpenDialog(int state);
133 int GetPrefStdOpenDialog(void);
134 char *GetPrefDelimiters(void);
135 int GetPrefMaxPrevOpenFiles(void);
136 int GetPrefTypingHidesPointer(void);
137 #ifdef SGI_CUSTOM
138 void SetPrefShortMenus(int state);
139 int GetPrefShortMenus(void);
140 #endif
141 void EditLanguageModes();
142 void ChooseFonts(WindowInfo *window, int forWindow);
143 void ChooseColors(WindowInfo *window);
144 char *LanguageModeName(int mode);
145 char *GetWindowDelimiters(WindowInfo *window);
146 int ReadNumericField(char **inPtr, int *value);
147 char *ReadSymbolicField(char **inPtr);
148 char *ReadSymbolicFieldTextWidget(Widget textW, const char *fieldName, int silent);
149 int ReadQuotedString(char **inPtr, char **errMsg, char **string);
150 char *MakeQuotedString(const char *string);
151 char *EscapeSensitiveChars(const char *string);
152 int SkipDelimiter(char **inPtr, char **errMsg);
153 int SkipOptSeparator(char separator, char **inPtr);
154 int ParseError(Widget toDialog, const char *stringStart, const char *stoppedAt,
155 const char *errorIn, const char *message);
156 int AllocatedStringsDiffer(const char *s1, const char *s2);
157 void SetLanguageMode(WindowInfo *window, int mode, int forceNewDefaults);
158 int FindLanguageMode(const char *languageName);
159 void UnloadLanguageModeTipsFile(WindowInfo *window);
160 void DetermineLanguageMode(WindowInfo *window, int forceNewDefaults);
161 Widget CreateLanguageModeMenu(Widget parent, XtCallbackProc cbProc,
162 void *cbArg);
163 void SetLangModeMenu(Widget optMenu, const char *modeName);
164 Widget CreateLanguageModeSubMenu(WindowInfo *window, Widget parent, char *name,
165 char *label, char mnemonic);
166 void SetPrefFindReplaceUsesSelection(int state);
167 int GetPrefFindReplaceUsesSelection(void);
168 int GetPrefStickyCaseSenseBtn(void);
169 void SetPrefStickyCaseSenseBtn(int state);
170 void SetPrefBeepOnSearchWrap(int state);
171 int GetPrefBeepOnSearchWrap(void);
172 #ifdef REPLACE_SCOPE
173 void SetPrefReplaceDefScope(int scope);
174 int GetPrefReplaceDefScope(void);
175 #endif
176 void SetPrefTitleFormat(const char* format);
177 const char* GetPrefTitleFormat(void);
178 int GetPrefOverrideVirtKeyBindings(void);
179 void SetPrefTabbedMode(int state);
180 int GetPrefTabbedMode(void);
181 void SetPrefUndoModifiesSelection(Boolean);
182 void SetPrefTabbedMode(int state);
183 int GetPrefTabbedMode(void);
184 void SetPrefTabbedMode(int state);
185 int GetPrefTabbedMode(void);
186 Boolean GetPrefUndoModifiesSelection(void);
187 int GetPrefOverrideVirtKeyBindings(void);
189 #endif /* NEDIT_PREFERENCES_H_INCLUDED */