Changeset 386
- Timestamp:
- 09/19/11 11:23:04 (8 months ago)
- Location:
- cafu/trunk
- Files:
-
- 3 modified
-
CaWE/GuiEditor/GuiDocument.cpp (modified) (1 diff)
-
CaWE/GuiEditor/GuiDocument.hpp (modified) (1 diff)
-
Libs/GuiSys/Window.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/CaWE/GuiEditor/GuiDocument.cpp
r367 r386 122 122 123 123 124 cf::GuiSys::WindowT* GuiDocumentT::FindWindowByName(const wxString& WindowName)125 {126 if (m_RootWindow->GetName()==WindowName) return m_RootWindow;127 128 return m_RootWindow->Find(std::string(WindowName));129 }130 131 132 124 void GuiDocumentT::SetSelection(const ArrayT<cf::GuiSys::WindowT*>& NewSelection) 133 125 { -
cafu/trunk/CaWE/GuiEditor/GuiDocument.hpp
r367 r386 59 59 cf::GuiSys::GuiImplT* GetGui() { return m_Gui; } 60 60 cf::GuiSys::WindowT* GetRootWindow() { return m_RootWindow; } 61 cf::GuiSys::WindowT* FindWindowByName(const wxString& WindowName);62 61 63 62 GuiPropertiesT& GetGuiProperties() { return m_GuiProperties; } -
cafu/trunk/Libs/GuiSys/Window.cpp
r373 r386 236 236 void WindowT::GetChildren(ArrayT<WindowT*>& Chld, bool Recurse) 237 237 { 238 #ifdef DEBUG 239 // Make sure that there are no cycles in the hierarchy of children. 240 for (unsigned long ChildNr=0; ChildNr<Children.Size(); ChildNr++) 241 assert(Chld.Find(Children[ChildNr]) == -1); 242 #endif 243 238 244 Chld.PushBack(Children); 239 245 … … 906 912 WindowT* Child=(WindowT*)cf::GuiSys::GuiImplT::GetCheckedObjectParam(LuaState, 2, TypeInfo); 907 913 908 if (Child->Parent!=NULL) 914 if (Child->Parent!=NULL) // A child window must be a root node... 909 915 return luaL_argerror(LuaState, 2, "child window already has a parent, use RemoveChild() first"); 916 917 if (Child==Win->GetRoot()) // ... but not the root of the hierarchy it is inserted into. 918 return luaL_argerror(LuaState, 2, "a window cannot be made a child of itself"); 910 919 911 920 Win->Children.PushBack(Child);
