Lisp HUG Maillist Archive

Colored text in capi::collector-pane

Hello everybody,

I am trying to use colors in capi:collector-pane to show warnings (in orange) as in the Lispworks listener window.
Any hints or pointers to set up a similar behavior ?

Best regards,
Jérémie Garcia



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Colored text in capi::collector-pane

Hello Jeremie,

here is what I use to set default colors for my lispworks session:

(defun set-pane-background-colors (x)
   (typecase x
     (capi:echo-area-pane
      (setf (capi:simple-pane-background x) (color:make-rgb 1.0 .67 0.67)))
     (capi:collector-pane
      (setf (capi:simple-pane-background x) (color:make-rgb .8 1.0 .8)))
     (capi:listener-pane
      (setf (capi:simple-pane-background x) (color:make-rgb .8 .8 1.0)))
     (capi:editor-pane
      (setf (capi::simple-pane-background x) (color:make-rgb .9 .9 .8)
;       (capi::simple-pane-foreground x) :black
        ))
     (capi:tab-layout
      (mapcar 'set-pane-background-colors (capi:tab-layout-panes x)))
;    (capi:output-pane
;     (setf (capi:simple-pane-background x) :black
;       (capi::simple-pane-foreground x) :white))
     ))

(let ((*HANDLE-WARN-ON-REDEFINITION* :warn)
       (*redefinition-action* :warn))
   (defmethod capi:interface-display :before ((self lw-tools:listener))
     (capi:map-pane-descendant-children
      self 'set-pane-background-colors))
   (defmethod capi:interface-display :before ((self lw-tools:editor))
     (capi:map-pane-descendant-children
      self 'set-pane-background-colors))
   )

You could just use the above to set one particular pane's foreground and 
background, of course.

HTH

Raymond Laning

On 2/19/2015 12:48 PM, Jérémie Garcia wrote:
> Hello everybody,
>
> I am trying to use colors in capi:collector-pane to show warnings (in orange) as in the Lispworks listener window.
> Any hints or pointers to set up a similar behavior ?
>
> Best regards,
> Jérémie Garcia
>
>
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
>
>

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:33 UTC