2 * File-Selector dialog of GhostView 1.5, incorporated in XBoard by H.G.Muller
4 * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
6 * Permission to use, copy, modify, and distribute this software and its
7 * documentation for any purpose and without fee is hereby granted, provided
8 * that the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Software Research Associates not be used
11 * in advertising or publicity pertaining to distribution of the software
12 * without specific, written prior permission. Software Research Associates
13 * makes no representations about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied warranty.
16 * SOFTWARE RESEARCH ASSOCIATES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
18 * IN NO EVENT SHALL SOFTWARE RESEARCH ASSOCIATES BE LIABLE FOR ANY SPECIAL,
19 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
21 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
24 * Author: Erik M. van der Poel
25 * Software Research Associates, Inc., Tokyo, Japan
29 #include <X11/Intrinsic.h>
30 #include <X11/StringDefs.h>
32 #include <X11/Xaw/Text.h>
33 #include <X11/Xaw/AsciiText.h>
35 #define SEL_FILE_CANCEL -1
37 #define SEL_FILE_NULL 1
38 #define SEL_FILE_TEXT 2
40 #define SF_DO_SCROLL 1
41 #define SF_DO_NOT_SCROLL 0
43 #define NR 3 /* [HGM] (so far failed) attempt to suppress some of the director listings */
67 extern char SFcurrentPath[], SFstartDir[], SFcurrentDir[];
82 extern Display *SFdisplay;
84 extern int SFcharWidth, SFcharHeight, SFcharAscent;
88 extern int SFdirEnd, SFdirPtr;
90 extern Pixel SFfore, SFback;
92 extern Atom SFwmDeleteWindow;
94 extern XSegment SFsegs[], SFcompletionSegs[];
96 extern XawTextPosition SFtextPos;
103 SFbuttonReleaseList();
106 SFvSliderMovedCallback(),
107 SFvFloatSliderMovedCallback(),
108 SFhSliderMovedCallback(),
109 SFpathSliderMovedCallback(),
110 SFvAreaSelectedCallback(),
111 SFhAreaSelectedCallback(),
112 SFpathAreaSelectedCallback();
114 extern int SFupperX, SFlowerY, SFupperY;
116 extern int SFtextX, SFtextYoffset;
118 extern int SFentryWidth, SFentryHeight;
120 extern int SFlineToTextH, SFlineToTextV;
122 extern int SFbesideText, SFaboveAndBelowText;
124 extern int SFcharsPerEntry;
126 extern int SFlistSize;
128 extern int SFcurrentInvert[];
130 extern int SFworkProcAdded;
132 extern Boolean SFworkProc();
134 extern XtAppContext SFapp;
136 extern int SFpathScrollWidth, SFvScrollHeight, SFhScrollWidth;
138 extern char SFtextBuffer[];
140 extern char SFfilterBuffer[];
142 extern int SFbuttonPressed;
144 extern int SFcompareEntries();
146 extern void SFdirModTimer();
148 extern char SFstatChar();
150 extern XtIntervalId SFdirModTimerId;
152 extern int (*SFfunc)();
154 extern Boolean SFpathFlag; // [HGM]