In an other thread (
http://forum.cockos.com/showthread.php?t=165332), a discussion concerning global layouts has started, these being almost undocumented. But, as it was obviously off-topic, and the concept rather interesting for theming development, I was thinking that creating a new thread about these would be more relevent and could help gathering more informations about them. So, here it is.
I made few tests concerning the global layouts, thanks to the
BBS theme (and to Lokasenna who pointed me to it...
). This theme, AFAIK, is one of the very few themes in the stash that use them, if not the only one. Actually, the
rtconfig.txt file of it is rather complicated with a mix of Global layouts, which include layouts for different panels, and 'independent' layouts (not included in a Global one). Some global layouts have layouts for 5 among the 6 panels available for theming, some only for few ones and there is even one which includes only one layout. Beside this, in a given global layout, some of the layouts included point to different images subfolders. So, testing all this leads to few observations :
1) The global layouts appear only if you use the 'Layouts' item of the general 'Options' menu of Reaper. They are not present in the contextual one. Why so ? Seems that the reason is in the observation #3...
2) At the opposite, the layouts defined in a global one do appear in the contextual menu of a track and is applied to the track involved when choosed, which seems rather illogical to me, but well...
3) A global layout, when choosed, is applied to all the tracks, no matter the current track(s) selection. I guess that this explains more or less the absence of global layouts in the contextual menu of eventual previously selected track(s).
4) There is an important exception to the previous rule, though : if an 'independent' layout has been previously applied to a track, it will not be changed, even if the global layout choosed has also a layout for the same given panel. To override this behavior, the track should have, for the panel involved, the 'default' layout applied to it beforehand.
5) About the images subfolder used : among all the global layouts defined in the theme, there is one that points explicitly to an images subfolder and all the layouts included in it also point explicitly to this subfolder. Wondering if this is mandatory or not when an images subfolder is defined in the 'GlobalLayout' instruction... Beside this, there are, in other global layouts, layouts that point to different images subfolder and other ones that are simply defined without any images subfolder. So, I'm wondering what are the actual rules concerning global layouts and associated images subfolders. Among other questions, can we define only these for all the included layouts in the 'GlobalLayout' instruction ?
All the above has been done with only one theme and surely needs more testing. Maybe there are more efficient ways to use the global layouts and a lot of questions remain. At this point, I think we are touching here the Achilles heel of Reaper : the lack of documentation for all kind of things, beside the Reaper User Guide. The only one I could gather concerning the global layouts is the laconic statement found
here :
If you define layouts with the same name for various UI contexts, you may wish to expose them as a global theme layout using GlobalLayout, which then lists that layout in the main layout list.
Rather short for an efficient use of the concept, IMO. So, if any theming guru have more precisions concerning the global layouts or, even, references concerning other themes that are using them, this thread is yours...