Re: [PD] Slider/Knob

2018-09-08 Thread Antoine Rousseau
Thanks Katja, I finally did something like that (this is kept in a separate
branch (show_io) for now):

when selected, the IOs and the outline are created; they remain until the
mknob is hovered (out of edit mode) or updated (value changed), while not
being selected.

This way, for example, selecting_all then deselecting allows to show every
mknob outline, until edit mode is switched off. Of course then the
artifacts remain visible (until you hover or update the mkobs), but I hope
this won't be too much annoying, and that the gain is greater than the loss.


Antoine Rousseau
  http://www.metalu.net  __
http://www.metaluachahuter.com/




Le sam. 8 sept. 2018 à 17:53, katja  a écrit :

> On 9/8/18, Antoine Rousseau  wrote:
> > too bad, newclick(...) is never called when in edit mode...
> > so: no hovering detection when in edit mode, no way to (easily) detect
> edit
> > mode on/off switching... back to the starting point.
> > maybe i will... do nothing more ;-)
>
> You could use the select function in the widgetbehavior to draw /
> erase an outline with IOlets. A similar thing happens in
> iemgui/iem_event (although it only does an outline, no IOlets). So the
> outline + IOlets would appear when the object is selected. In
> my_canvas the select method is used to switch the outline color but in
> iem_event the rectangle is created when the object selected, and
> deleted when the object deselected.  Another option is to define
> IOlets which consist of outline only and switch outline width between
> 0 and 1 when (de)selecting.
>
> Katja
>
> >
> > Antoine Rousseau
> >   http://www.metalu.net  __
> > http://www.metaluachahuter.com/
> > 
> >
> >
> >
> > Le ven. 7 sept. 2018 à 20:33, Christof Ressi  a
> > écrit :
> >
> >> cool!
> >>
> >> > why not even showing outline and iolets as soon as the patch is
> >> > switched
> >> to edit mode?
> >>
> >> the only type of object inside the canvas which gets notified on
> editmode
> >> changes is T_TEXT (to toggle the vertical line on the right), so AFAICT
> >> it's impossible to achieve without nasty tricks (see
> >> iemguts/receivecanvas
> >> :-))
> >>
> >>
> >> Gesendet: Freitag, 07. September 2018 um 19:39 Uhr
> >> Von: "Antoine Rousseau" 
> >> An: "anto...@metalu.net" 
> >> Cc: "Christof Ressi" , Pd-list <
> >> Pd-list@lists.iem.at>
> >> Betreff: Re: Re: Re: [PD] Slider/Knob
> >>
> >> OK I just tried and mknob_newclick allows receiving hovering as you said
> >> before.
> >>
> >>
> >> Antoine Rousseau
> >>   http://www.metalu.net[http://metalu.net] __
> >>
> http://www.metaluachahuter.com/[http://www.metaluachahuter.com/compagnies/al1-ant1/]
> >>
> >>
> >> Le ven. 7 sept. 2018 à 19:32, Antoine Rousseau
> >>  >> anto...@metalu.net]> a écrit :
> >>
> >> I see; why not even showing outline and iolets as soon as the patch is
> >> switched to edit mode?
> >> But I must admit I don't know how to detect these events (object is
> >> hovered /or/ patch switches to /from edit mode). I'll try to find
> >> existing
> >> similar code, but maybe you have some pointers?
> >>
> >>
> >> Antoine Rousseau
> >>   http://www.metalu.net[http://metalu.net] __
> >>
> http://www.metaluachahuter.com/[http://www.metaluachahuter.com/compagnies/al1-ant1/]
> >>
> >>
> >> Le ven. 7 sept. 2018 à 19:20, Christof Ressi  >> [mailto:christof.re...@gmx.at]> a écrit :> you mean like the little
> >> square of the canvas object?
> >>
> >> kind of, except that my_canvas only shows the square when the object is
> >> selected. of course that's also possible! my idea was to show it when
> you
> >> hover the object in editmode, so you don't have to explicitly select the
> >> object to see where to make the connections.
> >>
> >>
> >> Gesendet: Freitag, 07. September 2018 um 18:43 Uhr
> >> Von: "Antoine Rousseau" mailto:anto...@metalu.net]>
> >> An: "Christof Ressi"
> >> mailto:christof.re...@gmx.at]>
> >> Cc: Pd-list mailto:Pd-list@lists.iem.at]>
> >> Betreff: Re: Re: [PD] Slider/Knob
> >>
> >> a visual hint (i.e. draw the rect borders and the iolets)- but only when
> >> the user hovers over the knob while the glist is in editmode
> >>
> >> you mean like the little square of the canvas object? yes, I like the
> >> idea. I'll try this soon, thanks!
> >>
> >>
> >> Antoine Rousseau
> >>   http://www.metalu.net[http://www.metalu.net][http://metalu.net[
> >> http://metalu.net]] __
> >>
> http://www.metaluachahuter.com/[http://www.metaluachahuter.com/compagnies/al1-ant1/][http://www.metaluachahuter.com/%5Bhttp://www.metaluachahuter.com/compagnies/al1-ant1/%5D]
> 
> >> <
> 

Re: [PD] Slider/Knob

2018-09-08 Thread katja
On 9/8/18, Antoine Rousseau  wrote:
> too bad, newclick(...) is never called when in edit mode...
> so: no hovering detection when in edit mode, no way to (easily) detect edit
> mode on/off switching... back to the starting point.
> maybe i will... do nothing more ;-)

