i finally have a chance to play around with the gui-plugin stuff. using "tkcanvas itemconfigure" im playing around with changing the look of my patches in performance mode. question: is there a list / documentation of the gui elements? other than reading over the pd-gui tcl code?
without knowing much i was doing things like:
$tkcanvas itemconfigure text -fill red -font Helvetica -size 16
but -size gives me error
so maybe there is something more other than a trial and error approach or use of css knowledge which obviously does not completely translate.
m
From: me.grimm megrimm@gmail.com To: pd_list Listserve pd-list@iem.at Sent: Thursday, January 24, 2013 4:06 PM Subject: [PD] gui elements documentation / list
i finally have a chance to play around with the gui-plugin stuff. using "tkcanvas itemconfigure" im playing around with changing the look of my patches in performance mode. question: is there a list / documentation of the gui elements? other than reading over the pd-gui tcl code?
without knowing much i was doing things like:
$tkcanvas itemconfigure text -fill red -font Helvetica -size 16
but -size gives me error
so maybe there is something more other than a trial and error approach or use of css knowledge which obviously does not completely translate.
Most of those are just tk settings, not specific to Pd.
http://www.tcl.tk/man/tcl8.5/TkCmd/canvas.htm#M48 http://www.tcl.tk/man/tcl8.5/TkCmd/canvas.htm#M144
Text items don't have a -size option, hence the error.
tk events and tcl arrays specific to the Pd GUI can be found here: http://puredata.info/docs/guiplugins/GuiPluginsAPI/
-Jonathan
m
-- ____________________ m.e.grimm | m.f.a | ed.m. megrimm@gmail.com _________________________________ _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd uses almost all of the available widgets in Tk: http://www.tcl.tk/man/tcl8.5/Keywords/W.htm#widget
The 'text' widget doesn't respond to -size: http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm
You need to specify the point or pixel size as part of the font: $tkcanvas itemconfigure text -fill red -font {Helvetica 16} ;# points $tkcanvas itemconfigure text -fill red -font {Helvetica -16} ;# negative is pixels
You can also create a 'font' to have that setting in one spot: http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm
Please add anything you find useful to the wiki: http://puredata.info/docs/guiplugins/GUIPlugins/
.hc
On 01/24/2013 04:06 PM, me.grimm wrote:
i finally have a chance to play around with the gui-plugin stuff. using "tkcanvas itemconfigure" im playing around with changing the look of my patches in performance mode. question: is there a list / documentation of the gui elements? other than reading over the pd-gui tcl code?
without knowing much i was doing things like:
$tkcanvas itemconfigure text -fill red -font Helvetica -size 16
but -size gives me error
so maybe there is something more other than a trial and error approach or use of css knowledge which obviously does not completely translate.
m
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
You need to specify the point or pixel size as part of the font: $tkcanvas itemconfigure text -fill red -font {Helvetica 16} ;# points $tkcanvas itemconfigure text -fill red -font {Helvetica -16} ;# negative
is
pixels
ah thats helpful thank you!
it might be too much but how about turning on/off gui-plugins directly from a patch by sending messages to pd?
also i did something like:
proc RandomInteger1 {max} { return [expr {int(rand()*$max) + 1}] }
to randomize font size etc. right now when i open my patch i have to click on and off the patch to refresh.... is there just a refresh pd command i can send so i count refresh with a metro for example to create little animated randomized object boxes?
i thought you could send a [;pd refresh{ or something like that but i cant find it. am i crazy?
m
On Thu, Jan 24, 2013 at 4:30 PM, Hans-Christoph Steiner hans@at.or.atwrote:
Pd uses almost all of the available widgets in Tk: http://www.tcl.tk/man/tcl8.5/Keywords/W.htm#widget
The 'text' widget doesn't respond to -size: http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm
You need to specify the point or pixel size as part of the font: $tkcanvas itemconfigure text -fill red -font {Helvetica 16} ;# points $tkcanvas itemconfigure text -fill red -font {Helvetica -16} ;# negative is pixels
You can also create a 'font' to have that setting in one spot: http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm
Please add anything you find useful to the wiki: http://puredata.info/docs/guiplugins/GUIPlugins/
.hc
On 01/24/2013 04:06 PM, me.grimm wrote:
i finally have a chance to play around with the gui-plugin stuff. using "tkcanvas itemconfigure" im playing around with changing the look of my patches in performance mode. question: is there a list / documentation of the gui elements? other than reading over the pd-gui tcl code?
without knowing much i was doing things like:
$tkcanvas itemconfigure text -fill red -font Helvetica -size 16
but -size gives me error
so maybe there is something more other than a trial and error approach or use of css knowledge which obviously does not completely translate.
m
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 01/24/2013 05:11 PM, me.grimm wrote:
You need to specify the point or pixel size as part of the font: $tkcanvas itemconfigure text -fill red -font {Helvetica 16} ;# points $tkcanvas itemconfigure text -fill red -font {Helvetica -16} ;# negative
is
pixels
ah thats helpful thank you!
it might be too much but how about turning on/off gui-plugins directly from a patch by sending messages to pd?
also i did something like:
proc RandomInteger1 {max} { return [expr {int(rand()*$max) + 1}] }
to randomize font size etc. right now when i open my patch i have to click on and off the patch to refresh.... is there just a refresh pd command i can send so i count refresh with a metro for example to create little animated randomized object boxes?
i thought you could send a [;pd refresh{ or something like that but i cant find it. am i crazy?
m
One thing I want to add is a 'pd-gui' receive for sending messages to the GUI. This would be analogous to the 'pd' receive, i.e. [;pd dsp 1( But that's just an idea at this point.
For your case, I think you want to bind to the <<Loaded>> event to refresh once the patch is finished loading. Then also, you could bind to a FocusIn event to make something happen whenever the window gets focus. There are other events you can bind to that will be useful to you: http://www.tcl.tk/man/tcl8.5/TkCmd/bind.htm
.hc
On Thu, Jan 24, 2013 at 4:30 PM, Hans-Christoph Steiner hans@at.or.atwrote:
Pd uses almost all of the available widgets in Tk: http://www.tcl.tk/man/tcl8.5/Keywords/W.htm#widget
The 'text' widget doesn't respond to -size: http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm
You need to specify the point or pixel size as part of the font: $tkcanvas itemconfigure text -fill red -font {Helvetica 16} ;# points $tkcanvas itemconfigure text -fill red -font {Helvetica -16} ;# negative is pixels
You can also create a 'font' to have that setting in one spot: http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm
Please add anything you find useful to the wiki: http://puredata.info/docs/guiplugins/GUIPlugins/
.hc
On 01/24/2013 04:06 PM, me.grimm wrote:
i finally have a chance to play around with the gui-plugin stuff. using "tkcanvas itemconfigure" im playing around with changing the look of my patches in performance mode. question: is there a list / documentation of the gui elements? other than reading over the pd-gui tcl code?
without knowing much i was doing things like:
$tkcanvas itemconfigure text -fill red -font Helvetica -size 16
but -size gives me error
so maybe there is something more other than a trial and error approach or use of css knowledge which obviously does not completely translate.
m
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
----- Original Message -----
From: Hans-Christoph Steiner hans@at.or.at To: pd-list@iem.at Cc: Sent: Thursday, January 24, 2013 4:30 PM Subject: Re: [PD] gui elements documentation / list
Pd uses almost all of the available widgets in Tk: http://www.tcl.tk/man/tcl8.5/Keywords/W.htm#widget
The 'text' widget doesn't respond to -size: http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm
The reported error is in regard to an option for a text item on a canvas widget, not an option for the text widget. Those two concepts share the same name-- "text"-- but that is it.
tk -> text widget = powerful multiline text display, lots of control over text/font settings, can embed images and other tk widgets tk -> canvas -> text item = limited text display inside a prexisting canvas, limited control over text/font, no embedding
-Jonathan
You need to specify the point or pixel size as part of the font: $tkcanvas itemconfigure text -fill red -font {Helvetica 16} ;# points $tkcanvas itemconfigure text -fill red -font {Helvetica -16} ;# negative is pixels
You can also create a 'font' to have that setting in one spot: http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm
Please add anything you find useful to the wiki: http://puredata.info/docs/guiplugins/GUIPlugins/
.hc
On 01/24/2013 04:06 PM, me.grimm wrote:
i finally have a chance to play around with the gui-plugin stuff. using "tkcanvas itemconfigure" im playing around with changing the look
of my
patches in performance mode. question: is there a list / documentation of the gui elements? other than reading over the pd-gui tcl code?
without knowing much i was doing things like:
$tkcanvas itemconfigure text -fill red -font Helvetica -size 16
but -size gives me error
so maybe there is something more other than a trial and error approach or use of css knowledge which obviously does not completely translate.
m
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list