Lisp HUG Maillist Archive

CAPI:SLIDER panes

Hi all,

I'm trying to use a CAPI:SLIDER pane, and I have a few questions. From
the example application maze.lisp, it seems that to find the value of
the of the slider pane, one ought to use CAPI:RANGE-SLUG-START, though
I didn't find this explicitly stated anywhere. Is this correct?

Also, should there be a noticeable effect in specifying true or false
for :SHOW-VALUE-P? I thought maybe it would change whether the slider
automatically updated after programmatic changes to
CAPI:RANGE-SLUG-START, but in the following it doesn't seem to make a
difference:

CL-USER 7 > (setf slider1 (capi:contain (make-instance 'capi:slider
:show-value-p t)))
#<CAPI:SLIDER :HORIZONTAL 23532F3F>

CL-USER 8 > (setf slider2 (capi:contain (make-instance 'capi:slider
:show-value-p nil)))
#<CAPI:SLIDER :HORIZONTAL 2347E517>

CL-USER 9 > (capi:apply-in-pane-process slider1 (lambda () (setf
(capi:range-slug-start slider1) 23)))
NIL

CL-USER 10 > (capi:apply-in-pane-process slider2 (lambda () (setf
(capi:range-slug-start slider2) 23)))
NIL

Finally, the values from the slider pane (retrieved using
CAPI:RANGE-SLUG-START) are integral values. This is what I'm looking
for, but I'm wondering if there's a way to get the slider to `click'
to the particular integer values.

Thanks in advance,
//JT

-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
 back in the goodle days."
 John Hartford


Re: CAPI:SLIDER panes

On Fri, Aug 22, 2008 at 3:55 PM, Joshua TAYLOR <tayloj@cs.rpi.edu> wrote:
> Hi all,
>
> I'm trying to use a CAPI:SLIDER pane, and I have a few questions. From
> the example application maze.lisp, it seems that to find the value of
> the of the slider pane, one ought to use CAPI:RANGE-SLUG-START, though
> I didn't find this explicitly stated anywhere. Is this correct?
>
> Also, should there be a noticeable effect in specifying true or false
> for :SHOW-VALUE-P? I thought maybe it would change whether the slider
> automatically updated after programmatic changes to
> CAPI:RANGE-SLUG-START, but in the following it doesn't seem to make a
> difference:
>
> CL-USER 7 > (setf slider1 (capi:contain (make-instance 'capi:slider
> :show-value-p t)))
> #<CAPI:SLIDER :HORIZONTAL 23532F3F>
>
> CL-USER 8 > (setf slider2 (capi:contain (make-instance 'capi:slider
> :show-value-p nil)))
> #<CAPI:SLIDER :HORIZONTAL 2347E517>
>
> CL-USER 9 > (capi:apply-in-pane-process slider1 (lambda () (setf
> (capi:range-slug-start slider1) 23)))
> NIL
>
> CL-USER 10 > (capi:apply-in-pane-process slider2 (lambda () (setf
> (capi:range-slug-start slider2) 23)))
> NIL

I should have clarified here. I'm on LWM5.1. I know that the doc page
states that :show-value-p is ignored on Windows. I'm interested in
whether it ought to do anything on OS X.

> Finally, the values from the slider pane (retrieved using
> CAPI:RANGE-SLUG-START) are integral values. This is what I'm looking
> for, but I'm wondering if there's a way to get the slider to `click'
> to the particular integer values.
>
> Thanks in advance,
> //JT
>
> --
> =====================
> Joshua Taylor
> tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu
>
> "A lot of good things went down one time,
>  back in the goodle days."
>  John Hartford
>



-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
 back in the goodle days."
 John Hartford


Re: CAPI:SLIDER panes

Unable to parse email body. Email id is 8598

Re: CAPI:SLIDER panes

On Wed, Aug 27, 2008 at 3:51 PM, Martin Simmons <martin@lispworks.com> wrote:
>
>>>>>> On Fri, 22 Aug 2008 15:55:57 -0400, Joshua TAYLOR said:
>>
>> Hi all,
>>
>> I'm trying to use a CAPI:SLIDER pane, and I have a few questions. From
>> the example application maze.lisp, it seems that to find the value of
>> the of the slider pane, one ought to use CAPI:RANGE-SLUG-START, though
>> I didn't find this explicitly stated anywhere. Is this correct?
>
> Yes.
>
>
>> Also, should there be a noticeable effect in specifying true or false
>> for :SHOW-VALUE-P? I thought maybe it would change whether the slider
>> automatically updated after programmatic changes to
>> CAPI:RANGE-SLUG-START, but in the following it doesn't seem to make a
>> difference:
>
> No, sorry, Cocoa doesn't implement this.

Ah, OK. I saw "Note: show-value-p  is ignored on Microsoft Windows."
but didn't see anything about Cocoa. I guess this is only for Motif
then. I'm just curious, what does it do? (I don't have an X11 setup
handy to try this out.)

>> Finally, the values from the slider pane (retrieved using
>> CAPI:RANGE-SLUG-START) are integral values. This is what I'm looking
>> for, but I'm wondering if there's a way to get the slider to `click'
>> to the particular integer values.
>
> Not at the moment, but I'll add it as a feature request.

OK, thanks!--

//JT


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