CLIM mail archive

[Prev][Next][Index][Thread]

Some CLIM2 comments/ideas



CLIM 2.0beta
ACL 4.2beta
Motif 1.11
Openwindows 3 X server
SunOs 4.1.1
Sun IPX

Seems as if I should be able to control the layout of the completion
presentation type and its abbreviations (member-alist, subset-alist,
etc.).  For example, in the Motif port, I get a horizontally arranged
presentation something like:

 +----------------------------------+
 | Please Choose                    |
 |                                  |
 | <> Label 1 <> Label 2 <> Label 3 |
 +----------------------------------+

when I execute:

  (clim:accept '(clim:member-alist (("Label 1" :value 1)
                                    ("Label 2" :value 2)
                                    ("Label 3" :value 3)))
               :prompt "Please Choose")

What I optionally want is:

 +--------------------+
 | Please Choose      |
 |                    |
 | <> Label 1         |
 | <> Label 2         |
 | <> Label 3         |
 +--------------------+

While we are at it, one would also like to control the text style,
color, and alignment of the choice and header labels, the color of the
buttons and the background color of the enclosing box around the whole
thing.  So the above may turn into something like:

  (clim:accept '((clim:member-alist (("Label 1" :value 1
                                                :foreground clim:+white+ ;text
                                                :background clim:+black+ ;box
                                                :align-x :left)
                                     ("Label 2" :value 2
                                                :foreground clim:+white+ ;text
                                                :background clim:+black+ ;box
                                                :align-x :left)
                                     ("Label 3" :value 3
                                                :foreground clim:+white+ ;text
                                                :background clim:+black+ ;box
                                                :align-x :left)))
                 :width '(20 :character)  ;force width of box to be 20 chars
                 :orientation :vertical)
               :prompt #'(lambda (stream) (clim:with-text-face (stream :italic)
                                             (format stream "Please Choose"))
                                          ;; Return desired alignment of header label
                                          (list :align-x :center))
               :background clim:+yellow+)

If the option doesn't apply to the port, it is ignored.  In Motif, we
would get a yellow (puke) background surrounding box, black buttons,
and white text.  Text for each button would be left justified.  Just
an idea...  I'm sure there are other issues and a better way of
dealing with this.

I would also like better control over the layout, text style, and
color of "menu" items.  Some of these things can be done with so
called "menu-specs" but not all.  Specifically, I cannot specify the
layout (which items go in which rows/columns) nor the color of menu
items.  Maybe users should be able to write their own layout using
formatting-table and friends but without having to have knowledge of
the presentation semantics?

Additionally, it seems like a Motif port should present menu items as
buttons in an *adaptive* menu pane (as is now done with (:menu-bar t))
or as standard highlighting menu items in a non-adaptive menu pane.  I
guess it would be cool if I could declare in :panes/:layouts the size
and placement of the menu pane and then depending upon whether it is
adaptive or not have the menu items displayed per the port toolkit or
not.

Finally, it would be cool if there was a "3d" border type.  This might
be similar to :drop-shadow except that one would specify the color for
the left/top and right/bottom borders to provide an "inie" or "outie"
3d looking "box."  It would be nice to also specify the color of an
optionally "filled" box also.  Right now I'm simulating this with
something like:

(defmacro surrounding-output-with-3d-box ((&optional stream &key (shadow-color clim:+black+)
								 (box-color clim:+white+)
								 (text-color clim:+black+))
				       &body body)
  `(invoke-surrounding-output-with-3d-box #'(lambda (,stream) ,@body) ,stream
					  :shadow-color ,shadow-color
					  :box-color ,box-color
					  :text-color ,text-color))

(defun invoke-surrounding-output-with-3d-box
    (continuation stream &key shadow-color box-color text-color)

  (clim:surrounding-output-with-border (stream :shape :drop-shadow
					       :ink shadow-color
					       :filled t)
     (clim:surrounding-output-with-border (stream :shape :rectangle
						  :ink box-color
						  :filled t)
	(clim:with-drawing-options (stream :ink text-color)
	  (funcall continuation stream)))))

But the :drop-shadow borders are not "the right thing" and sometimes
the output is hidden underneath the "box."

For example:

     (surrounding-output-with-3d-box (stream :box-color clim:+cyan+)

       (clim:formatting-table (stream :x-spacing '(3 :character))

	  (clim:formatting-row (stream)

	     (clim:formatting-cell (stream :align-x :left)
                (surrounding-output-with-3d-box (stream :box-color clim:+red+
							:text-color clim:+green+)
		   (write-string "Input file" stream)))
             ...

places a correctly sized box around the table but the box is on top of
the table while:

       (clim:formatting-table (stream :x-spacing '(3 :character))

         (surrounding-output-with-3d-box (stream :box-color clim:+cyan+) ...)

	  (clim:formatting-row (stream)

	     (clim:formatting-cell (stream :align-x :left)
                (surrounding-output-with-3d-box (stream :box-color clim:+red+
							:text-color clim:+green+)
		   (write-string "Input file" stream)))
             ...

places a correctly sized box around "Input file" and has the text on
top but places an incorrectly sized box around the table but has the
table contents on top.  Sorry if this is a "bug report."

Thanks for your comments.

ba

Brian H. Anderson                     (206) 234-0881
Boeing Commercial Airplane Co.        bha@gumby.boeing.com
Seattle, Wa.

0,,


Main Index | Thread Index