git-svn make executable
[texmacs.git] / src / TeXmacs / progs / dynamic / dynamic-drd.scm
blob72cee77b30dc3b908136b82dde23c3b51f1ac38c
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;
4 ;; MODULE      : dynamic-drd.scm
5 ;; DESCRIPTION : data relation definitions for dynamic tags
6 ;; COPYRIGHT   : (C) 2005  Joris van der Hoeven
7 ;;
8 ;; This software falls under the GNU general public license version 3 or later.
9 ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10 ;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 (texmacs-module (dynamic dynamic-drd)
15   (:use (utils edit variants)))
17 ;; fold <-> unfold toggles
19 (define-group toggle-tag (folded-tag) (unfolded-tag))
20 (define-group toggle-first-tag (folded-tag))
21 (define-group toggle-second-tag (unfolded-tag))
22 (define-group variant-tag (folded-tag) (unfolded-tag))
23 (define-group similar-tag (folded-tag) (unfolded-tag))
25 (tm-define toggle-table (make-ahash-table))
26 (tm-define-macro (define-fold folded unfolded)
27   `(begin
28      (define-group folded-tag ,folded)
29      (define-group unfolded-tag ,unfolded)
30      (ahash-set! toggle-table ',folded ',unfolded)
31      (ahash-set! toggle-table ',unfolded ',folded)))
33 (define-fold folded unfolded)
34 (define-fold folded-plain unfolded-plain)
35 (define-fold folded-std unfolded-std)
36 (define-fold folded-explain unfolded-explain)
37 (define-fold folded-env unfolded-env)
38 (define-fold folded-grouped unfolded-grouped)
40 ;; summarized <-> detailed toggles
42 (define-group toggle-tag (toggle-first-tag) (toggle-second-tag))
43 (define-group toggle-first-tag (summarized-tag) summarized-algorithm)
44 (define-group toggle-second-tag (detailed-tag) detailed-algorithm)
45 (define-group variant-tag (summarized-tag) (detailed-tag))
46 (define-group similar-tag (summarized-tag) (detailed-tag))
48 (tm-define-macro (define-summarize short long)
49   `(begin
50      (define-group summarized-tag ,short)
51      (define-group detailed-tag ,long)
52      (ahash-set! toggle-table ',short ',long)
53      (ahash-set! toggle-table ',long ',short)))
55 (define-summarize summarized detailed)
56 (define-summarize summarized-plain detailed-plain)
57 (define-summarize summarized-std detailed-std)
58 (define-summarize summarized-env detailed-env)
59 (define-summarize summarized-grouped detailed-grouped)
60 (define-summarize summarized-raw detailed-raw)
61 (define-summarize summarized-tiny detailed-tiny)
63 (ahash-set! toggle-table 'summarized-algorithm 'detailed-algorithm)
64 (ahash-set! toggle-table 'detailed-algorithm 'summarized-algorithm)
66 ;; switches
68 (define-group switch-tag
69   (alternative-tag) (unroll-tag) (expanded-tag))
71 (define-group big-switch-tag
72   (big-alternative-tag) (unroll-tag) (expanded-tag))
74 (define-group alternative-tag
75   (big-alternative-tag) tiny-switch)
77 (define-group big-alternative-tag
78   switch screens)
80 (define-group unroll-tag
81   unroll)
83 (define-group expanded-tag
84   expanded slides)