Xft support under OpenMotif 2.3.3 - I've been using this for quite a while on
[nedit.git] / source / preferences.h
blob09c4bc8b0deb9de71e5a689ce442b1293f1efd4f
1 /* $Id: preferences.h,v 1.57 2008/01/04 22:11:03 yooden Exp $ */
2 /*******************************************************************************
3 * *
4 * preference.h -- Nirvana Editor Preferences 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_PREFERENCES_H_INCLUDED
29 #define NEDIT_PREFERENCES_H_INCLUDED
31 #include "nedit.h"
33 #include <X11/Intrinsic.h>
34 #include <X11/Xresource.h>
35 #include <Xm/Xm.h>
36 #include <X11/Xlib.h>
38 #define PLAIN_LANGUAGE_MODE -1
40 /* maximum number of language modes allowed */
41 #define MAX_LANGUAGE_MODES 127
43 #define MAX_TITLE_FORMAT_LEN 50
45 /* Identifiers for individual fonts in the help fonts list */
46 enum helpFonts {HELP_FONT, BOLD_HELP_FONT, ITALIC_HELP_FONT,
47 BOLD_ITALIC_HELP_FONT, FIXED_HELP_FONT, BOLD_FIXED_HELP_FONT,
48 ITALIC_FIXED_HELP_FONT, BOLD_ITALIC_FIXED_HELP_FONT, HELP_LINK_FONT,
49 H1_HELP_FONT, H2_HELP_FONT, H3_HELP_FONT, NUM_HELP_FONTS
52 XrmDatabase CreateNEditPrefDB(int *argcInOut, char **argvInOut);
53 void RestoreNEditPrefs(XrmDatabase prefDB, XrmDatabase appDB);
54 void SaveNEditPrefs(Widget parent, int quietly);
55 void ImportPrefFile(const char *filename, int convertOld);
56 void MarkPrefsChanged(void);
57 int CheckPrefsChangesSaved(Widget dialogParent);
58 void SetPrefWrap(int state);
59 int GetPrefWrap(int langMode);
60 void SetPrefWrapMargin(int margin);
61 int GetPrefWrapMargin(void);
62 void SetPrefSearchDlogs(int state);
63 int GetPrefSearchDlogs(void);
64 void SetPrefKeepSearchDlogs(int state);
65 int GetPrefKeepSearchDlogs(void);
66 void SetPrefSearchWraps(int state);
67 int GetPrefSearchWraps(void);
68 void SetPrefStatsLine(int state);
69 int GetPrefStatsLine(void);
70 void SetPrefISearchLine(int state);
71 int GetPrefISearchLine(void);
72 void SetPrefTabBar(int state);
73 int GetPrefTabBar(void);
74 void SetPrefSortTabs(int state);
75 int GetPrefSortTabs(void);
76 void SetPrefTabBarHideOne(int state);
77 int GetPrefTabBarHideOne(void);
78 void SetPrefGlobalTabNavigate(int state);
79 int GetPrefGlobalTabNavigate(void);
80 void SetPrefToolTips(int state);
81 int GetPrefToolTips(void);
82 void SetPrefLineNums(int state);
83 int GetPrefLineNums(void);
84 void SetPrefShowPathInWindowsMenu(int state);
85 int GetPrefShowPathInWindowsMenu(void);
86 void SetPrefWarnFileMods(int state);
87 int GetPrefWarnFileMods(void);
88 void SetPrefWarnRealFileMods(int state);
89 int GetPrefWarnRealFileMods(void);
90 void SetPrefWarnExit(int state);
91 int GetPrefWarnExit(void);
92 void SetPrefSearch(int searchType);
93 int GetPrefSearch(void);
94 void SetPrefAutoIndent(int state);
95 int GetPrefAutoIndent(int langMode);
96 void SetPrefAutoSave(int state);
97 int GetPrefAutoSave(void);
98 void SetPrefSaveOldVersion(int state);
99 int GetPrefSaveOldVersion(void);
100 void SetPrefRows(int nRows);
101 int GetPrefRows(void);
102 void SetPrefCols(int nCols);
103 int GetPrefCols(void);
104 void SetPrefTabDist(int tabDist);
105 int GetPrefTabDist(int langMode);
106 void SetPrefEmTabDist(int tabDist);
107 int GetPrefEmTabDist(int langMode);
108 void SetPrefInsertTabs(int state);
109 int GetPrefInsertTabs(void);
110 void SetPrefShowMatching(int state);
111 int GetPrefShowMatching(void);
112 void SetPrefMatchSyntaxBased(int state);
113 int GetPrefMatchSyntaxBased(void);
114 void SetPrefHighlightSyntax(Boolean state);
115 Boolean GetPrefHighlightSyntax(void);
116 void SetPrefBacklightChars(int state);
117 int GetPrefBacklightChars(void);
118 void SetPrefBacklightCharTypes(char *types);
119 char *GetPrefBacklightCharTypes(void);
120 void SetPrefRepositionDialogs(int state);
121 int GetPrefRepositionDialogs(void);
122 void SetPrefAutoScroll(int state);
123 int GetPrefAutoScroll(void);
124 int GetVerticalAutoScroll(void);
125 void SetPrefAppendLF(int state);
126 int GetPrefAppendLF(void);
127 void SetPrefSortOpenPrevMenu(int state);
128 int GetPrefSortOpenPrevMenu(void);
129 char *GetPrefTagFile(void);
130 int GetPrefSmartTags(void);
131 void SetPrefSmartTags(int state);
132 int GetPrefAlwaysCheckRelTagsSpecs(void);
133 void SetPrefFont(char *fontName);
134 void SetPrefBoldFont(char *fontName);
135 void SetPrefItalicFont(char *fontName);
136 void SetPrefBoldItalicFont(char *fontName);
137 char *GetPrefFontName(void);
138 char *GetPrefBoldFontName(void);
139 char *GetPrefItalicFontName(void);
140 char *GetPrefBoldItalicFontName(void);
141 XmFontList GetPrefFontList(void);
142 XFontStruct *GetPrefBoldFont(void);
143 XFontStruct *GetPrefItalicFont(void);
144 XFontStruct *GetPrefBoldItalicFont(void);
145 char *GetPrefTooltipBgColor(void);
146 char *GetPrefHelpFontName(int index);
147 char *GetPrefHelpLinkColor(void);
148 char *GetPrefColorName(int colorIndex);
149 void SetPrefColorName(int colorIndex, const char *color);
150 void SetPrefShell(const char *shell);
151 const char* GetPrefShell(void);
152 char *GetPrefGeometry(void);
153 char *GetPrefServerName(void);
154 char *GetPrefBGMenuBtn(void);
155 void RowColumnPrefDialog(Widget parent);
156 void TabsPrefDialog(Widget parent, WindowInfo *forWindow);
157 void WrapMarginDialog(Widget parent, WindowInfo *forWindow);
158 int GetPrefMapDelete(void);
159 int GetPrefStdOpenDialog(void);
160 char *GetPrefDelimiters(void);
161 int GetPrefMaxPrevOpenFiles(void);
162 int GetPrefTypingHidesPointer(void);
163 #ifdef SGI_CUSTOM
164 void SetPrefShortMenus(int state);
165 int GetPrefShortMenus(void);
166 #endif
167 void SelectShellDialog(Widget parent, WindowInfo* forWindow);
168 void EditLanguageModes(void);
169 void ChooseFonts(WindowInfo *window, int forWindow);
170 void ChooseColors(WindowInfo *window);
171 char *LanguageModeName(int mode);
172 char *GetWindowDelimiters(const WindowInfo *window);
173 int ReadNumericField(char **inPtr, int *value);
174 char *ReadSymbolicField(char **inPtr);
175 char *ReadSymbolicFieldTextWidget(Widget textW, const char *fieldName, int silent);
176 int ReadQuotedString(char **inPtr, char **errMsg, char **string);
177 char *MakeQuotedString(const char *string);
178 char *EscapeSensitiveChars(const char *string);
179 int SkipDelimiter(char **inPtr, char **errMsg);
180 int SkipOptSeparator(char separator, char **inPtr);
181 int ParseError(Widget toDialog, const char *stringStart, const char *stoppedAt,
182 const char *errorIn, const char *message);
183 int AllocatedStringsDiffer(const char *s1, const char *s2);
184 void SetLanguageMode(WindowInfo *window, int mode, int forceNewDefaults);
185 int FindLanguageMode(const char *languageName);
186 void UnloadLanguageModeTipsFile(WindowInfo *window);
187 void DetermineLanguageMode(WindowInfo *window, int forceNewDefaults);
188 Widget CreateLanguageModeMenu(Widget parent, XtCallbackProc cbProc,
189 void *cbArg);
190 void SetLangModeMenu(Widget optMenu, const char *modeName);
191 void CreateLanguageModeSubMenu(WindowInfo* window, const Widget parent,
192 const char* name, const char* label, const char mnemonic);
193 void SetPrefFindReplaceUsesSelection(int state);
194 int GetPrefFindReplaceUsesSelection(void);
195 int GetPrefStickyCaseSenseBtn(void);
196 void SetPrefBeepOnSearchWrap(int state);
197 int GetPrefBeepOnSearchWrap(void);
198 #ifdef REPLACE_SCOPE
199 void SetPrefReplaceDefScope(int scope);
200 int GetPrefReplaceDefScope(void);
201 #endif
202 void SetPrefTitleFormat(const char* format);
203 const char* GetPrefTitleFormat(void);
204 int GetPrefOverrideVirtKeyBindings(void);
205 int GetPrefTruncSubstitution(void);
206 int GetPrefOpenInTab(void);
207 void SetPrefUndoModifiesSelection(Boolean);
208 void SetPrefOpenInTab(int state);
209 Boolean GetPrefUndoModifiesSelection(void);
210 Boolean GetPrefFocusOnRaise(void);
211 Boolean GetPrefHonorSymlinks(void);
212 Boolean GetPrefForceOSConversion(void);
213 void SetPrefFocusOnRaise(Boolean);
215 #endif /* NEDIT_PREFERENCES_H_INCLUDED */