Window manager
#1
Is there a python function in xbmc or has maybe anyone created a class that resembles a window/stack manager. I'm busy with a skin addon and I'm trying to manage the use of gui windows.

I want to reuse the window xml with new content/updated list to get an menu like effect. I can set this up by calling a new window from within class of the current window. On menu/return I just close the current window which will return the user to the previous window. So far so good.

But what if I wanted more advanced function, for example:

My user is in current gui 6, with stack:
Gui 1-> Gui2 -> Gui3 -> Gui4 -> Gui5 -> Gui6

It wants directly to Gui2. I have to close gui6,gui5,gui4 and gui3 simultaneously.

Another situation:
My user is in Gui6 but wants to clear Gui1 -Gui5, making gui6 first in line/stack...

Any ideas how to create such a stack control? or maybe some location where I get some inspiration to construct it?

I think I need to somehow pass the window instances in a list when opening a new window, as such a can control the close property of those windows.
Reply
#2
XBMC's window manager acts pretty much how you suggest. We have a window history stack, and when you go to a window, it checks the stack and if we find the window we're going to in the history, we clear all history from that window onwards, leaving id 1 and id 2 only on the stack in your example above. This applies to windows only, not dialogs.

Thus, I'm not sure whether you'll actually need to do anything?
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
#3
Thanks jmarshall,

Is it possible to point me to some example code or reference projects that act in simular situation? Might be helpfull.
Reply
#4
You can have a look at the stack in GUIWindowManager.cpp if that will be of any help?
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

Logout Mark Read Team Forum Stats Members Help
Window manager0