MCPcopy Create free account
hub / github.com/beefytech/Beef / RemoveWindow

Method RemoveWindow

BeefySysLib/BFApp.cpp:270–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void BFApp::RemoveWindow(BFWindow* window)
271{
272 AutoCrit autoCrit(mCritSect);
273
274 auto itr = std::find(mWindowList.begin(), mWindowList.end(), window);
275 if (itr == mWindowList.end()) // Allow benign failure (double removal)
276 return;
277 mWindowList.erase(itr);
278
279 while (window->mChildren.size() > 0)
280 RemoveWindow(window->mChildren.front());
281
282 if (window->mParent != NULL)
283 {
284 window->mParent->mChildren.erase(std::find(window->mParent->mChildren.begin(), window->mParent->mChildren.end(), window));
285
286 if (window->mFlags & BFWINDOW_MODAL)
287 {
288 bool hasModal = false;
289
290 for (auto childWindow : window->mParent->mChildren)
291 {
292 if (childWindow->mFlags & BFWINDOW_MODAL)
293 hasModal = true;
294 }
295
296 if (!hasModal)
297 window->mParent->ModalsRemoved();
298 }
299 }
300
301 window->mClosedFunc(window);
302 mRenderDevice->RemoveRenderWindow(window->mRenderWindow);
303 window->Destroy();
304 mPendingWindowDeleteList.push_back(window);
305}
306
307FileStream* BFApp::OpenBinaryFile(const StringImpl& fileName)
308{

Callers 2

BFWindow_CloseFunction · 0.80
WindowProcMethod · 0.80

Calls 9

frontMethod · 0.80
RemoveRenderWindowMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
sizeMethod · 0.45
ModalsRemovedMethod · 0.45
DestroyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected