Lisp HUG Maillist Archive

how to create one pane without showing it.

Unable to parse email body. Email id is 10596

Re: how to create one pane without showing it.

Unable to parse email body. Email id is 10597

Re: how to create one pane without showing it.

Unable to parse email body. Email id is 10598

Re: how to create one pane without showing it.

Unable to parse email body. Email id is 10599

Re: how to create one pane without showing it.

I wonder if the mention of interface is the key.  On LWM (at least),

(capi:contain (make-instance 'capi:interface) :display-state :hidden)

displays the interface on the screen.  Perhaps the OP should pass the
display-state argument to the make-instance and use capi:display:

(capi:display (make-instance 'capi:interface :display-state :hidden))

Although I notice that capi:simple-pane-handle on the returned
interface just returns -1.  Maybe there's a more useful value on other
systems.

//JT

On Fri, Sep 24, 2010 at 11:27 AM, Nick Levine <ndl@ravenbrook.com> wrote:
>
> That's odd. I've been using this for years and it's never done
> that. What platform are you on? (I'm using LWW.)
>
> - nick
>
>   Date: Fri, 24 Sep 2010 23:15:12 +0800
>   From: Xu Jingtao <jingtaozf@gmail.com>
>
>   I try it with my interface and it hide the interface immediatelly
>   after it displayed on the screen.  But,how to hide the interface
>   before it showed or don't let user see this blink.
>
>   ndl>    Date: Fri, 24 Sep 2010 21:21:11 +0800
>   ndl>    From: Xu Jingtao <jingtaozf@gmail.com>
>   ndl>
>   ndl>
>   ndl>    hello,
>   ndl>    i want to create one capi pane without showing it,and
>   ndl>    (simple-pane-handle it) will return one valid value.
>   ndl>
>   ndl> (capi:contain (make-instance 'capi:simple-pane)
>   ndl>               :display-state :hidden)
>   ndl>
>   ndl> - n
>
>
>



-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/


Re: how to create one pane without showing it.


On Sep 24, 2010, at 11:32 AM, Joshua TAYLOR wrote:

> I wonder if the mention of interface is the key.  On LWM (at least),
> 
> (capi:contain (make-instance 'capi:interface) :display-state :hidden)

this should be:

(capi:contain (make-instance 'capi:interface :display-state :hidden))

warmest regards,

Ralph


Raffael Cavallaro
raffaelcavallaro@me.com






Re: how to create one pane without showing it.


On Sep 24, 2010, at 9:21 AM, Xu Jingtao wrote:

> hello,
> i want to create one capi pane without showing it,and 
> (simple-pane-handle it) will return one valid value.

1. From the docs on simple-pane-handle

"If pane is not displayed, or if pane does not have an underlying window, then handle is nil"

i.e., you must display the pane for simple-pane-handle to return a non-nil value.

2. not sure exactly what you're doing, but here's a simple example of how to have an interface with a pane that is hidden by default that you can display when you want (programmatically, etc.)

CL-USER 95 > (capi:define-interface my-interface () ()
                   (:panes
                    (text capi:text-input-pane :accessor my-text-pane))
                   (:default-initargs
                    :create-callback
                    (lambda (self)
                      (capi:hide-pane (my-text-pane self)))))
MY-INTERFACE

CL-USER 96 > (defparameter *my-interface-instance*
               (capi:display (make-instance 'my-interface)))
*MY-INTERFACE-INSTANCE*

;; it is now displayed, but the text-input-pane is hidden

CL-USER 97 > (capi:show-pane (my-text-pane *my-interface-instance*))
#<CAPI:TEXT-INPUT-PANE TEXT  414015BE0B>

;; now it's shown

CL-USER 98 > (capi:hide-pane (my-text-pane *my-interface-instance*))
#<CAPI:TEXT-INPUT-PANE TEXT  414015BE0B>

;; now it's hidden again

warmest regards,

Ralph


Raffael Cavallaro
raffaelcavallaro@me.com






Re: how to create one pane without showing it.

>>>>> On Fri, 24 Sep 2010 11:32:48 -0400, Joshua TAYLOR said:
> 
> I wonder if the mention of interface is the key.  On LWM (at least),
> 
> (capi:contain (make-instance 'capi:interface) :display-state :hidden)
> 
> displays the interface on the screen.  Perhaps the OP should pass the
> display-state argument to the make-instance and use capi:display:
> 
> (capi:display (make-instance 'capi:interface :display-state :hidden))

Yes, that might be the problem.  See the documentation for how make-container
uses the arguments:
http://www.lispworks.com/documentation/lw60/CAPRM/html/capiref-213.htm


> Although I notice that capi:simple-pane-handle on the returned
> interface just returns -1.  Maybe there's a more useful value on other
> systems.

That is because the Mac window system's top level interfaces are quite
different from the panes inside them so capi:simple-pane-handle is not able to
return anything useful.  It returns a handle on other systems.


> 
> //JT
> 
> On Fri, Sep 24, 2010 at 11:27 AM, Nick Levine <ndl@ravenbrook.com> wrote:
> >
> > That's odd. I've been using this for years and it's never done
> > that. What platform are you on? (I'm using LWW.)
> >
> > - nick
> >
> >   Date: Fri, 24 Sep 2010 23:15:12 +0800
> >   From: Xu Jingtao <jingtaozf@gmail.com>
> >
> >   I try it with my interface and it hide the interface immediatelly
> >   after it displayed on the screen.  But,how to hide the interface
> >   before it showed or don't let user see this blink.
> >
> >   ndl>    Date: Fri, 24 Sep 2010 21:21:11 +0800
> >   ndl>    From: Xu Jingtao <jingtaozf@gmail.com>
> >   ndl>
> >   ndl>
> >   ndl>    hello,
> >   ndl>    i want to create one capi pane without showing it,and
> >   ndl>    (simple-pane-handle it) will return one valid value.
> >   ndl>
> >   ndl> (capi:contain (make-instance 'capi:simple-pane)
> >   ndl>               :display-state :hidden)
> >   ndl>
> >   ndl> - n
> >
> >
> >
> 
> 
> 
> -- 
> Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
> 

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/


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