Hello All,
I'm still on that slow process of learning how one writes graphical externals.
I was wondering if anyone has a very simple graphical external example? Perhaps something that just creates a label widget, perhaps with a property dialog to change the text therin?
I'm currently looking at the simplest graphical things I can find, which are the iemgui objects, bang etc.. Are these now internals? Are they written differently than if they were externals?
Thanks all.
Ben
On Tue, 10 Feb 2004, B. Bogart wrote:
Hello All,
I'm still on that slow process of learning how one writes graphical externals.
I was wondering if anyone has a very simple graphical external example? Perhaps something that just creates a label widget, perhaps with a property dialog to change the text therin?
I'm currently looking at the simplest graphical things I can find, which are the iemgui objects, bang etc.. Are these now internals? Are they written differently than if they were externals?
Take a look at the even simpler graphical objects in pd, like the numberbox and the "objects", the message boxes. Basically you have to fill up the widgetbehaviour structure which defines, well, the widgetbehaviour. For the properties dialogs you will have to write some tcl/tk code in u_main.tk (or you reuse the existing dialogs). There is a third option of sending the tcl/tk code from your external, but this is pretty ugly.
I think I mentioned this before, and I am sure Krysztof did it too, graphical externals written this way can cause performance problems. It would be a lot better to reuse tcl/tk widgets, ...
Guenter
Hallo, guenter geiger hat gesagt: // guenter geiger wrote:
I think I mentioned this before, and I am sure Krysztof did it too, graphical externals written this way can cause performance problems. It would be a lot better to reuse tcl/tk widgets, ...
... an approach you took in you own externals, which you humbly kept secret. ;)
I think, they are quite useful, although the ones I have here don't do graph on parent...
ciao
On Tue, 10 Feb 2004, Frank Barknecht wrote:
Hallo, guenter geiger hat gesagt: // guenter geiger wrote:
I think I mentioned this before, and I am sure Krysztof did it too, graphical externals written this way can cause performance problems. It would be a lot better to reuse tcl/tk widgets, ...
... an approach you took in you own externals, which you humbly kept secret. ;)
;) I have not seriously written externals for years now, the ones that you mention are mere "case studies", for private use, evolved out of my old gui collection which I had to discontinue because of some, well, communication problems.
I don't keep them secret, I have just given in.
I think, they are quite useful, although the ones I have here don't do graph on parent...
Well, they are restricted in functionality, and, yes, I didn't take the time to figure out the GOP thing, no one asked for it either :)
They do the job for me.
Guenter
ciao
Frank Barknecht _ ______footils.org__
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
guenter geiger wrote:
On Tue, 10 Feb 2004, B. Bogart wrote:
Hello All,
I'm still on that slow process of learning how one writes graphical externals.
I was wondering if anyone has a very simple graphical external example? Perhaps something that just creates a label widget, perhaps with a property dialog to change the text therin?
I'm currently looking at the simplest graphical things I can find, which are the iemgui objects, bang etc.. Are these now internals? Are they written differently than if they were externals?
Take a look at the even simpler graphical objects in pd, like the numberbox and the "objects", the message boxes. Basically you have to fill up the widgetbehaviour structure which defines, well, the widgetbehaviour. For the properties dialogs you will have to write some tcl/tk code in u_main.tk (or you reuse the existing dialogs). There is a third option of sending the tcl/tk code from your external, but this is pretty ugly.
I think I mentioned this before, and I am sure Krysztof did it too, graphical externals written this way can cause performance problems. It would be a lot better to reuse tcl/tk widgets, ...
yeh, it might be slower this way, but how can you insert your tcl/tk in u_main.tk ( which is distributed with pd ) without ugly patches?
if your graphical updater runs in a thread, it works smoothly.
cheers, sevy
Guenter
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
On Tue, 10 Feb 2004, Yves Degoyon wrote:
yeh, it might be slower this way, but how can you insert your tcl/tk in u_main.tk ( which is distributed with pd ) without ugly patches?
if your graphical updater runs in a thread, it works smoothly.
Mhmm, yes, true. Is this what you use this in your graphical externals ?
Guenter
cheers, sevy
Guenter
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
On Tue, 10 Feb 2004, Yves Degoyon wrote:
yeh, it might be slower this way, but how can you insert your tcl/tk in u_main.tk ( which is distributed with pd ) without ugly patches?
Btw, there is a command called "source" that loads a TCL program inside the TCL interpreter. So basically it would be like:
sys_vgui("global pd_guidir; source ${pd_guidir}/extra/myscript.tk\n");
________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju