24 |
#include <ctype.h> |
#include <ctype.h> |
25 |
|
|
26 |
XmTextPosition |
XmTextPosition |
27 |
arshell_end_of_word(XmTextPosition start) |
arshell_end_of_word (XmTextPosition start) |
28 |
{ |
{ |
29 |
char *text=XmTextGetString(arshell.gui.widgets.work); |
char *text = XmTextGetString (arshell.gui.widgets.work); |
30 |
XmTextPosition counter=start; |
XmTextPosition counter = start; |
31 |
XmTextPosition last=XmTextGetLastPosition(arshell.gui.widgets.work); |
XmTextPosition last = XmTextGetLastPosition (arshell.gui.widgets.work); |
32 |
while((text[counter]!=' ')&(counter<=last)) |
while ((text[counter] != ' ') & (counter <= last)) |
33 |
counter++; |
counter++; |
34 |
free(text); |
free (text); |
35 |
if(counter>last) |
if (counter > last) |
36 |
return(start); |
return (start); |
37 |
else |
else |
38 |
return(counter); |
return (counter); |
39 |
} |
} |
40 |
|
|
41 |
void |
void |
42 |
arshell_find_selected() |
arshell_find_selected () |
43 |
{ |
{ |
44 |
char *selection=XmTextGetSelection(arshell.gui.widgets.work); |
char *selection = XmTextGetSelection (arshell.gui.widgets.work); |
45 |
XmTextPosition left; |
XmTextPosition left; |
46 |
XmTextPosition right; |
XmTextPosition right; |
47 |
XmTextPosition position; |
XmTextPosition position; |
48 |
XmTextGetSelectionPosition(arshell.gui.widgets.work, |
XmTextGetSelectionPosition (arshell.gui.widgets.work, &left, &right); |
49 |
&left, &right); |
if (selection != NULL) |
|
if(selection != NULL) |
|
50 |
{ |
{ |
51 |
Boolean found=XmTextFindString(arshell.gui.widgets.work, |
Boolean found = XmTextFindString (arshell.gui.widgets.work, |
52 |
right, selection, |
right, selection, |
53 |
XmTEXT_BACKWARD, &position); |
XmTEXT_BACKWARD, &position); |
54 |
if(found) |
if (found) |
55 |
{ |
{ |
56 |
XmTextSetInsertionPosition(arshell.gui.widgets.work, position); |
XmTextSetInsertionPosition (arshell.gui.widgets.work, position); |
57 |
XmTextSetSelection(arshell.gui.widgets.work, position, |
XmTextSetSelection (arshell.gui.widgets.work, position, |
58 |
arshell_end_of_word(position), |
arshell_end_of_word (position), |
59 |
XtLastTimestampProcessed(antiright.display)); |
XtLastTimestampProcessed (antiright.display)); |
60 |
} |
} |
61 |
else |
else |
62 |
antiright_status("Not Found"); |
antiright_status ("Not Found"); |
63 |
} |
} |
64 |
|
|
65 |
XtFree(selection); |
XtFree (selection); |
66 |
} |
} |
67 |
|
|
68 |
void |
void |
69 |
arshell_find_at_cursor_cb() |
arshell_find_at_cursor_cb () |
70 |
{ |
{ |
71 |
char *buffer=XmTextGetString(arshell.gui.widgets.work); |
char *buffer = XmTextGetString (arshell.gui.widgets.work); |
72 |
char word[255]; |
char word[255]; |
73 |
int word_counter=0; |
int word_counter = 0; |
74 |
XmTextPosition position=XmTextGetInsertionPosition(arshell.gui.widgets.work); |
XmTextPosition position = |
75 |
|
XmTextGetInsertionPosition (arshell.gui.widgets.work); |
76 |
XmTextPosition begin_position; |
XmTextPosition begin_position; |
77 |
while(buffer[position]!=' ') |
while (buffer[position] != ' ') |
78 |
{ |
{ |
79 |
position--; |
position--; |
80 |
} |
} |
81 |
begin_position=position; |
begin_position = position; |
82 |
position++; |
position++; |
83 |
while(buffer[position]!=' ') |
while (buffer[position] != ' ') |
84 |
{ |
{ |
85 |
word[word_counter]=buffer[position]; |
word[word_counter] = buffer[position]; |
86 |
word_counter++; |
word_counter++; |
87 |
position++; |
position++; |
88 |
} |
} |
89 |
word[word_counter]='\0'; |
word[word_counter] = '\0'; |
90 |
XmTextFindString(arshell.gui.widgets.work, position, word, |
XmTextFindString (arshell.gui.widgets.work, position, word, |
91 |
XmTEXT_FORWARD, &position); |
XmTEXT_FORWARD, &position); |
92 |
if(position < XmTextGetLastPosition(arshell.gui.widgets.work)) |
if (position < XmTextGetLastPosition (arshell.gui.widgets.work)) |
93 |
XmTextSetInsertionPosition(arshell.gui.widgets.work, position); |
XmTextSetInsertionPosition (arshell.gui.widgets.work, position); |
94 |
XtFree(buffer); |
XtFree (buffer); |
95 |
} |
} |
96 |
|
|
97 |
void |
void |
98 |
arshell_wrap_toggle_cb() |
arshell_wrap_toggle_cb () |
99 |
{ |
{ |
100 |
arshell.edit.search_options.wrap= |
arshell.edit.search_options.wrap = |
101 |
XmToggleButtonGetState(arshell.edit.search_options.wrap_toggle); |
XmToggleButtonGetState (arshell.edit.search_options.wrap_toggle); |
102 |
XmToggleButtonSetState(arshell.edit.search_options.preserve_toggle, |
XmToggleButtonSetState (arshell.edit.search_options.preserve_toggle, |
103 |
arshell.edit.search_options.wrap, True); |
arshell.edit.search_options.wrap, True); |
104 |
} |
} |
105 |
|
|
106 |
void |
void |
107 |
arshell_preserve_toggle_cb() |
arshell_preserve_toggle_cb () |
108 |
{ |
{ |
109 |
arshell.edit.search_options.preserve= |
arshell.edit.search_options.preserve = |
110 |
XmToggleButtonGetState(arshell.edit.search_options.preserve_toggle); |
XmToggleButtonGetState (arshell.edit.search_options.preserve_toggle); |
111 |
} |
} |
112 |
|
|
113 |
void |
void |
114 |
arshell_set_replacing_sensitivities() |
arshell_set_replacing_sensitivities () |
115 |
{ |
{ |
116 |
ARCLARG; |
ARCLARG; |
117 |
antiright_set(XmNsensitive, True); |
antiright_set (XmNsensitive, True); |
118 |
antiright_set_values(arshell.edit.replace_widget); |
antiright_set_values (arshell.edit.replace_widget); |
119 |
antiright_set_values(arshell.edit.search_options.replace_label); |
antiright_set_values (arshell.edit.search_options.replace_label); |
120 |
ARCLARG; |
ARCLARG; |
121 |
} |
} |
122 |
|
|
123 |
void |
void |
124 |
arshell_unset_replacing_sensitivities() |
arshell_unset_replacing_sensitivities () |
125 |
{ |
{ |
126 |
ARCLARG; |
ARCLARG; |
127 |
antiright_set(XmNsensitive, False); |
antiright_set (XmNsensitive, False); |
128 |
antiright_set_values(arshell.edit.replace_widget); |
antiright_set_values (arshell.edit.replace_widget); |
129 |
antiright_set_values(arshell.edit.search_options.replace_label); |
antiright_set_values (arshell.edit.search_options.replace_label); |
130 |
ARCLARG; |
ARCLARG; |
131 |
} |
} |
132 |
|
|
133 |
void |
void |
134 |
arshell_replace_toggle_cb() |
arshell_replace_toggle_cb () |
135 |
{ |
{ |
136 |
arshell.edit.search_options.replace= |
arshell.edit.search_options.replace = |
137 |
XmToggleButtonGetState(arshell.edit.search_options.replace_toggle); |
XmToggleButtonGetState (arshell.edit.search_options.replace_toggle); |
138 |
|
|
139 |
if(arshell.edit.search_options.replace) |
if (arshell.edit.search_options.replace) |
140 |
arshell_set_replacing_sensitivities(); |
arshell_set_replacing_sensitivities (); |
141 |
else |
else |
142 |
arshell_unset_replacing_sensitivities(); |
arshell_unset_replacing_sensitivities (); |
143 |
} |
} |
144 |
|
|
145 |
void |
void |
146 |
arshell_ignore_case_toggle_cb() |
arshell_ignore_case_toggle_cb () |
147 |
{ |
{ |
148 |
arshell.edit.search_options.ignore_case= |
arshell.edit.search_options.ignore_case = |
149 |
XmToggleButtonGetState(arshell.edit.search_options.ignore_case_toggle); |
XmToggleButtonGetState (arshell.edit.search_options.ignore_case_toggle); |
150 |
} |
} |
151 |
|
|
152 |
void |
void |
153 |
arshell_search_replace_ok_cb(Widget widget, |
arshell_search_replace_ok_cb (Widget widget, |
154 |
XtPointer client_data, |
XtPointer client_data, XtPointer call_data) |
|
XtPointer call_data) |
|
155 |
{ |
{ |
156 |
XmTextPosition position; |
XmTextPosition position; |
157 |
char *search_string; |
char *search_string; |
158 |
char *backup_text=NULL; |
char *backup_text = NULL; |
159 |
/* The find widget is always used. */ |
/* The find widget is always used. */ |
160 |
search_string=XmTextFieldGetString(arshell.edit.find_widget); |
search_string = XmTextFieldGetString (arshell.edit.find_widget); |
161 |
assert(search_string != NULL); |
assert (search_string != NULL); |
162 |
if(XmToggleButtonGetState(arshell.edit.search_options.ignore_case_toggle)) |
if (XmToggleButtonGetState (arshell.edit.search_options.ignore_case_toggle)) |
163 |
{ |
{ |
164 |
/* Convert the text buffer and search string to lower case so |
/* Convert the text buffer and search string to lower case so |
165 |
that case is not a factor in the search. */ |
that case is not a factor in the search. */ |
166 |
int counter=0; |
int counter = 0; |
167 |
char *lowered_buffer; |
char *lowered_buffer; |
168 |
while(search_string[counter]!='\0') |
while (search_string[counter] != '\0') |
169 |
{ |
{ |
170 |
search_string[counter]=tolower(search_string[counter]); |
search_string[counter] = tolower (search_string[counter]); |
171 |
counter++; |
counter++; |
172 |
} |
} |
173 |
backup_text=XmTextGetString(arshell.gui.widgets.work); |
backup_text = XmTextGetString (arshell.gui.widgets.work); |
174 |
lowered_buffer=XmTextGetString(arshell.gui.widgets.work); |
lowered_buffer = XmTextGetString (arshell.gui.widgets.work); |
175 |
counter=0; |
counter = 0; |
176 |
while(lowered_buffer[counter]!='\0') |
while (lowered_buffer[counter] != '\0') |
177 |
{ |
{ |
178 |
lowered_buffer[counter]=tolower(lowered_buffer[counter]); |
lowered_buffer[counter] = tolower (lowered_buffer[counter]); |
179 |
counter++; |
counter++; |
180 |
} |
} |
181 |
XmTextSetString(arshell.gui.widgets.work, lowered_buffer); |
XmTextSetString (arshell.gui.widgets.work, lowered_buffer); |
182 |
} |
} |
183 |
client_data=NULL; |
client_data = NULL; |
184 |
|
|
185 |
if(arshell.edit.search_options.replace) |
if (arshell.edit.search_options.replace) |
186 |
{ |
{ |
187 |
XmTextPosition end_position; |
XmTextPosition end_position; |
188 |
char *replacement_string; |
char *replacement_string; |
189 |
|
|
190 |
XmTextFindString(arshell.gui.widgets.work, |
XmTextFindString (arshell.gui.widgets.work, |
191 |
XmTextGetInsertionPosition(arshell.gui.widgets.work), |
XmTextGetInsertionPosition (arshell.gui.widgets.work), |
192 |
search_string, |
search_string, |
193 |
arshell.edit.search_options.direction, |
arshell.edit.search_options.direction, &position); |
|
&position); |
|
194 |
/* Restore the buffer if it was converted to lower case during a |
/* Restore the buffer if it was converted to lower case during a |
195 |
search with "Ignore Case" set. */ |
search with "Ignore Case" set. */ |
196 |
if(XmToggleButtonGetState(arshell.edit.search_options.ignore_case_toggle)) |
if (XmToggleButtonGetState |
197 |
|
(arshell.edit.search_options.ignore_case_toggle)) |
198 |
{ |
{ |
199 |
XmTextSetString(arshell.gui.widgets.work, backup_text); |
XmTextSetString (arshell.gui.widgets.work, backup_text); |
200 |
XtFree(backup_text); |
XtFree (backup_text); |
201 |
} |
} |
202 |
|
|
203 |
XtFree(search_string); |
XtFree (search_string); |
204 |
|
|
205 |
XmTextFindString(arshell.gui.widgets.work, |
XmTextFindString (arshell.gui.widgets.work, |
206 |
position, |
position, " ", XmTEXT_FORWARD, &end_position); |
207 |
" ", |
|
208 |
XmTEXT_FORWARD, |
replacement_string = XmTextFieldGetString (arshell.edit.replace_widget); |
209 |
&end_position); |
if (end_position > position) |
|
|
|
|
replacement_string=XmTextFieldGetString(arshell.edit.replace_widget); |
|
|
if(end_position>position) |
|
210 |
{ |
{ |
211 |
|
|
212 |
XmTextReplace(arshell.gui.widgets.work, position, end_position, |
XmTextReplace (arshell.gui.widgets.work, position, end_position, |
213 |
replacement_string); |
replacement_string); |
214 |
|
|
215 |
} |
} |
216 |
else |
else |
217 |
{ |
{ |
218 |
|
|
219 |
if(arshell.edit.search_options.wrap |
if (arshell.edit.search_options.wrap |
220 |
&& !arshell.edit.search_options.wrapped) |
&& !arshell.edit.search_options.wrapped) |
221 |
{ |
{ |
222 |
|
|
223 |
arshell.edit.search_options.direction=XmTEXT_BACKWARD; |
arshell.edit.search_options.direction = XmTEXT_BACKWARD; |
224 |
arshell.edit.search_options.wrapped=True; |
arshell.edit.search_options.wrapped = True; |
225 |
|
|
226 |
} |
} |
227 |
else |
else |
228 |
{ |
{ |
229 |
arshell.edit.search_options.preserve=False; |
arshell.edit.search_options.preserve = False; |
230 |
} |
} |
231 |
|
|
232 |
} |
} |
233 |
|
|
234 |
XtFree(replacement_string); |
XtFree (replacement_string); |
235 |
if(arshell.edit.search_options.direction==XmTEXT_FORWARD) |
if (arshell.edit.search_options.direction == XmTEXT_FORWARD) |
236 |
XmTextSetInsertionPosition(arshell.gui.widgets.work, |
XmTextSetInsertionPosition (arshell.gui.widgets.work, |
237 |
arshell_end_of_word(position)); |
arshell_end_of_word (position)); |
238 |
else |
else |
239 |
XmTextSetInsertionPosition(arshell.gui.widgets.work, position-1); |
XmTextSetInsertionPosition (arshell.gui.widgets.work, position - 1); |
240 |
/* The above use of the position before POSITION prevents |
/* The above use of the position before POSITION prevents |
241 |
the current word from being the highlighted search result |
the current word from being the highlighted search result |
242 |
when the search directoion is BACKWARD. */ |
when the search directoion is BACKWARD. */ |
243 |
XmTextSetSelection(arshell.gui.widgets.work, position, |
XmTextSetSelection (arshell.gui.widgets.work, position, |
244 |
arshell_end_of_word(position), |
arshell_end_of_word (position), |
245 |
XtLastTimestampProcessed(antiright.display)); |
XtLastTimestampProcessed (antiright.display)); |
246 |
if(arshell.edit.search_options.preserve) |
if (arshell.edit.search_options.preserve) |
247 |
XtManageChild(widget); |
XtManageChild (widget); |
248 |
call_data=NULL; |
call_data = NULL; |
249 |
|
|
250 |
} |
} |
251 |
else |
else |
252 |
{ |
{ |
253 |
Boolean result; |
Boolean result; |
254 |
|
|
255 |
|
|
256 |
|
|
257 |
assert(arshell.gui.widgets.work != NULL); |
assert (arshell.gui.widgets.work != NULL); |
258 |
|
|
259 |
result=XmTextFindString(arshell.gui.widgets.work, |
result = XmTextFindString (arshell.gui.widgets.work, |
260 |
XmTextGetInsertionPosition |
XmTextGetInsertionPosition |
261 |
(arshell.gui.widgets.work), |
(arshell.gui.widgets.work), |
262 |
search_string, |
search_string, |
263 |
arshell.edit.search_options.direction, |
arshell.edit.search_options.direction, |
264 |
&position); |
&position); |
265 |
/* Restore the buffer if it was converted to lower case during a |
/* Restore the buffer if it was converted to lower case during a |
266 |
search with "Ignore Case" set. */ |
search with "Ignore Case" set. */ |
267 |
if(XmToggleButtonGetState(arshell.edit.search_options.ignore_case_toggle)) |
if (XmToggleButtonGetState |
268 |
|
(arshell.edit.search_options.ignore_case_toggle)) |
269 |
{ |
{ |
270 |
XmTextSetString(arshell.gui.widgets.work, backup_text); |
XmTextSetString (arshell.gui.widgets.work, backup_text); |
271 |
XtFree(backup_text); |
XtFree (backup_text); |
272 |
} |
} |
273 |
|
|
274 |
if(result) |
if (result) |
275 |
{ |
{ |
276 |
|
|
277 |
XmTextSetSelection(arshell.gui.widgets.work, position, |
XmTextSetSelection (arshell.gui.widgets.work, position, |
278 |
arshell_end_of_word(position), |
arshell_end_of_word (position), |
279 |
XtLastTimestampProcessed(antiright.display)); |
XtLastTimestampProcessed (antiright.display)); |
280 |
if(arshell.edit.search_options.direction==XmTEXT_FORWARD) |
if (arshell.edit.search_options.direction == XmTEXT_FORWARD) |
281 |
XmTextSetInsertionPosition(arshell.gui.widgets.work, |
XmTextSetInsertionPosition (arshell.gui.widgets.work, |
282 |
arshell_end_of_word(position)); |
arshell_end_of_word (position)); |
283 |
else |
else |
284 |
XmTextSetInsertionPosition(arshell.gui.widgets.work, position-1); |
XmTextSetInsertionPosition (arshell.gui.widgets.work, |
285 |
|
position - 1); |
286 |
/* The above use of the position before POSITION prevents |
/* The above use of the position before POSITION prevents |
287 |
the current word from being the highlighted search result |
the current word from being the highlighted search result |
288 |
when the search directoion is BACKWARD. */ |
when the search directoion is BACKWARD. */ |
289 |
} |
} |
290 |
else |
else |
291 |
{ |
{ |
292 |
|
|
293 |
if(XmToggleButtonGetState(arshell.edit.search_options.wrap_toggle)) |
if (XmToggleButtonGetState |
294 |
|
(arshell.edit.search_options.wrap_toggle)) |
295 |
{ |
{ |
296 |
|
|
297 |
arshell.edit.search_options.direction=XmTEXT_BACKWARD; |
arshell.edit.search_options.direction = XmTEXT_BACKWARD; |
298 |
XmToggleButtonSetState |
XmToggleButtonSetState |
299 |
(arshell.edit.search_options.preserve_toggle, True, False); |
(arshell.edit.search_options.preserve_toggle, True, False); |
300 |
XmToggleButtonSetState(arshell.edit.search_options.wrap_toggle, |
XmToggleButtonSetState (arshell.edit.search_options.wrap_toggle, |
301 |
False, False); |
False, False); |
302 |
} |
} |
303 |
|
|
304 |
} |
} |
305 |
|
|
306 |
if(XmToggleButtonGetState(arshell.edit.search_options.preserve_toggle)) |
if (XmToggleButtonGetState |
307 |
XtManageChild(widget); |
(arshell.edit.search_options.preserve_toggle)) |
308 |
|
XtManageChild (widget); |
309 |
XtFree(search_string); |
|
310 |
|
XtFree (search_string); |
311 |
|
|
312 |
} |
} |
313 |
} |
} |
314 |
|
|
315 |
|
|
316 |
void |
void |
317 |
arshell_search_replace_cb(Widget widget, |
arshell_search_replace_cb (Widget widget, |
318 |
XtPointer client_data, |
XtPointer client_data, XtPointer call_data) |
|
XtPointer call_data) |
|
319 |
{ |
{ |
320 |
Widget prompt; |
Widget prompt; |
321 |
Widget form; |
Widget form; |
322 |
client_data=NULL; |
client_data = NULL; |
323 |
ARCLARG; |
ARCLARG; |
324 |
antiright_set(XmNtitle, (XtArgVal)"Find and Replace"); |
antiright_set (XmNtitle, (XtArgVal) "Find and Replace"); |
325 |
prompt=XmCreateMessageDialog(antiright.parent_widget, |
prompt = XmCreateMessageDialog (antiright.parent_widget, |
326 |
"Find and Replace", |
"Find and Replace", |
327 |
antiright.arguments, |
antiright.arguments, |
328 |
antiright.arguments_int); |
antiright.arguments_int); |
329 |
XtManageChild(prompt); |
XtManageChild (prompt); |
330 |
arshell.edit.search_options.direction=XmTEXT_FORWARD; |
arshell.edit.search_options.direction = XmTEXT_FORWARD; |
331 |
ARCLARG; |
ARCLARG; |
332 |
form=antiright_form(prompt); |
form = antiright_form (prompt); |
333 |
ARCLARG; |
ARCLARG; |
334 |
antiright_form_positions(0, 25, 0, 25); |
antiright_form_positions (0, 25, 0, 25); |
335 |
antiright_set(XmNalignment, XmALIGNMENT_END); |
antiright_set (XmNalignment, XmALIGNMENT_END); |
336 |
antiright_label(form, "Find:"); |
antiright_label (form, "Find:"); |
337 |
ARCLARG; |
ARCLARG; |
338 |
antiright_form_positions(0, 25, 25, 100); |
antiright_form_positions (0, 25, 25, 100); |
339 |
arshell.edit.find_widget=XmCreateTextField(form, "find_widget", |
arshell.edit.find_widget = XmCreateTextField (form, "find_widget", |
|
antiright.arguments, |
|
|
antiright.arguments_int); |
|
|
antiright_set_tooltip(arshell.edit.find_widget, |
|
|
"Enter the text that is to be found here."); |
|
|
XtManageChild(arshell.edit.find_widget); |
|
|
ARCLARG; |
|
|
antiright_form_positions(25, 50, 0, 25); |
|
|
antiright_set(XmNalignment, XmALIGNMENT_END); |
|
|
antiright_set(XmNsensitive, False); |
|
|
arshell.edit.search_options.replace_label=antiright_label(form, "Replace:"); |
|
|
ARCLARG; |
|
|
antiright_form_positions(25, 50, 25, 100); |
|
|
antiright_set(XmNsensitive, False); |
|
|
arshell.edit.replace_widget=XmCreateTextField(form, "replace_widget", |
|
340 |
antiright.arguments, |
antiright.arguments, |
341 |
antiright.arguments_int); |
antiright.arguments_int); |
342 |
antiright_set_tooltip(arshell.edit.replace_widget, |
antiright_set_tooltip (arshell.edit.find_widget, |
343 |
"Enter the replacement text here."); |
"Enter the text that is to be found here."); |
344 |
XtManageChild(arshell.edit.replace_widget); |
XtManageChild (arshell.edit.find_widget); |
345 |
ARCLARG; |
ARCLARG; |
346 |
antiright_form_positions(50, 75, 0, 50); |
antiright_form_positions (25, 50, 0, 25); |
347 |
arshell.edit.search_options.replace_toggle= |
antiright_set (XmNalignment, XmALIGNMENT_END); |
348 |
XmCreateToggleButton(form, "Replace", ARARGS); |
antiright_set (XmNsensitive, False); |
349 |
XtManageChild(arshell.edit.search_options.replace_toggle); |
arshell.edit.search_options.replace_label = |
350 |
XtAddCallback(arshell.edit.search_options.replace_toggle, |
antiright_label (form, "Replace:"); |
351 |
XmNvalueChangedCallback, arshell_replace_toggle_cb, NULL); |
ARCLARG; |
352 |
ARCLARG; |
antiright_form_positions (25, 50, 25, 100); |
353 |
antiright_form_positions(50, 75, 50, 100); |
antiright_set (XmNsensitive, False); |
354 |
arshell.edit.search_options.wrap_toggle=XmCreateToggleButton(form, "Wrap", |
arshell.edit.replace_widget = XmCreateTextField (form, "replace_widget", |
355 |
ARARGS); |
antiright.arguments, |
356 |
XtManageChild(arshell.edit.search_options.wrap_toggle); |
antiright.arguments_int); |
357 |
XtAddCallback(arshell.edit.search_options.wrap_toggle, |
antiright_set_tooltip (arshell.edit.replace_widget, |
358 |
XmNvalueChangedCallback, arshell_wrap_toggle_cb, NULL); |
"Enter the replacement text here."); |
359 |
ARCLARG; |
XtManageChild (arshell.edit.replace_widget); |
360 |
antiright_form_positions(75, 100, 0, 50); |
ARCLARG; |
361 |
arshell.edit.search_options.ignore_case_toggle= |
antiright_form_positions (50, 75, 0, 50); |
362 |
XmCreateToggleButton(form, "Ignore Case", ARARGS); |
arshell.edit.search_options.replace_toggle = |
363 |
XtManageChild(arshell.edit.search_options.ignore_case_toggle); |
XmCreateToggleButton (form, "Replace", ARARGS); |
364 |
XtAddCallback(arshell.edit.search_options.ignore_case_toggle, |
XtManageChild (arshell.edit.search_options.replace_toggle); |
365 |
XmNvalueChangedCallback, arshell_ignore_case_toggle_cb, NULL); |
XtAddCallback (arshell.edit.search_options.replace_toggle, |
366 |
ARCLARG; |
XmNvalueChangedCallback, arshell_replace_toggle_cb, NULL); |
367 |
antiright_form_positions(75, 100, 50, 100); |
ARCLARG; |
368 |
arshell.edit.search_options.preserve_toggle= |
antiright_form_positions (50, 75, 50, 100); |
369 |
XmCreateToggleButton(form, "Preserve Dialog", ARARGS); |
arshell.edit.search_options.wrap_toggle = |
370 |
XtManageChild(arshell.edit.search_options.preserve_toggle); |
XmCreateToggleButton (form, "Wrap", ARARGS); |
371 |
XtAddCallback(arshell.edit.search_options.preserve_toggle, |
XtManageChild (arshell.edit.search_options.wrap_toggle); |
372 |
XmNvalueChangedCallback, arshell_preserve_toggle_cb, NULL); |
XtAddCallback (arshell.edit.search_options.wrap_toggle, |
373 |
|
XmNvalueChangedCallback, arshell_wrap_toggle_cb, NULL); |
374 |
XtAddCallback(prompt, |
ARCLARG; |
375 |
XmNokCallback, |
antiright_form_positions (75, 100, 0, 50); |
376 |
arshell_search_replace_ok_cb, |
arshell.edit.search_options.ignore_case_toggle = |
377 |
NULL); |
XmCreateToggleButton (form, "Ignore Case", ARARGS); |
378 |
XtAddCallback(prompt, |
XtManageChild (arshell.edit.search_options.ignore_case_toggle); |
379 |
XmNhelpCallback, |
XtAddCallback (arshell.edit.search_options.ignore_case_toggle, |
380 |
antiright_help_cb, |
XmNvalueChangedCallback, arshell_ignore_case_toggle_cb, |
381 |
"Enter_the_text_that_you_want_to_find_and/or_replace_in_the_" |
NULL); |
382 |
"appropriate_text_field."); |
ARCLARG; |
383 |
|
antiright_form_positions (75, 100, 50, 100); |
384 |
|
arshell.edit.search_options.preserve_toggle = |
385 |
|
XmCreateToggleButton (form, "Preserve Dialog", ARARGS); |
386 |
|
XtManageChild (arshell.edit.search_options.preserve_toggle); |
387 |
|
XtAddCallback (arshell.edit.search_options.preserve_toggle, |
388 |
|
XmNvalueChangedCallback, arshell_preserve_toggle_cb, NULL); |
389 |
|
|
390 |
|
XtAddCallback (prompt, XmNokCallback, arshell_search_replace_ok_cb, NULL); |
391 |
|
XtAddCallback (prompt, |
392 |
|
XmNhelpCallback, |
393 |
|
antiright_help_cb, |
394 |
|
"Enter_the_text_that_you_want_to_find_and/or_replace_in_the_" |
395 |
|
"appropriate_text_field."); |
396 |
|
|
397 |
widget=(Widget)NULL; |
widget = (Widget) NULL; |
398 |
call_data=(XtPointer)NULL; |
call_data = (XtPointer) NULL; |
399 |
} |
} |