(defpackage "APP"
(:use :clim :clim-lisp)
(:export "BUTTONS-MAIN"))
(in-package :APP)
(defvar arg)
(defun press (button)
(accepting-values (*query-io* :own-window t)
(format *query-io* "~A" arg)))
(defun squeeze (button)
(accepting-values (*query-io* :own-window t)
(format *query-io* "~A" arg)))
(define-application-frame buttons ;name
() ;superclasses
() ;slots
;; options
(:panes (button
(horizontally ()
(make-pane 'push-button
:label "squeeze"
:activate-callback #'squeeze)
(make-pane 'push-button
:label "press"
:activate-callback #'press)))
(application ;pane name
:application)) ;pane type ... :application is an extended-stream-pane
(:layouts (default ;layout name
(vertically () ;layout macros
(1/8 button) (7/8 application)))
(alternate ;layout name
(horizontally () ;layout macros
(1/8 button) (7/8 application)))))
(defun buttons-main ()
(run-frame-top-level
(make-application-frame 'buttons :height 10 :width 10)))
выдаёт
; file: ~/Documents/using-panes-layouts.lisp
; in: DEFUN PRESS
; (DEFUN APP::PRESS (APP::BUTTON)
; (CLIM:ACCEPTING-VALUES (*QUERY-IO* :OWN-WINDOW T)
; (FORMAT *QUERY-IO* "~A" APP::ARG)))
;
; caught STYLE-WARNING:
; The variable BUTTON is defined but never used.<- BUTTON ; используется в BUTTONS !!!!!!!!!!!!!
;
; compilation unit finished
; caught 1 STYLE-WARNING condition
; file: ~/Documents/using-panes-layouts.lisp
; in: DEFUN SQUEEZE
; (DEFUN APP::SQUEEZE (APP::BUTTON)
; (CLIM:ACCEPTING-VALUES (*QUERY-IO* :OWN-WINDOW T)
; (FORMAT *QUERY-IO* "~A" APP::ARG)))
;
; caught STYLE-WARNING:
; The variable BUTTON is defined but never used. <- BUTTON ; используется в BUTTONS !!!!!!!!!!!!!
;
; compilation unit finished
; caught 1 STYLE-WARNING condition
T