;;--------------------------------------------------------------------------* ;; Copyright 2007 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: am_hide_multiple_elements.lsp ;; Version : 1.0 ;; Datum : 06.12.2007 ;; Author : Gt ;;--------------------------------------------------------------------------* (in-package :custom) (use-package :OLI) (use-package :DOCU) ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-anno-hide-multiple-elements-dialog :dialog-title "Elem. verbergen" :variables '( (usdoc :title "Info" :prompt-text "Infostring fuer Markierungen angeben" :range (("*" "Alles") ("PM" "Pruefmasse") ("HM" "Hilfsmasse")) :after-input (after-clear-action) ) (mark :value-type :grouped-boolean :title "Markieren" :initial-value t :after-input (after-mark-action) ) (clear :value-type :grouped-boolean :title "Freigeben" :after-input (after-clear-action) ) (einzel :value-type :grouped-boolean :title "Punkt" :after-input (after-einzel-action) ) (box :value-type :grouped-boolean :title "Box" :initial-value t :after-input (after-box-action) ) (tpnt :value-type :docupntcnp :prompt-text "Punkt auf Element angeben" :title "Punkt" :initial-enable nil :after-input (after-tpnt-action) ) (bp1 :value-type :docupntcnp :prompt-text "Ersten Punkt des Rechtecks angeben" :title "Punkt 1" :after-input (progn (setf bp2 nil) (sd-execute-annotator-command :cmd (format nil "LINE RECTANGLE ~A,~A" (oli::gpntdocu_x bp1) (oli::gpntdocu_y bp1))) );;progn ) (bp2 :value-type :docupntcnp :prompt-text "Zweiten Punkt des Rechtecks angeben" :title "Punkt 2" :after-input (progn ;; (sd-execute-annotator-command :cmd (format nil "CANCEL")) (after-bp2-action) );;progn ) (doit :push-action (after-doit-action) :title "Markieren" :initial-enable nil :toggle-type :wide-toggle ) (hide :push-action (after-hide-action) :title "Verbergen" :toggle-type :grouped-toggle ) (show :push-action (after-show-action) :title "Zeigen" :toggle-type :grouped-toggle ) (keep :value-type :boolean :title "Verbergen behalten" :initial-value t :toggle-type :wide-toggle ) (onoff :initial-value t) ) :after-initialization '(init-action) :mutual-exclusion '((mark clear) (einzel box)) :local-functions '( (init-action () (let (mec) (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL ON") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU*' ALL CONFIRM RGB_COLOR .7 .7 .7")) (oli::sd-execute-annotator-command :cmd mec) (sd-disable-must-variable-check) ) ) (after-mark-action () (after-clear-action) ) (after-clear-action () (let (mec) (if mark (progn (sd-set-variable-status 'doit :title "Markieren") (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL ON") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RGB_COLOR .7 .7 .7" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn (progn (sd-set-variable-status 'doit :title "Freigeben") (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL ON") (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL RGB_COLOR .7 .7 .7") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RED" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn );;if ) ) (after-einzel-action () (after-box-action) ) (after-box-action () (let () (if box (progn (sd-set-variable-status 'bp1 :enable t) (sd-set-variable-status 'bp2 :enable t) (sd-set-variable-status 'doit :enable t) (sd-set-variable-status 'tpnt :enable nil) (setf tpnt nil) );;progn (progn (sd-set-variable-status 'bp1 :enable nil) (sd-set-variable-status 'bp2 :enable nil) (sd-set-variable-status 'doit :enable nil) (sd-set-variable-status 'tpnt :enable t) (setf bp1 nil) (setf bp2 nil) );;progn );;if ) ) (after-tpnt-action () (let (mec) (if mark (progn (setf mec (format nil "ADD_ELEM_INFO 'USERDOCU_~a' SUBTREE ~a,~a END" usdoc (oli::gpntdocu_x tpnt) (oli::gpntdocu_y tpnt))) (oli::sd-execute-annotator-command :cmd mec) (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RGB_COLOR .7 .7 .7" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn (progn (setf mec (format nil "CHANGE_ELEM_INFO 'DOCU_FOR_CUSTOMER' '' SUBTREE ~a,~a END" (oli::gpntdocu_x tpnt) (oli::gpntdocu_y tpnt))) (oli::sd-execute-annotator-command :cmd mec) (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL RGB_COLOR .7 .7 .7") (oli::sd-execute-annotator-command :cmd "SHOW SELECT SUBTREE INFOS 'DOCU_MARKED_FOR_DELETE*' ALL CONFIRM OFF") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RED" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn );;if (setf tpnt nil) ) ) (after-bp2-action () (let (mec) (sd-set-variable-status 'doit :enable t) (oli::sd-execute-annotator-command :cmd "CANCEL") (setf mec (format nil "SHOW SELECT GLOBAL BOX ~a,~a ~a,~a CONFIRM RGB_COLOR 1 1 0" (oli::gpntdocu_x bp1) (oli::gpntdocu_y bp1) (oli::gpntdocu_x bp2) (oli::gpntdocu_y bp2) )) (oli::sd-execute-annotator-command :cmd mec) ) ) (after-doit-action () (let (mec) (if mark (progn (setf mec (format nil "ADD_ELEM_INFO 'USERDOCU_~a' GLOBAL BOX ~a,~a ~a,~a END" usdoc (oli::gpntdocu_x bp1) (oli::gpntdocu_y bp1) (oli::gpntdocu_x bp2) (oli::gpntdocu_y bp2) )) (oli::sd-execute-annotator-command :cmd mec) (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RGB_COLOR .7 .7 .7" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn (progn (setf mec (format nil "CHANGE_ELEM_INFO 'USERDOCU_~a' '' SUBTREE BOX ~a,~a ~a,~a END" usdoc (oli::gpntdocu_x bp1) (oli::gpntdocu_y bp1) (oli::gpntdocu_x bp2) (oli::gpntdocu_y bp2) )) (oli::sd-execute-annotator-command :cmd mec) (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL RGB_COLOR .7 .7 .7") (oli::sd-execute-annotator-command :cmd "SHOW SELECT SUBTREE INFOS 'DOCU_MARKED_FOR_DELETE*' ALL CONFIRM OFF") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RED" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn );;if (setf bp1 nil) (setf bp2 nil) (sd-set-variable-status 'doit :enable nil) ) ) (after-hide-action () (let () (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL ON") (oli::sd-execute-annotator-command :cmd "SHOW SELECT SUBTREE INFOS 'DOCU_FOR_CUSTOMER' CONFIRM OFF") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM OFF" usdoc)) (oli::sd-execute-annotator-command :cmd mec) (setf onoff nil) ) ) (after-show-action () (let () (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL ON") (if mark (progn (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RGB_COLOR .7 .7 .7" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn (progn (oli::sd-execute-annotator-command :cmd "SHOW SUBTREE ALL RGB_COLOR .7 .7 .7") (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM RED" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn );;if (setf onoff t) ) ) (clean-action () (let () (oli::sd-execute-annotator-command :cmd "SHOW GLOBAL ALL ON") (when (and keep (not onoff)) (progn (setf mec (format nil "SHOW SELECT SUBTREE INFOS 'USERDOCU_~a' ALL CONFIRM OFF" usdoc)) (oli::sd-execute-annotator-command :cmd mec) );;progn );;when (oli::sd-execute-annotator-command :cmd "CANCEL") ) ) ) :cancel-action '(clean-action) :ok-action '(clean-action) :help-action '() )