| 122 | } |
| 123 | |
| 124 | CUIWindow::~CUIWindow() |
| 125 | { |
| 126 | VERIFY(!(GetParent() && IsAutoDelete())); |
| 127 | |
| 128 | CUIWindow* parent = GetParent(); |
| 129 | if (parent) |
| 130 | parent->DetachChild(this, true); |
| 131 | |
| 132 | DetachAll(); |
| 133 | |
| 134 | if (GetPPMode()) |
| 135 | MainMenu()->UnregisterPPDraw(this); |
| 136 | |
| 137 | #ifdef LOG_ALL_WNDS |
| 138 | xr_vector<DBGList>::iterator _it = dbg_list_wnds.begin(); |
| 139 | bool bOK = false; |
| 140 | for (; _it != dbg_list_wnds.end(); ++_it) |
| 141 | { |
| 142 | if ((*_it).num == m_dbg_id && !(*_it).closed) |
| 143 | { |
| 144 | bOK = true; |
| 145 | (*_it).closed = true; |
| 146 | dbg_list_wnds.erase(_it); |
| 147 | break; |
| 148 | } |
| 149 | if ((*_it).num == m_dbg_id && (*_it).closed) |
| 150 | { |
| 151 | Msg("--CUIWindow [%d] already deleted", m_dbg_id); |
| 152 | bOK = true; |
| 153 | } |
| 154 | } |
| 155 | if (!bOK) |
| 156 | Msg("CUIWindow::~CUIWindow.[%d] cannot find window in list", m_dbg_id); |
| 157 | #endif |
| 158 | } |
| 159 | |
| 160 | void CUIWindow::Init(Frect* pRect) { SetWndRect(*pRect); } |
| 161 |
nothing calls this directly
no test coverage detected