(in-package :common-lisp-user)
(defpackage "APP"
  (:use :clim :clim-lisp)
  (:export "APP-MAIN"))
(in-package :app)
(define-application-frame superapp ()
  ((numbers :initform (loop repeat 20 collect (list (random 100000000)))
	    :accessor numbers)
   (cursor :initform 0 :accessor cursor))
  (:pointer-documentation t)
  (:panes
   (app :application
	:height 400 :width 600
	:incremental-redisplay t
	:display-function 'display-app)
   (int :interactor :height 200 :width 600))
  (:layouts
   (default (vertically () app int))))
(defun display-app (frame pane)
  (loop for element in (numbers frame)
     for line from 0
     do (princ (if (= (cursor frame) line) "*" " ") pane)
       
     ;; pane is the protocol class that corresponds to a pane,
     ;; взят как аргумент функции
       
     do (updating-output (pane :unique-id element         ;; не нашёл откуда
			       :id-test #'eq              ;; взялись эти
			       :cache-value (car element) ;; опции
			       :cache-test #'eql)         ;; 
			 (format pane "~a~%" (car element)))))
;; По опциям, нашёл
;; updating-output  (stream 
;; &rest args 
;; &key unique-id     <-      здесь element как var
;; unique-id provides a means to uniquely identify the output done by body. If unique-id is not supplied, CLIM will generate one that is guaranteed to be unique. unique-id may be any object as long as it is unique with respect to the id-test predicate among all such unique ids in the current incremental redisplay. id-test is a function of two arguments that is used for comparing unique ids it has indefinite extent. 
;; (id-test #'eql) 
;; cache-value        <-      здесь element как list
;; cache-value is a value that remains constant if and only if the output produced by body does not need to be recomputed.  If the cache value is not supplied, CLIM will not use a cache for this piece of output. cache-test is a function of two arguments that is used for comparing cache values; it has indefinite extent.
;; (cache-test #'eql)          почему element то 
;;                             var то list?
;; fixed-position             element нигде не определён
;; all-new 
;; parent-cache 
;; record-type) &body body
(defun app-main ()
  (run-frame-top-level (make-application-frame 'superapp)))
(define-superapp-command (com-quit :name t) ()
  (frame-exit *application-frame*))
(define-superapp-command (com-add :name t) ((number 'integer))
  (incf (car (elt (numbers *application-frame*)
		  (cursor *application-frame*)))
	number))
(define-superapp-command (com-next :name t) ()
  (incf (cursor *application-frame*))
  (when (= (cursor *application-frame*)
	   (length (numbers *application-frame*)))
    (setf (cursor *application-frame*) 0)))
(define-superapp-command (com-prev :name t) ()
  (decf (cursor *application-frame*))
  (when (minusp (cursor *application-frame*))
    (setf (cursor *application-frame*)
	  (1- (length (numbers *application-frame*))))))

    
      Ответ на:
      
          комментарий
        от monk 
  
    
      Ответ на:
      
          комментарий
        от monk 
  
    
      Ответ на:
      
          комментарий
        от monk 
  
    
      Ответ на:
      
          комментарий
        от saufesma 
  
    
      Ответ на:
      
          комментарий
        от saufesma 
  
    
      Ответ на:
      
          комментарий
        от monk 
  
    
      Ответ на:
      
          комментарий
        от monk 
  
    
      Ответ на:
      
          комментарий
        от saufesma 
  
    
      Ответ на:
      
          комментарий
        от monk 
  
    
        Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
      
Похожие темы
- Форум Разбор кода на McCLIM (2020)
 - Форум sbcl компилятор не доволен (2021)
 - Форум puzzle in mcclim (2019)
 - Форум ring buffer (2012)
 - Форум Состоялся релиз mailutils 3.2. (2017)
 
- Форум Nginx + PHP - No input file specified. (2020)
 - Форум ext4 trim (2013)
 - Форум slime Coonection part (2023)
 - Форум Godex (2020)
 - Форум Переодически вылетает ошибка 502 - nginx (2016)