Re: CAPI: Simulating a button press programmatically
I think that I did something like this 10 years ago (my code is hard to find, in a cardboard box somewhere downstairs).
I think that I created my own button class, maybe sub-classing capi:button and playing with the *-image components of the class. Sub-classing CAPI classes is a useful trick.
You might try using the class browser on capi:button to see if anything interesting shows up. You might need to use an unsupported feature which LW folk might leak to you.
Graphically, what you want turns out to be a simple gimmick (so simple that I had a V8-moment (a T.V. commercial in N.A. - slapped my forehead and laughed) when I finally figured it out).
A grey text button, when unpressed, is a rectangular, grey text area which is slightly smaller than the full button rectangle.
The grey text area sits below and to the right of the button area (touching the right and bottom sides of the button).
There is a light-gray strip on the left hand side and on the top edge.
When the button is pressed in, the text area is moved (translated) to touch the top and left hand sides of the button and a dark grey strip (“shadow”) appears at the right and bottom parts of the button - this gives it the 3D effect of being punched in.
Or, is it that there are strips on all four sides? Light grey at left and top, dark grey at right and bottom when the button is “out” and v.v. when the button is “in”? Watch the video you posted (slowly) and you’ll see what happens.
IIRC, I created “out” and “in” images using Inkscape, then, somehow hooked them to my button class and gave myself control over which image was displayed.
pt
> On Jun 24, 2017, at 11:08 AM, Frank Gönninger | Gönninger B&T <frank.goenninger@goenninger.net> wrote:
>
> Hi David,
>
>> Am 24.06.2017 um 14:26 schrieb David McClain <dbm@refined-audiometrics.com>:
>>
>> Hi Frank,
>>
>> I assume you are describing a system with a dual interface - one in hardware with actual buttons, and a parallel interface on a computer screen with mouse-simulated buttons to perform the same functions.
>
> Exactly - thanks for your prompt reply!
>
> Reading your answer I realized I was a bit unclear in my post - I also wanted to have a "button pressed“ effect displayed: The buttnn changes its appearance to show a "button movement“ simulation - as is shown here: https://www.youtube.com/watch?v=PrVVo4tQY50
>
> I understand that calling the underlying subordinate function then effects the same function as the button being pressed but that just is then missng the visual feedback.
>
> Thanks again!
>
> Regards
>
> Frank
>
>
>
>
>
> _______________________________________________
> 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