You could use the select function in the widgetbehavior to draw /
erase an outline with IOlets. A similar thing happens in
iemgui/iem_event (although it only does an outline, no IOlets). So the
outline + IOlets would appear when the object is selected. In
my_canvas the select method is used to switch the outline color but in
iem_event the rectangle is created when the object selected, and
deleted when the object deselected.  Another option is to define
IOlets which consist of outline only and switch outline width between
0 and 1 when (de)selecting.

Katja

>
> Antoine Rousseau
>   http://www.metalu.net  __
> http://www.metaluachahuter.com/
> 
>
>
>
> Le ven. 7 sept. 2018 à 20:33, Christof Ressi  a
> écrit :
>
>> cool!
>>
>> > why not even showing outline and iolets as soon as the patch is
>> > switched
>> to edit mode?
>>
>> the only type of object inside the canvas which gets notified on editmode
>> changes is T_TEXT (to toggle the vertical line on the right), so AFAICT
>> it's impossible to achieve without nasty tricks (see
>> iemguts/receivecanvas
>> :-))
>>
>>
>> Gesendet: Freitag, 07. September 2018 um 19:39 Uhr
>> Von: "Antoine Rousseau" 
>> An: "anto...@metalu.net" 
>> Cc: "Christof Ressi" , Pd-list <
>> Pd-list@lists.iem.at>
>> Betreff: Re: Re: Re: [PD] Slider/Knob
>>
>> OK I just tried and mknob_newclick allows receiving hovering as you said
>> before.
>>
>>
>> Antoine Rousseau
>>   http://www.metalu.net[http://metalu.net] __
>> http://www.metaluachahuter.com/[http://www.metaluachahuter.com/compagnies/al1-ant1/]
>>
>>
>> Le ven. 7 sept. 2018 à 19:32, Antoine Rousseau
>> > anto...@metalu.net]> a écrit :
>>
>> I see; why not even showing outline and iolets as soon as the patch is
>> switched to edit mode?
>> But I must admit I don't know how to detect these events (object is
>> hovered /or/ patch switches to /from edit mode). I'll try to find
>> existing
>> similar code, but maybe you have some pointers?
>>
>>
>> Antoine Rousseau
>>   http://www.metalu.net[http://metalu.net] __
>> http://www.metaluachahuter.com/[http://www.metaluachahuter.com/compagnies/al1-ant1/]
>>
>>
>> Le ven. 7 sept. 2018 à 19:20, Christof Ressi > [mailto:christof.re...@gmx.at]> a écrit :> you mean like the little
>> square of the canvas object?
>>
>> kind of, except that my_canvas only shows the square when the object is
>> selected. of course that's also possible! my idea was to show it when you
>> hover the object in editmode, so you don't have to explicitly select the
>> object to see where to make the connections.
>>
>>
>> Gesendet: Freitag, 07. September 2018 um 18:43 Uhr
>> Von: "Antoine Rousseau" mailto:anto...@metalu.net]>
>> An: "Christof Ressi"
>> mailto:christof.re...@gmx.at]>
>> Cc: Pd-list mailto:Pd-list@lists.iem.at]>
>> Betreff: Re: Re: [PD] Slider/Knob
>>
>> a visual hint (i.e. draw the rect borders and the iolets)- but only when
>> the user hovers over the knob while the glist is in editmode
>>
>> you mean like the little square of the canvas object? yes, I like the
>> idea. I'll try this soon, thanks!
>>
>>
>> Antoine Rousseau
>>   http://www.metalu.net[http://www.metalu.net][http://metalu.net[
>> http://metalu.net]] __
>> http://www.metaluachahuter.com/[http://www.metaluachahuter.com/compagnies/al1-ant1/][http://www.metaluachahuter.com/%5Bhttp://www.metaluachahuter.com/compagnies/al1-ant1/%5D]
>> 
>>
>>
>> Le ven. 7 sept. 2018 à 17:31, Christof Ressi > [mailto:christof.re...@gmx.at][mailto:christof.re...@gmx.at[mailto:
>> christof.re...@gmx.at]]> a écrit :Hi, to be honest, I never found it to
>> be a big problem. I'm not too sure about the three outlet solution, I
>> think
>> it's indeed a bit far-stretched :-) what I would suggest is to give the
>> user a visual hint (i.e. draw the rect borders and the iolets)- but only
>> when the user hovers over the knob while the glist is in editmode. you
>> can
>> do this in mknob_newclick.
>>
>> > iolets are floating in an empty space near the knob;
>>
>> yes, this looks a bit funny, but you usually won't have the cables
>> visible
>> in your final GUI anyway, so I wouldn't worry about that.
>>
>> Christof
>>
>> Gesendet: Freitag, 07. September 2018 um 14:45 Uhr
>> Von: "Antoine Rousseau" mailto:anto...@metalu.net
>> ][mailto:anto...@metalu.net[mailto:anto...@metalu.net]]>
>> An: "Christof Ressi" mailto:christof.re...@gmx.at
>> ][mailto:christof.re...@gmx.at[mailto:christof.re...@gmx.at]]>
>> Cc: Pd-list mailto:Pd-list@lists.iem.at][mailto:
>> 

Re: [PD] Slider/Knob

2018-09-08 Thread reinklang
Hello list,
I would like to say thank you for all your comments and suggestions and files!
I didn’t expected so many answers and I didn’t expected them so quickly!
I will try and check them in the next days and I hope to find a way to deal 
with the libraries!!
Cheers
Clemens

Gesendet mit der 1&1 Mail App



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list