RE: Podium Message
Hmm,
Well I found out that the reason I can't change the font is because I
am using interfaces. There is a line in the documentation on Interfaces
that says that although they are Titled Objects, you can't set or get
the titled-object-message-font through them.
With windows I create myself I have no trouble setting the message
font using
(setf (capi:titled-object-message-font my-win)
(gp:make-font-description....
The problem then for me is, how do I get ahold of the Podium window to
do that? The only way I have been able to get ahold of anything through
searching is to grab that interface using capi:locate-interface.
Is there a function that will find a window given some parameters (and
what kind of parameters would identify the Podium)? Alternately, is
there a way that I could grab the actual pane given an interface?
Thanks,
Shawn
-----Original Message-----
From: Shawn Nicholson
Sent: Wednesday, June 22, 2005 2:20 PM
To: lisp-hug@lispworks.com
Subject: RE: Podium Message
Well,
I found out the focus effect is happening because I am calling
capi:find-interface. Switching to using capi:locate-interface instead
has solved the flashing issue since that function does not select the
window.
Please feel free to let me know if I'm doing things totally the wrong
way (I'm new to Lispworks).
Now back to trying to figure out how to set the font for the message.
Shawn
-----Original Message-----
From: Shawn Nicholson
Sent: Wednesday, June 22, 2005 2:02 PM
To: Lispworks Mailing List (lisp-hug@lispworks.com)
Subject: Podium Message
Hello again,
I am trying to print a message to the LW IDE Podium status area (where
it shows things like "Active Window: Listener 1" when you change
windows).
I have written the following function to do this:
(defun set-podium-message (msg)
(let* ((podium-interface (capi:find-interface
'lispworks-tools::podium))
(message-area (capi:titled-object-message podium-interface)))
(setf (capi:titled-object-message podium-interface) msg)))
where msg is a string
(if there is another, more correct way, please let me know).
The problem I am having with it is that it is changing the window focus
to the Podium when I call this function. This is undesired behavior.
Currently wherever I use this, I save what the (current-window) is, then
call my set-podium-message, then go back to the saved current window.
This works, however, when it is called repeatedly (in quick succession)
it generates some very annoying flashes as the active window keeps
flipping back and forth.
Is there a command to set that message without causing it to select the
associated window? Or does anyone know where the code is that causes
the "Active Window: Listener 1" messages to be displayed when you change
windows (so that I can see how they do it and adapt it to my situation).
When I use the titled-object-message slot method on a window that I
create, I don't get this selection behavior.
CL-USER 42 > (setq w1 (capi:contain (make-instance 'capi:text-input-pane
:message "A message")))
CL-USER 44 > (setf (capi:titled-object-message w1) "heya shawn")
"heya shawn"
does not cause the container window to be selected (leaving focus in
the listener).
On a related note, I haven't been able to figure out how to set the
font for that message, if anyone can assist with that.
Thank you,
Shawn