Thread Rating:
  • 0 Vote(s) - 0 Average
How do views work?
#1
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?

Thanks
Reply
#2
Really you are using the parent "window", like myvideonav.xml, the "views" like:

Viewtype_Poster.xml
Viewtype_Files.xml
Viewtype_Banner.xml

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..
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#3
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.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
jmarshall Wrote: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.

Ok, thanks. I just wanted to understand how this part works without just doing anything blind.

mcborzu, thanks.
Reply



How do views work?00