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

[no subject]



....response to note from bruce miller@cam.nist.gov

 This reminds me of a problem I've been having that I've never gotten to
work right.  I've defined a graphics program using DW, program frame
etc.  Everything is written in such a way that it can be done in BW or
color... Except for how to get it there!

When the program gets initally selected; it should:
  Go on the only screen if there is only one.
  Allow a choice (or at least go on the color screen) if there is a
choice.

I tried using the :SUPERIOR option to define-program-framework. This
seemed to be working pre-8, but in 8 seems to get created on B&W; at
least if I use the <select>-char mechanism.

If I use :select activity <program> on sheet <sheet>, 
then (providing I've already made a color sheet to choose from!),  I can
select color or BW and even have the program running on both screens.
But this is very awkward, cause what I'ld really like (eventually) is to
be able to choose the color screen type (8bit or 24bit).  Eg. on a color
system, <select>-char would bring up a menu with options "B&W", "8bit
color", "24bit color". [Bonus, does anybody REALLY understand all that
:minimum-bits-per-pixel, :create-options, :controller-types... garbage?]

---------------------------------------------------------------------

  We had the same problems when we modified our applications to work
  in color.  We had still more problems when we put a second color
  controller in our 3650's to support more than one color screen.  
  Finally, it took even more changes to make them work properly remotely
  on PC's via X-windows.  This is what we are currently using.

        (setf my-screen
	      (if color-p       ;; Color-p is passed in 
		  (if (OR (not (boundp 'color:color-screen))
			  (AND (boundp 'color:color-screen)
			       (null color:color-screen)))
		      (color:create-color-screen)
		    ;else               
		      (color:find-color-screen))
		 ;else                          
		  (tv:mouse-default-superior)))

        (tv:make-window 'my-window-flavor
			 :edges-from :mouse
			 :superior my-screen)

     ;; in applications where we automatically have edges calculated
     ;; (ie: when we don't use ":edges-from :mouse) we perform another
     ;; check to see if we are on an NTSC screen.

     ;;;
     ;;; If we are creating a window for a standard NTSC based Television Screen
     ;;; make the screen smaller than the default maximum so it will fit on cheaper
     ;;; TV's that don't have an under-scan mode.  These TV's chop off approx 26
     ;;; pixels on the left and top and slightly less on the right and bottom.

      (if (search "ntsc" (send my-screen :name))
		(multiple-value-bind (left top right bottom)
		    (send my-screen :inside-edges)

		  (TV:MAKE-WINDOW 'my-window-flavor
				  :superior my-screen
				  :edges
				    `(,(+ left 26)	    ;; Left
				      ,(+ top  26)	    ;; Top
				      ,(- right 18)	    ;; Right
				      ,(- bottom 13)))))    ;; Bottom

  ===========================================================================
  Jim Dumoulin / NASA - Kennedy Space Center FL.