Window priority handling for a GUI - data structure
Sorry if this isn't the right forum for this question, there's no 'general' programming so I assumed C++ was right.
Anyway, in my GUI, I have a bunch of windows. Now the question is how to organize their priority, ie what order they get drawn/handled in, also which windows are examined by "deeper down" windows to see if the user validly clicked on them.
So when I click on a piece of a window all the way back, it'll be brought to the 'top' and all the other windows in-between shuffled around correctly.
What data structure should I use? Stack, queue, vector, tree, linked list, etc... I really don't know where to start and would appreciate any ideas. Thank you.