How do views work? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Skin Development (/forumdisplay.php?fid=12)
+--- Thread: How do views work? (/showthread.php?tid=100335)
How do views work? - AaronD - 2011-04-28 18:40
Can someone please explain to me how views work? What is a "view" as opposed to a "window" - my understanding is that they are both just IDs? Are there predefined view IDs for the specific type of view that you are creating, and if so can you please point me in the direction of this list?
- mcborzu - 2011-04-28 23:57
Really you are using the parent "window", like myvideonav.xml, the "views" like:
Are just for organization and ease of coding....
There are no predefined ID's for views but seems like everyone uses id="50" as the file view. Most people use 50-59 for views and if need to branch out use 500 and up. Not a requirement to use 500 and up but after digging thru tons of skins I'd say thats the most common practice..
- jmarshall - 2011-04-29 00:35
AaronD: I presume this is for coding up that patch.
If so, just take spiff's diff and alter it as per his comment on trac.
Essentially the following logic is used to determine which view to show in XBMC:
1. We query the ViewModes.db for the appropriate window and path, and retrieve a viewmode integer that is composed of the actual view id from the skin, plus the view <type> from the skin as well (there's about half a dozen different types the skinner can choose from).
2. We then send that to GUIViewControl which runs through the views the skinner has supplied and tries to find one that matches - we first look for the ID and use that. If that fails we try based on type (i.e. we look for a matching view container of the same type). If that fails we fall back to the first one.
You'd basically be changing step 1 above.
- AaronD - 2011-04-29 08:55
jmarshall Wrote:AaronD: I presume this is for coding up that patch.
Ok, thanks. I just wanted to understand how this part works without just doing anything blind.