Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 974 lines (929 sloc) 30.807 kb
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
1 ;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE
1452794 @jdtsmith Copyright/email fixes.
authored
2 ;; Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 ;; 2009, 2010 Free Software Foundation
4 ;; Author: Carsten Dominik <dominik _AT_ astro.uva.nl>
5 ;; Maintainer: J.D. Smith <jdtsmith _AT_ gmail.com>
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
6 ;; Version: VERSIONTAG
32b1b75 - Update copyright.
jdsmith authored
7 ;; Date: $Date: 2006/08/22 05:15:26 $
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
8 ;; Keywords: processes
9
10 ;; This file is part of GNU Emacs.
11
1452794 @jdtsmith Copyright/email fixes.
authored
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
13 ;; it under the terms of the GNU General Public License as published by
1452794 @jdtsmith Copyright/email fixes.
authored
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
1452794 @jdtsmith Copyright/email fixes.
authored
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
24
25 ;;; Commentary:
26
27 ;; This file implements a debugging toolbar for IDLWAVE. It requires
28 ;; Emacs or XEmacs with toolbar and xpm support.
29
6996f93 Minor doc changes.
jdsmith authored
30 ;; New versions of IDLWAVE, documentation, and more information
31 ;; available from:
32 ;; http://idlwave.org
33
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
34
35 ;;; Code:
36
37 (eval-when-compile (require 'cl))
38
39 (defun idlwave-toolbar-make-button (image)
40 (if (featurep 'xemacs)
41 (toolbar-make-button-list image)
42 (list 'image :type 'xpm :data image)))
43
286e3e1 - Update FSF address.
jdsmith authored
44 (defvar idlwave-toolbar)
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
45 (defvar default-toolbar)
286e3e1 - Update FSF address.
jdsmith authored
46 (defvar idlwave-toolbar-is-possible)
47
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
48 (if (not (or (and (featurep 'xemacs) ; This is XEmacs
49 (featurep 'xpm) ; need xpm
50 (featurep 'toolbar)) ; ... and the toolbar
51 (and (not (featurep 'xemacs)) ; This is Emacs
52 (boundp 'tool-bar-button-margin) ; need toolbar
53 (fboundp 'image-type-available-p) ; need image stuff
54 (image-type-available-p 'xpm)) ; need xpm
55 ))
56 ;; oops - cannot do the toolbar
57 (message "Sorry, IDLWAVE xpm toolbar cannot be used on this version of Emacs")
58 ;; OK, we can define a toolbar
59
60 (defconst idlwave-toolbar-is-possible t
61 "When defined, indicates that a toolbar is possible with this Emacs.")
62 (defvar idlwave-toolbar-compile-icon
63 (idlwave-toolbar-make-button
64 "/* XPM */
65 static char * file[] = {
66 \"28 28 2 1\",
67 \" c None s backgroundToolBarColor\",
68 \". c #000000000000\",
69 \" \",
70 \" \",
71 \" \",
72 \" . \",
73 \" .. ... .. \",
74 \" .... ... .... \",
75 \" ............. \",
76 \" ........... \",
77 \" ................... \",
78 \" ........ ........ \",
79 \" ..... ........ \",
80 \" .... ......... \",
81 \" ..... .. ... ..... \",
82 \" ...... .. .. ...... \",
83 \" ..... ... .. ..... \",
84 \" ......... .... \",
85 \" ........ ..... \",
86 \" ........ ........ \",
87 \" ................... \",
88 \" ........... \",
89 \" ............. \",
90 \" .... ... .... \",
91 \" .. ... .. \",
92 \" . \",
93 \" \",
94 \" \",
95 \" \",
96 \" \"};")
97 "The compile icon.")
98
99 (defvar idlwave-toolbar-next-error-icon
100 (idlwave-toolbar-make-button
101 "/* XPM */
102 static char * file[] = {
103 \"28 28 3 1\",
104 \" c None s backgroundToolBarColor\",
105 \". c #000000000000\",
106 \"R c #FFFF00000000\",
107 \" \",
108 \" \",
109 \" R \",
110 \" RR RRR RR \",
111 \" RRRR RRR RRRR \",
112 \" RRRRRRRRRRRRR \",
113 \" RRRRRRRRRRR \",
114 \" RRRRRRRRRRRRRRRRRRR \",
115 \" RRRRRRRR \",
116 \" RRRRR \",
117 \" RRRR \",
118 \" ........ \",
119 \" ........ \",
120 \" ......... \",
121 \" ..... .. ... ..... \",
122 \" ...... .. .. ...... \",
123 \" ..... ... .. ..... \",
124 \" ......... .... \",
125 \" ........ ..... \",
126 \" ........ ........ \",
127 \" ................... \",
128 \" ........... \",
129 \" ............. \",
130 \" .... ... .... \",
131 \" .. ... .. \",
132 \" . \",
133 \" \",
134 \" \"};")
135 "The Next Error icon.")
136
137 (defvar idlwave-toolbar-stop-at-icon
138 (idlwave-toolbar-make-button
139 "/* XPM */
140 static char * file[] = {
141 \"28 28 3 1\",
142 \" c None s backgroundToolBarColor\",
143 \". c #000000000000\",
144 \"R c #FFFF00000000\",
145 \" \",
146 \" \",
147 \" \",
148 \" \",
149 \" ........ \",
150 \" .RRRRRRRR. \",
151 \" .RRRRRRRRRR. \",
152 \" .RRRRRRRRRRRR. \",
153 \" .RRRRRRRRRRRRRR. \",
154 \" .RRRRRRRRRRRRRRRR. \",
155 \" .RRRRRRRRRRRRRRRRRR. \",
156 \" .RRRRRRRRRRRRRRRRRR. \",
157 \" .RRRRRRRRRRRRRRRRRR. \",
158 \" .RRRRRRRRRRRRRRRRRR. \",
159 \" .RRRRRRRRRRRRRRRRRR. \",
160 \" .RRRRRRRRRRRRRRRRRR. \",
161 \" .RRRRRRRRRRRRRRRRRR. \",
162 \" .RRRRRRRRRRRRRRRRRR. \",
163 \" .RRRRRRRRRRRRRRRR. \",
164 \" .RRRRRRRRRRRRRR. \",
165 \" .RRRRRRRRRRRR. \",
166 \" .RRRRRRRRRR. \",
167 \" .RRRRRRRR. \",
168 \" ........ \",
169 \" \",
170 \" \",
171 \" \",
172 \" \"};")
173 "The Stop At icon.")
174
175
176 (defvar idlwave-toolbar-clear-at-icon
177 (idlwave-toolbar-make-button
178 "/* XPM */
179 static char * file[] = {
180 \"28 28 3 1\",
181 \" c None s backgroundToolBarColor\",
182 \". c #000000000000\",
183 \"R c #FFFF00000000\",
184 \" \",
185 \" \",
186 \" \",
187 \" ... ... \",
188 \" ... ........ ... \",
189 \" ... .RRRRRRRR. ... \",
190 \" ....RRRRRRRRRR.... \",
191 \" ...RRRRRRRRRR... \",
192 \" ....RRRRRRRR.... \",
193 \" .RR...RRRRRR...RR. \",
194 \" .RRRR...RRRR...RRRR. \",
195 \" .RRRRR...RR...RRRRR. \",
196 \" .RRRRRR......RRRRRR. \",
197 \" .RRRRRRR....RRRRRRR. \",
198 \" .RRRRRRR....RRRRRRR. \",
199 \" .RRRRRR......RRRRRR. \",
200 \" .RRRRR...RR...RRRRR. \",
201 \" .RRRR...RRRR...RRRR. \",
202 \" .RR...RRRRRR...RR. \",
203 \" ....RRRRRRRR.... \",
204 \" ...RRRRRRRRRR... \",
205 \" ....RRRRRRRRRR.... \",
206 \" ... .RRRRRRRR. ... \",
207 \" ... ........ ... \",
208 \" ... ... \",
209 \" \",
210 \" \",
211 \" \"};")
212 "The Clear At icon.")
213
214 (defvar idlwave-toolbar-clear-all-icon
215 (idlwave-toolbar-make-button
216 "/* XPM */
217 static char * file[] = {
218 \"28 28 4 1\",
219 \" c None s backgroundToolBarColor\",
220 \". c #000000000000\",
221 \"X c #FFFFFFFFFFFF\",
222 \"R c #FFFF00000000\",
223 \" \",
224 \" \",
225 \" \",
226 \" .. .... .... .. \",
227 \" ...RRRR. .RRRR... \",
228 \" ...RRRR. .RRRR... \",
229 \" .R...RRRR. .RRRR...R. \",
230 \" .RR...RRR. .RRR...RR. \",
231 \" .RRR...RR. .RR...RRR. \",
232 \" .RRRR...R. .R...RRRR. \",
233 \" .RRRR... ...RRRR. \",
234 \" .RRRR... ...RRRR. \",
235 \" .... ... ... .... \",
236 \" ..... \",
237 \" ... \",
238 \" .... ..... .... \",
239 \" .RRRR.... ....RRRR. \",
240 \" .RRRRR... ...RRRRR. \",
241 \" .RRRRR.... ....RRRRR. \",
242 \" .RRRR...R. .R...RRRR. \",
243 \" .RRR...RR. .RR...RRR. \",
244 \" .RR...RRR. .RRR...RR. \",
245 \" ....RRR. .RRR.... \",
246 \" ...RRR. .RRR... \",
247 \" ....... ....... \",
248 \" \",
249 \" \",
250 \" \"};")
251 "The Clear-All icon.")
252
1a1c612 - Updated to IDLWAVE v5.0, including electric-debug mode, HTML help,
jdsmith authored
253 (defvar idlwave-toolbar-stop-beginning-icon
254 (idlwave-toolbar-make-button
255 "/* XPM */
256 static char * file[] = {
257 \"28 28 4 1\",
258 \" c None s backgroundToolBarColor\",
259 \". c #000000000000\",
260 \"X c #FFFF00000000\",
261 \"_ c #FFFFFFFFFFFF\",
262 \" \",
263 \" \",
264 \" \",
265 \" \",
266 \" ........ \",
267 \" .XXXXXXXX. \",
268 \" .XXXXXXXXXX. \",
269 \" .XXXXXXXXXXXX. \",
270 \" .XX..XXXXXXXXXX. \",
271 \" .XX.XX.X______XXX. \",
272 \" .XXX.XX.X______XXXX. \",
273 \" .XXXX..XXXXXXXXXXXX. \",
274 \" .XXXXXXXXXX____XXXX. \",
275 \" .XXXXXXXXXX____XXXX. \",
276 \" .XXXXXXXXXXXXXXXXXX. \",
277 \" .XXXXXXXXXX____XXXX. \",
278 \" .XXXXXXXXXX____XXXX. \",
279 \" .XXXXXXXXXXXXXXXXXX. \",
280 \" .XXXXXXXXX____XXX. \",
281 \" .XXXXXXXX____XX. \",
282 \" .XXXXXXXXXXXX. \",
283 \" .XXXXXXXXXX. \",
284 \" .XXXXXXXX. \",
285 \" ........ \",
286 \" \",
287 \" \",
288 \" \",
289 \" \"};")
290 "The Stop at Beginning icon.")
291
292 (defvar idlwave-toolbar-stop-in-icon
293 (idlwave-toolbar-make-button
294 "/* XPM */
295 static char * file[] = {
296 \"28 28 4 1\",
297 \" c None s backgroundToolBarColor\",
298 \"_ c #FFFFFFFFFFFF\",
299 \". c #000000000000\",
300 \"R c #FFFF00000000\",
301 \" \",
302 \" \",
303 \" \",
304 \" \",
305 \" ........ \",
306 \" .RRRRRRRR. \",
307 \" .RRRRRRRRRR. \",
308 \" .RRRRRRRRRRRR. \",
309 \" .RRR___RR___RRR. \",
310 \" .RRRR__RRRR__RRRR. \",
311 \" .RRRRR__RRRR__RRRRR. \",
312 \" .RRRRR__RRRR__RRRRR. \",
313 \" .RRRRR__RRRR__RRRRR. \",
314 \" .RRRR__RRRRRR__RRRR. \",
315 \" .RRRRR__RRRR__RRRRR. \",
316 \" .RRRRR__RRRR__RRRRR. \",
317 \" .RRRRR__RRRR__RRRRR. \",
318 \" .RRRRR__RRRR__RRRRR. \",
319 \" .RRRR___RR___RRRR. \",
320 \" .RRRRRRRRRRRRRR. \",
321 \" .RRRRRRRRRRRR. \",
322 \" .RRRRRRRRRR. \",
323 \" .RRRRRRRR. \",
324 \" ........ \",
325 \" \",
326 \" \",
327 \" \",
328 \" \"};")
329 "The Stop in icon.")
330
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
331 (defvar idlwave-toolbar-edit-cmd-icon
332 (idlwave-toolbar-make-button
333 "/* XPM */
334 static char * file[] = {
335 \"28 28 2 1\",
336 \" c None s backgroundToolBarColor\",
337 \". c #000000000000\",
338 \" \",
339 \" \",
340 \" \",
341 \" \",
342 \" \",
343 \" \",
344 \" \",
345 \" \",
346 \" \",
347 \" \",
348 \" \",
349 \" .. \",
350 \" .. \",
351 \" .. \",
352 \" .. \",
353 \" .. \",
354 \" \",
355 \" \",
356 \" ................. \",
357 \" \",
358 \" \",
359 \" \",
360 \" \",
361 \" \",
362 \" \",
363 \" \",
364 \" \",
365 \" \"};")
366 "The edit-cmd icon")
367
368 (defvar idlwave-toolbar-run-icon
369 (idlwave-toolbar-make-button
370 "/* XPM */
371 static char * file[] = {
372 \"28 28 3 1\",
373 \" c None s backgroundToolBarColor\",
374 \". s FgColor c #000000000000\",
375 \"G c #0000BBBB0000\",
376 \" \",
377 \" \",
378 \" \",
379 \" \",
380 \" ..... \",
381 \" .GGG. \",
382 \" .GGG. \",
383 \" .GGG. ....... \",
384 \" .GGG. \",
385 \" .GGG. \",
386 \" .GGG. ....... \",
387 \" .GGG. \",
388 \" ....GGG.... \",
389 \" .GGGGGGG. ....... \",
390 \" .GGGGG. \",
391 \" .GGG. \",
392 \" .G. ....... \",
393 \" . \",
394 \" \",
395 \" ....... \",
396 \" \",
397 \" \",
398 \" ....... \",
399 \" \",
400 \" \",
401 \" \",
402 \" \",
403 \" \"};")
404 "The Run icon.")
405
406 (defvar idlwave-toolbar-cont-icon
407 (idlwave-toolbar-make-button
408 "/* XPM */
409 static char * file[] = {
410 \"28 28 3 1\",
411 \" c None s backgroundToolBarColor\",
412 \". s FgColor c #000000000000\",
413 \"G c #0000BBBB0000\",
414 \" \",
415 \" \",
416 \" \",
417 \" ....... \",
418 \" \",
419 \" ....... \",
420 \" .GGGGGG. ....... \",
421 \" .GGGGGGG. \",
422 \" .GGG..... \",
423 \" .GGG. ....... \",
424 \" .GGG. \",
425 \" .GGG. \",
426 \" .GGG. ....... \",
427 \" .GGG. \",
428 \" ....GGG.... \",
429 \" .GGGGGGG. ....... \",
430 \" .GGGGG. \",
431 \" .GGG. \",
432 \" .G. ....... \",
433 \" . \",
434 \" \",
435 \" ....... \",
436 \" \",
437 \" \",
438 \" \",
439 \" \",
440 \" \",
441 \" \"};")
442 "The Cont icon.")
443
444 (defvar idlwave-toolbar-to-here-icon
445 (idlwave-toolbar-make-button
446 "/* XPM */
447 static char * file[] = {
448 \"28 28 4 1\",
449 \" c None s backgroundToolBarColor\",
450 \". c #000000000000\",
451 \"G c #0000BBBB0000\",
452 \"R c #FFFF00000000\",
453 \" \",
454 \" \",
455 \" \",
456 \" \",
457 \" \",
458 \" \",
459 \" ..... ........ \",
460 \" .GGGG. \",
461 \" .GGGGG. \",
462 \" .GG.... ........ \",
463 \" .GG. \",
464 \" .GG. . \",
465 \" .GG. .. \",
466 \" .GG. .G. ...... \",
467 \" .GG...GG. \",
468 \" .GGGGGGGG. RRRRRR \",
469 \" .GGGGGGGGG. RRRRRR \",
470 \" .GGGGGGG. RRRRRR \",
471 \" ....GG. \",
472 \" .G. ...... \",
473 \" .. \",
474 \" . \",
475 \" \",
476 \" \",
477 \" \",
478 \" \",
479 \" \",
480 \" \"};")
481 "The Cont-to-here icon.")
482
483 (defvar idlwave-toolbar-step-over-icon
484 (idlwave-toolbar-make-button
485 "/* XPM */
486 static char * file[] = {
487 \"28 28 3 1\",
488 \" c None s backgroundToolBarColor\",
489 \". c #000000000000\",
490 \"G c #0000BBBB0000\",
491 \" \",
492 \" \",
493 \" \",
494 \" \",
495 \" \",
496 \" \",
497 \" ..... \",
498 \" .GGGG. ....... \",
499 \" .GGGGG. \",
500 \" .GG.... \",
501 \" .GG. ....... \",
502 \" .GG. . \",
503 \" .GG. .. \",
504 \" .GG. .G. ....... \",
505 \" .GG...GG. \",
506 \" .GGGGGGGG. \",
507 \" .GGGGGGGGG. ....... \",
508 \" .GGGGGGG. \",
509 \" ....GG. \",
510 \" .G. ....... \",
511 \" .. \",
512 \" . \",
513 \" ....... \",
514 \" \",
515 \" \",
516 \" \",
517 \" \",
518 \" \"};")
519 "The Step Over icon.")
520
521 (defvar idlwave-toolbar-step-into-icon
522 (idlwave-toolbar-make-button
523 "/* XPM */
524 static char * file[] = {
525 \"28 28 3 1\",
526 \" c None s backgroundToolBarColor\",
527 \". c #000000000000\",
528 \"G c #0000BBBB0000\",
529 \" \",
530 \" \",
531 \" \",
532 \" \",
533 \" \",
534 \" \",
535 \" ..... ....... \",
536 \" .GGGG. \",
537 \" .GGGGG. \",
538 \" .GG.... ........ \",
539 \" .GG. \",
540 \" .GG. . \",
541 \" .GG. .. \",
542 \" .GG. .G. \",
543 \" .GG...GG. ....... \",
544 \" .GGGGGGGG. \",
545 \" .GGGGGGGGG. \",
546 \" .GGGGGGG. ....... \",
547 \" ....GG. \",
548 \" .G. \",
549 \" .. ....... \",
550 \" . \",
551 \" \",
552 \" \",
553 \" \",
554 \" \",
555 \" \",
556 \" \"};")
557 "The Step Into icon.")
558
559 (defvar idlwave-toolbar-step-out-icon
560 (idlwave-toolbar-make-button
561 "/* XPM */
562 static char * file[] = {
563 \"28 28 3 1\",
564 \" c None s backgroundToolBarColor\",
565 \". c #000000000000\",
566 \"G c #0000BBBB0000\",
567 \" \",
568 \" \",
569 \" \",
570 \" \",
571 \" \",
572 \" \",
573 \" . \",
574 \" .. ........ \",
575 \" .G. \",
576 \" ....GG. \",
577 \" .GGGGGGG. ........ \",
578 \" .GGGGGGGGG. \",
579 \" .GGGGGGGG. \",
580 \" .GG...GG. ........ \",
581 \" .GG. .G. \",
582 \" .GG. .. \",
583 \" .GG. . \",
584 \" .GG. \",
585 \" .GG....... ....... \",
586 \" .GGGGGGGG. \",
587 \" .GGGGGGG. \",
588 \" ........ ....... \",
589 \" \",
590 \" \",
591 \" \",
592 \" \",
593 \" \",
594 \" \"};")
595 "The Step up icon.")
596
597
598 (defvar idlwave-toolbar-eval-icon
599 (idlwave-toolbar-make-button
600 "/* XPM */
601 static char * file[] = {
602 \"28 28 2 1\",
603 \" c None s backgroundToolBarColor\",
604 \". c #000000000000\",
605 \" \",
606 \" \",
607 \" \",
608 \" \",
609 \" \",
610 \" \",
611 \" \",
612 \" \",
613 \" \",
614 \" \",
615 \" \",
616 \" .... \",
617 \" .. .. ...... \",
618 \" .. .. ...... \",
619 \" .. .. \",
620 \" .. .. ...... \",
621 \" .. .. ...... \",
622 \" .... \",
623 \" .. \",
624 \" .. \",
625 \" \",
626 \" \",
627 \" \",
628 \" \",
629 \" \",
630 \" \",
631 \" \",
632 \" \"};")
633 "The Evaluate icon.")
634
635 (defvar idlwave-toolbar-stack-up-icon
636 (idlwave-toolbar-make-button
637 "/* XPM */
638 static char * file[] = {
639 \"28 28 5 1\",
640 \" c None s backgroundToolBarColor\",
641 \". s FgColor c #000000000000\",
642 \"_ c #FFFFFFFFFFFF\",
643 \"G c #0000BBBB0000\",
644 \"R c #FFFF00000000\",
645 \" \",
646 \" \",
647 \" \",
648 \" \",
649 \" \",
650 \" ........ . \",
651 \" .______. ... \",
652 \" .______. ..... \",
653 \" .______. ....... \",
654 \" .______. ... \",
655 \" .______. ... \",
656 \" ........ ... \",
657 \" .GGGGGG. ... \",
658 \" .GGGGGG. ... \",
659 \" .GGGGGG. \",
660 \" .GGGGGG. \",
661 \" .GGGGGG. \",
662 \" ........ \",
663 \" .RRRRRR. \",
664 \" .RRRRRR. \",
665 \" .RRRRRR. \",
666 \" .RRRRRR. \",
667 \" .RRRRRR. \",
668 \" ........ \",
669 \" \",
670 \" \",
671 \" \",
672 \" \"};")
673 "The Stack Up icon.")
674
675 (defvar idlwave-toolbar-stack-down-icon
676 (idlwave-toolbar-make-button
677 "/* XPM */
678 static char * file[] = {
679 \"28 28 5 1\",
680 \" c None s backgroundToolBarColor\",
681 \". s FgColor c #000000000000\",
682 \"_ c #FFFFFFFFFFFF\",
683 \"G c #0000BBBB0000\",
684 \"R c #FFFF00000000\",
685 \" \",
686 \" \",
687 \" \",
688 \" \",
689 \" \",
690 \" ........ \",
691 \" .______. \",
692 \" .______. \",
693 \" .______. \",
694 \" .______. \",
695 \" .______. \",
696 \" ........ \",
697 \" .GGGGGG. \",
698 \" .GGGGGG. \",
699 \" .GGGGGG. \",
700 \" .GGGGGG. ... \",
701 \" .GGGGGG. ... \",
702 \" ........ ... \",
703 \" .RRRRRR. ... \",
704 \" .RRRRRR. ... \",
705 \" .RRRRRR. ....... \",
706 \" .RRRRRR. ..... \",
707 \" .RRRRRR. ... \",
708 \" ........ . \",
709 \" \",
710 \" \",
711 \" \",
712 \" \"};")
713 "The Stack Down icon.")
714
715 (defvar idlwave-toolbar-reset-icon
716 (idlwave-toolbar-make-button
717 "/* XPM */
718 static char * file[] = {
719 \"28 28 3 1\",
720 \" c None s backgroundToolBarColor\",
721 \"G c #0000BBBB0000\",
722 \". c #000000000000\",
723 \" \",
724 \" \",
725 \" \",
726 \" . \",
727 \" .G. . \",
728 \" .GGG.. .G. \",
729 \" .GGGGG..GG. \",
730 \" ..GGGGGGGG. \",
731 \" ..GGGGGG. \",
732 \" ..GGGGG. \",
733 \" .GGGGGG. \",
734 \" .G...... \",
735 \" \",
736 \" ..... \",
737 \" ......... \",
738 \" ......... \",
739 \" ......... \",
740 \" . ..... . \",
741 \" . . \",
742 \" . . \",
743 \" . . \",
744 \" . . \",
745 \" . . \",
746 \" .. .. \",
747 \" ....... \",
748 \" ..... \",
749 \" \",
750 \" \"};")
751 "The Reset icon.")
752
1a1c612 - Updated to IDLWAVE v5.0, including electric-debug mode, HTML help,
jdsmith authored
753 (defvar idlwave-toolbar-electric-debug-icon
754 (idlwave-toolbar-make-button
755 "/* XPM */
756 static char * file[] = {
757 \"28 28 8 1\",
758 \" c None s backgroundToolBarColor\",
759 \". c #CFC854\",
760 \"+ c #EEDB0E\",
761 \"@ c #D2C739\",
762 \"# c #A39C54\",
763 \"$ c #CDC020\",
764 \"% c #020202\",
765 \"& c #D60E36\",
766 \" \",
767 \" \",
768 \" .. \",
769 \" +++++@ \",
770 \" ++++++ \",
771 \" +++++@ \",
772 \" +++++ \",
773 \" #++++@ \",
774 \" $+++@ %% %% \",
775 \" ++++++$ % % \",
776 \" #+++++$ % % \",
777 \" #++$# %%% \",
778 \" #+++ %%%%%%% \",
779 \" .++ %%%%%%%%%%% \",
780 \" ++$$ %%%%%%%%%%% \",
781 \" .+@# &&%%%%%%%&& \",
782 \" .++++# &&&&&%%%&&&&& \",
783 \" +++++$ &&%%&&&&&%%&& \",
784 \" $+++$ &&%%&&&&&%%&& \",
785 \" $++@ &&&&&&%&&&&&& \",
786 \" $+@ &&&&&&%&&&&&& \",
787 \" @+ &&%%&&&&&%%&& \",
788 \" ++. &%%&&%&&%%& \",
789 \" +. &&&&%%%&&&& \",
790 \" .+ &&%%%%%&& \",
791 \" ++ %%%%%%% \",
792 \" . %%% \",
793 \" \"};")
794 "The electric debug icon.")
795
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
796 (defvar idlwave-toolbar
797 '(
798 [idlwave-toolbar-compile-icon
799 idlwave-shell-save-and-compile
800 t
801 "Save and Compile this file (or recompile last)"]
802 [idlwave-toolbar-next-error-icon
803 idlwave-shell-goto-next-error
804 t
805 "Goto Next Error"]
806 [idlwave-toolbar-stop-at-icon
807 idlwave-shell-break-here
808 (eq major-mode 'idlwave-mode)
809 "Set Breakpoint at selected position"]
810 [idlwave-toolbar-clear-at-icon
811 idlwave-shell-clear-current-bp
812 t
813 "Clear Breakpoint at selected position"]
814 [idlwave-toolbar-clear-all-icon
815 idlwave-shell-clear-all-bp
816 t
817 "Clear all Breakpoints"]
1a1c612 - Updated to IDLWAVE v5.0, including electric-debug mode, HTML help,
jdsmith authored
818 [idlwave-toolbar-stop-beginning-icon
819 idlwave-shell-break-this-module
820 (eq major-mode 'idlwave-mode)
821 "Stop at beginning of enclosing Routine"]
822 [idlwave-toolbar-stop-in-icon
823 idlwave-shell-break-in
824 t
825 "Stop in Routine with name near point"]
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
826 [idlwave-toolbar-edit-cmd-icon
827 idlwave-shell-edit-default-command-line
828 t
829 "Edit Default Command Line"]
830 [idlwave-toolbar-run-icon
831 idlwave-shell-execute-default-command-line
832 t
833 "Reset, then Execute Default Command Line"]
834 [idlwave-toolbar-cont-icon
835 idlwave-shell-cont
836 t
837 "Continue Current Program"]
838 [idlwave-toolbar-to-here-icon
839 idlwave-shell-to-here
840 (eq major-mode 'idlwave-mode)
841 "Continue to Here (cursor position)"]
842 [idlwave-toolbar-step-over-icon
843 idlwave-shell-stepover
844 t
845 "Step Over (aka next)"]
846 [idlwave-toolbar-step-into-icon
847 idlwave-shell-step
848 t
849 "Step Into (aka step)"]
850 [idlwave-toolbar-step-out-icon
851 idlwave-shell-out
852 t
853 "Step Out (of subroutine)"]
854 [idlwave-toolbar-eval-icon
855 idlwave-shell-print
856 t
857 "Print Expression at or before Point"]
858 [idlwave-toolbar-stack-up-icon
859 idlwave-shell-stack-up
860 t
861 "Stack Up (towards \"cooler\" - less recently visited - frames)"]
862 [idlwave-toolbar-stack-down-icon
863 idlwave-shell-stack-down
864 t
865 "Stack Down (towards \"warmer\" - more recently visited - frames)"]
866 [idlwave-toolbar-reset-icon
867 idlwave-shell-reset
868 t
869 "Reset IDL (RETALL & CLOSE,/ALL and more)"]
1a1c612 - Updated to IDLWAVE v5.0, including electric-debug mode, HTML help,
jdsmith authored
870 [idlwave-toolbar-electric-debug-icon
871 idlwave-shell-electric-debug-mode
872 (eq major-mode 'idlwave-mode)
873 "Toggle Electric Debug Mode"]
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
874 ))
875
876 ;; When the shell exits, arrange to remove the special toolbar everywhere.
877 (add-hook 'idlwave-shell-cleanup-hook
878 'idlwave-toolbar-remove-everywhere)
879 );; End can define toolbar
880
881 (defun idlwave-toolbar-add ()
882 "Add the IDLWAVE toolbar if appropriate."
883 (if (and (featurep 'xemacs) ; This is a noop on Emacs
884 (boundp 'idlwave-toolbar-is-possible)
885 (or (eq major-mode 'idlwave-mode)
886 (eq major-mode 'idlwave-shell-mode)))
887 (set-specifier default-toolbar (cons (current-buffer)
888 idlwave-toolbar))))
889
890 (defun idlwave-toolbar-remove ()
891 "Add the IDLWAVE toolbar if appropriate."
892 (if (and (featurep 'xemacs) ; This is a noop on Emacs
893 (boundp 'idlwave-toolbar-is-possible)
894 (or (eq major-mode 'idlwave-mode)
895 (eq major-mode 'idlwave-shell-mode)))
896 (remove-specifier default-toolbar (current-buffer))))
897
898 (defvar idlwave-shell-mode-map)
899 (defvar idlwave-mode-map)
900 (defvar idlwave-toolbar-visible nil)
901 (defun idlwave-toolbar-add-everywhere ()
902 "Add the toolbar in all appropriate buffers."
903 (when (boundp 'idlwave-toolbar-is-possible)
904
905 ;; First make sure new buffers will get the toolbar
906 (add-hook 'idlwave-mode-hook 'idlwave-toolbar-add)
907 ;; Then add it to all existing buffers
908 (if (featurep 'xemacs)
909 ;; For XEmacs, map over all buffers to add toolbar
910 (save-excursion
911 (mapcar (lambda (buf)
912 (set-buffer buf)
913 (idlwave-toolbar-add))
914 (buffer-list)))
915 ;; For Emacs, add the key definitions to the mode maps
eeced67 @jdtsmith Use `mapc'/`dolist' instead of `mapcar'
authored
916 (mapc (lambda (x)
917 (let* ((icon (aref x 0))
918 (func (aref x 1))
919 (show (aref x 2))
920 (help (aref x 3))
921 (key (vector 'tool-bar func))
922 (def (list 'menu-item
923 "a"
924 func
925 :image (symbol-value icon)
926 :visible show
927 :help help)))
928 (define-key idlwave-mode-map key def)
929 (define-key idlwave-shell-mode-map key def)))
930 (reverse idlwave-toolbar)))
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
931 (setq idlwave-toolbar-visible t)))
932
933 (defun idlwave-toolbar-remove-everywhere ()
934 "Remove the toolbar in all appropriate buffers."
935 ;; First make sure new buffers won't get the toolbar
936 (when idlwave-toolbar-is-possible
937 (remove-hook 'idlwave-mode-hook 'idlwave-toolbar-add)
938 ;; Then remove it in all existing buffers.
939 (if (featurep 'xemacs)
940 ;; For XEmacs, map over all buffers to remove toolbar
941 (save-excursion
942 (mapcar (lambda (buf)
943 (set-buffer buf)
944 (idlwave-toolbar-remove))
945 (buffer-list)))
946 ;; For Emacs, remove the key definitions from the mode maps
eeced67 @jdtsmith Use `mapc'/`dolist' instead of `mapcar'
authored
947 (mapc (lambda (x)
948 (let* (;;(icon (aref x 0))
949 (func (aref x 1))
950 ;;(show (aref x 2))
951 ;;(help (aref x 3))
952 (key (vector 'tool-bar func)))
953 (define-key idlwave-mode-map key nil)
954 (define-key idlwave-shell-mode-map key nil)))
955 idlwave-toolbar))
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
956 (setq idlwave-toolbar-visible nil)))
957
958 (defun idlwave-toolbar-toggle (&optional force-on)
959 (interactive)
960 (if idlwave-toolbar-visible
961 (or force-on (idlwave-toolbar-remove-everywhere))
962 (idlwave-toolbar-add-everywhere))
963 ;; Now make sure this
964 (if (featurep 'xemacs)
965 nil ; no action necessary, toolbar gets updated automatically
966 ;; On Emacs, redraw the frame to make sure the Toolbar is updated.
967 (redraw-frame (selected-frame))))
968
969 (provide 'idlw-toolbar)
970 (provide 'idlwave-toolbar)
971
3836f94 *** empty log message ***
jdsmith authored
972 ;; arch-tag: ec9a3717-c44c-4716-9bda-cdacbe5ddb62
c8115d3 Initial seed of IDLWAVE v4.10
jdsmith authored
973 ;;; idlw-toolbar.el ends here
Something went wrong with that request. Please try again.