ZList.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00029 #ifndef _GG_ZList_h_
00030 #define _GG_ZList_h_
00031
00032 #include <GG/Base.h>
00033
00034 #include <list>
00035 #include <set>
00036
00037
00038 namespace GG {
00039 class Wnd;
00040
00050 class GG_API ZList : public std::list<Wnd*>
00051 {
00052 public:
00054
00056 Wnd* Pick(const Pt& pt, Wnd* modal, const std::set<Wnd*>* ignore = 0) const;
00058
00060
00064 void Add(Wnd* wnd);
00065
00066 bool Remove(Wnd* wnd);
00067
00070 bool MoveUp(Wnd* wnd);
00071
00074 bool MoveDown(Wnd* wnd);
00076
00077 private:
00078 Wnd* PickWithinWindow(const Pt& pt, Wnd* wnd, const std::set<Wnd*>* ignore) const;
00079 bool NeedsRealignment() const;
00080 void Realign();
00081 iterator FirstNonOnTop();
00082
00083 std::set<Wnd*> m_contents;
00084 };
00085
00086 }
00087
00088 #endif // _GG_ZList_h_