File: OnlyForLayout.scm

package info (click to toggle)
denemo 2.6.49-0.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 66,916 kB
  • sloc: ansic: 94,587; lisp: 38,713; xml: 22,675; python: 1,930; sh: 1,239; makefile: 642; yacc: 288; sed: 93
file content (25 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;;;;;;;; OnlyForLayout
 (let ((tag (d-DirectiveGetTag-standalone)) (params OnlyForLayout::params) (layout (d-GetLayoutName))(id (d-GetLayoutId)))
   (define (d-InfoDialog string)
        (Help::TimedNotice (string-append string "\n") 5000)) 
    (define (put-cond)
        (d-DirectivePut-standalone-allow tag id)
        ;(d-DirectivePut-standalone-display tag  (string-append (_ " for ") layout))
        (d-DirectivePut-standalone-ty tag 60)
        (d-DirectivePut-standalone-tx tag -30))
  (if tag
      (let ((interactive #f))
        (if (pair? params)
            (begin
                (set! interactive (not (eq? (car params) 'noninteractive)))
                (if (not interactive)
                        (set! params (cdr params)))
             (set! layout (car params))
             (set! id (cdr params))))
        (put-cond)
        (if interactive
			(d-InfoDialog (string-append (_ "This Directive ") "\"" tag "\"" (_ " will be typeset for the layout ") "\"" layout "\"")))
        (d-SetSaved #f)
        (d-RefreshDisplay))
    (d-MakeDirectiveConditional)))