[PD] Pd standalone instruments ...

Martin Peach martin.peach at sympatico.ca
Wed Jul 26 20:11:34 CEST 2006


IOhannes m zmoelnig wrote:
> IOhannes m zmoelnig wrote:
>>  >
>>  >> what might be a good idea though, would be a king of "kiosk" 
>> mode, where
>>  >> the pd-main window is not present and where there are no menus at 
>> all
>>  >> (so you would have to control pd via messages).
>>  >
>>  > I think menus could stay.  Menus are ubiquitous.  But it seems the
>>  > only need for a Pd-window is debugging, or of course analysis and
>>  > such; there are times when it's needed, but there are times it isn't.
>>
>> on my side, i (and my non-freaky composers) had never a problem with 
>> the additional main-window.
>> the menus however, are really there for handling pd (the framework) 
>> and NOT your application (patch).
>> if there is NO menu, you can build your custom one (either with 
>> special widgets like [popup] or with normal [bng]s.
>
> i have committed a patch to the current CVS-pd which implements such a 
> kiosk mode as i like it:
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1529010&group_id=55736&atid=478072 
>
>
> it does:
> disable the main window
> disable menus in the patch-windows
> disable keyboard shortcuts (like Ctrl-q or Ctrl-s)
> write to stdout
>
> to enable this feature, start pd with "-kiosk" and don't forget to 
> tell pd which file it should load (as you have no more chance to open 
> it without any window)
>
> caveats:
>  - no way to open another patch (no Ctrl-o)
>  - when the last window is closed, pd keeps on running (kill it with 
> Ctrl-C on the shell)
>
Maybe send a
[;
pd quit(
 message from a patch?
> most changes are really in u_main.tk (aka pd.tk); the only changes in 
> the 2 .c-files are there for parsing the new flag and enabling 
> kiosk-mode.
> people who want to try it out without having to recompile pd, can edit 
> line 35 of u_main.tk, to set "pd_kiosk" to 1. (and copy the new 
> u_main.tk to bin/pd.tk)
I haven't tried it yet, just looking at the patch to see how it works. I 
notice you use wm withdraw on the root window.

"+#jmz: set kiosk mode (no pd-main window)
+proc pdtk_kiosk {kiosk} {
+    global pd_kiosk
+    set pd_kiosk 0
+    if {$kiosk == 1} {
+            set pd_kiosk 1
+            wm withdraw .
+    }
+}
+#/jmz
"

But in this page at tcl.tk:
http://wiki.tcl.tk/3175
there is a warning not to do that:
"

I wouldn't advise you to use "wm withdraw ." on the "." window.
Under some window managers (especially under unix...) this will prevent 
dialogs that have as parent the "." (like error messages) from showing 
up and block your app. Better to use something like:

 wm geometry . 1x1+0+0
 wm overrideredirect . 1
 wm transient .

You can even send it out of the visible part of the screen, like

 wm geometry . 1x1+3000+3000

But in any case, do not withdraw it :-)


"
Otherwise it looks like a great idea, will it do fullscreen as well?

Martin


>
>
>
> mfg.adsr.
> IOhannes
>
> _______________________________________________
> 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