[PD] gui-plugins

Hans-Christoph Steiner hans at at.or.at
Mon Feb 18 01:41:32 CET 2013




On 02/17/2013 06:55 PM, Rob Bothof wrote:
> thanks,
> 
> would it be possible to change the color a cord has when connecting one object
> to another ?

You mean different colors for different cords depending on which objects it
connected?  That would be possible, but would be a project.  You'd have to
find a way to maintain the IDs/tags for each object and each cord and
colorized based on that.  Pd currently doesn't have any way to store that
state, so you would have to write whatever state saving you want.

> for the gui objects like bang, toggle slider etc i've come up with an approach
> of which i'm wondering if it would work to some extend through
> making changes to the put-menu.
> i've traced the tcl menu, to put for example a toggle in the patch, it sends
> the command: pdsend $window "toggle"
> 
> would it be possible to supply creation arguments for the objects here ?

Not using that command.  If you want to do that, then you want to do the
standard dynamic patching commands.  You can find documentation for that in
manuals -> pd-msg.

.hc



> regards,
> Rob
>> There are a few ways to change the colors of the cords:
>>
>> * using the global variables $::signal_cord/$::signal_nlet and
>> $::msg_cord/$::msg_nlet, i.e. you could add this to a GUI plugin:
>>
>>      set signal_cord green
>>      set signal_nlet pink
>>      set msg_cord darkblue
>>      set msg_nlet red
>>
>> * using the Tk tag 'cord' and sending a command to the patch's Tk canvas,
>> which you can do in a GUI plugin, in response to when its loaded, when it
>> changed Editmode, etc.
>>
>> bind all <<Loaded>> "%W itemconfigure cord -fill yellow -width 1"
>>
>>
>>   * you can also do that in a patch, and per-patch, use [hcs/canvas_name] to
>> get the canvas ID, then send that to this message:
>>
>>    [$1 itemconfigure cord -fill yellow -width 1(
>>
>> The width is optional, but I thought I'd throw it in there to play with.
>> There are other was with GUI plugins too, like using the Tk option command,
>> with or without the tags.  I'm going to add more info about the Tk tags to the
>> API wiki:
>>
>> http://puredata.info/docs/guiplugins/GuiPluginsAPI
>>
>> .hc
>>
>> On 02/17/2013 12:35 PM, Rob Bothof wrote:
>>> Hi List,
>>>
>>> I've been fooling around with the gui-plugins, great stuff,
>>> and combined the fullscreen with the kiosk plugin to make it switchable
>>> and hide the mouse, which is perfect for my intended use with a tablet pc
>>>
>>> when experimenting with this, and browsing the tcl files
>>> i'm now working on an inverted (white on black) color-scheme for pd editing,
>>> but there are a few things i can't find in the tcl files:
>>>
>>> - I can change the colors of the wires, but not the color a wire has when
>>> connecting one box to another, can this be changed with a tcl setting ?
>>>
>>> - is it possible to change the default/initial colors of gui-objects like
>>> bang, tgl etc
>>> through tcl or are these hardcoded in C ?
>>>
>>> kind regards,
>>> Rob
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pd-list at iem.at mailing list
>>> UNSUBSCRIBE and account-management ->
>>> http://lists.puredata.info/listinfo/pd-list
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



More information about the Pd-list mailing list