CLIM mail archive
[Prev][Next][Index][Thread]
Incremental display of a growing graph?
-
To: clim@BBN.COM
-
Subject: Incremental display of a growing graph?
-
From: mittal@isi.edu
-
Date: Tue, 13 Oct 1992 10:08:10 -0700
-
Posted-Date: Tue, 13 Oct 1992 10:08:10 -0700
Hello!
I've got a graph that we would like to display as it grows
incrementally (as children of a node get generated). If it is
possible to do this with the clim:format-graph-from-root, I would be
very grateful to hear about it.
If format-graph-from-root cannot be used, I would like to know if it
is possible to generate output to a window and cause the window to
center the object being displayed. For instance, in the code below,
the circles drawn in the graph window go past the edge of the window
and one has to use the scroll bars to see the rest. Is it possible
to make the window scroll by itself?
Thanks in advance for all suggestions or pointers,
Sincerely,
Vibhu
;;;--------------------------------------------------------
;;; -*- Mode: Lisp; -*-
(defvar *clim-window*)
(clim:define-application-frame clim-window () ()
(:panes ((graph :application)
(menu :command-menu)
(interactor :interactor)))
(:layout ((first (:column 1
(graph 8/9)
(menu :compute)
(interactor :rest))))))
(setq *clim-window* (clim:make-application-frame
'clim-window
:parent (setq *root* (clim:open-root-window :clx))
:left 10 :top 10
:width 1100 :height 850))
(defun run-clim ()
(lcl::make-process :name "clim-window"
:function 'clim:run-frame-top-level
:args (list *clim-window*)))
(define-clim-window-command (com-quit :name t :menu T) ()
(clim:frame-exit *clim-window*))
(define-clim-window-command (com-circles :name t :menu T) ()
(draw-circles))
(define-clim-window-command (com-clear :name t :menu T) ()
(clim:window-clear (clim:get-frame-pane *clim-window* 'graph)))
(defun draw-circles ()
(let ((medium (clim:get-frame-pane *clim-window* 'graph)))
(dotimes (i 20)
(clim::draw-circle* medium
(+ 100 (* i 200)) ; x-center
100 ; y-center
50 ; radius
))))
0,,
Follow-Ups:
Main Index |
Thread Index