Simplified the color dialog box so that all colors are global. Plug some
[nedit.git] / source / preferences.h
blobd3fbbf0629f15d0a582d2066ecb0333ca0ccca8f
1 /* $Id: preferences.h,v 1.34 2003/05/24 19:15:20 tringali 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 SetPrefLineNums(int state);
48 int GetPrefLineNums(void);
49 void SetPrefShowPathInWindowsMenu(int state);
50 int GetPrefShowPathInWindowsMenu(void);
51 void SetPrefWarnFileMods(int state);
52 int GetPrefWarnFileMods(void);
53 void SetPrefWarnRealFileMods(int state);
54 int GetPrefWarnRealFileMods(void);
55 void SetPrefWarnExit(int state);
56 int GetPrefWarnExit(void);
57 void SetPrefSearch(int searchType);
58 int GetPrefSearch(void);
59 void SetPrefAutoIndent(int state);
60 int GetPrefAutoIndent(int langMode);
61 void SetPrefAutoSave(int state);
62 int GetPrefAutoSave(void);
63 void SetPrefSaveOldVersion(int state);
64 int GetPrefSaveOldVersion(void);
65 void SetPrefRows(int nRows);
66 int GetPrefRows(void);
67 void SetPrefCols(int nCols);
68 int GetPrefCols(void);
69 void SetPrefTabDist(int tabDist);
70 int GetPrefTabDist(int langMode);
71 void SetPrefEmTabDist(int tabDist);
72 int GetPrefEmTabDist(int langMode);
73 void SetPrefInsertTabs(int state);
74 int GetPrefInsertTabs(void);
75 void SetPrefShowMatching(int state);
76 int GetPrefShowMatching(void);
77 void SetPrefMatchSyntaxBased(int state);
78 int GetPrefMatchSyntaxBased(void);
79 void SetPrefHighlightSyntax(int state);
80 int GetPrefHighlightSyntax(void);
81 void SetPrefBacklightChars(int state);
82 int GetPrefBacklightChars(void);
83 void SetPrefBacklightCharTypes(char *types);
84 char *GetPrefBacklightCharTypes(void);
85 void BacklightUseCurrCharTypesAsPref(WindowInfo *window, int quietly);
86 void SetPrefRepositionDialogs(int state);
87 int GetPrefRepositionDialogs(void);
88 void SetPrefAppendLF(int state);
89 int GetPrefAppendLF(void);
90 void SetPrefSortOpenPrevMenu(int state);
91 int GetPrefSortOpenPrevMenu(void);
92 void SetPrefTagFile(const char *tagFileName);
93 char *GetPrefTagFile(void);
94 int GetPrefSmartTags(void);
95 void SetPrefSmartTags(int state);
96 int GetPrefAlwaysCheckRelTagsSpecs(void);
97 void SetPrefFont(char *fontName);
98 void SetPrefBoldFont(char *fontName);
99 void SetPrefItalicFont(char *fontName);
100 void SetPrefBoldItalicFont(char *fontName);
101 char *GetPrefFontName(void);
102 char *GetPrefBoldFontName(void);
103 char *GetPrefItalicFontName(void);
104 char *GetPrefBoldItalicFontName(void);
105 XmFontList GetPrefFontList(void);
106 XFontStruct *GetPrefBoldFont(void);
107 XFontStruct *GetPrefItalicFont(void);
108 XFontStruct *GetPrefBoldItalicFont(void);
109 char *GetPrefHelpFontName(int index);
110 char *GetPrefHelpLinkColor();
111 char *GetPrefColorName(int colorIndex);
112 void SetPrefColorName(int colorIndex, const char *color);
113 void SetPrefShell(const char *shell);
114 char *GetPrefShell(void);
115 void SetPrefGeometry(const char *geometry);
116 char *GetPrefGeometry(void);
117 char *GetPrefServerName(void);
118 char *GetPrefBGMenuBtn(void);
119 void RowColumnPrefDialog(Widget parent);
120 void TabsPrefDialog(Widget parent, WindowInfo *forWindow);
121 void WrapMarginDialog(Widget parent, WindowInfo *forWindow);
122 void SetPrefMapDelete(int state);
123 int GetPrefMapDelete(void);
124 void SetPrefStdOpenDialog(int state);
125 int GetPrefStdOpenDialog(void);
126 char *GetPrefDelimiters(void);
127 int GetPrefMaxPrevOpenFiles(void);
128 int GetPrefTypingHidesPointer(void);
129 #ifdef SGI_CUSTOM
130 void SetPrefShortMenus(int state);
131 int GetPrefShortMenus(void);
132 #endif
133 void EditLanguageModes();
134 void ChooseFonts(WindowInfo *window, int forWindow);
135 void ChooseColors(WindowInfo *window, int forWindow);
136 char *LanguageModeName(int mode);
137 char *GetWindowDelimiters(WindowInfo *window);
138 int ReadNumericField(char **inPtr, int *value);
139 char *ReadSymbolicField(char **inPtr);
140 char *ReadSymbolicFieldTextWidget(Widget textW, const char *fieldName, int silent);
141 int ReadQuotedString(char **inPtr, char **errMsg, char **string);
142 char *MakeQuotedString(const char *string);
143 char *EscapeSensitiveChars(const char *string);
144 int SkipDelimiter(char **inPtr, char **errMsg);
145 int SkipOptSeparator(char separator, char **inPtr, char **errMsg);
146 int ParseError(Widget toDialog, const char *stringStart, const char *stoppedAt,
147 const char *errorIn, const char *message);
148 int AllocatedStringsDiffer(const char *s1, const char *s2);
149 void SetLanguageMode(WindowInfo *window, int mode, int forceNewDefaults);
150 int FindLanguageMode(const char *languageName);
151 void UnloadLanguageModeTipsFile(WindowInfo *window);
152 void DetermineLanguageMode(WindowInfo *window, int forceNewDefaults);
153 Widget CreateLanguageModeMenu(Widget parent, XtCallbackProc cbProc,
154 void *cbArg);
155 void SetLangModeMenu(Widget optMenu, const char *modeName);
156 Widget CreateLanguageModeSubMenu(WindowInfo *window, Widget parent, char *name,
157 char *label, char mnemonic);
158 void SetPrefFindReplaceUsesSelection(int state);
159 int GetPrefFindReplaceUsesSelection(void);
160 int GetPrefStickyCaseSenseBtn(void);
161 void SetPrefStickyCaseSenseBtn(int state);
162 void SetPrefBeepOnSearchWrap(int state);
163 int GetPrefBeepOnSearchWrap(void);
164 #ifdef REPLACE_SCOPE
165 void SetPrefReplaceDefScope(int scope);
166 int GetPrefReplaceDefScope(void);
167 #endif
168 void SetPrefTitleFormat(const char* format);
169 const char* GetPrefTitleFormat(void);
170 void SetPrefUndoModifiesSelection(Boolean);
171 void SetPrefWindowBufferMode(int state);
172 int GetPrefWindowBufferMode(void);
173 Boolean GetPrefUndoModifiesSelection(void);
174 int GetPrefOverrideVirtKeyBindings(void);
176 #endif /* NEDIT_PREFERENCES_H_INCLUDED */