MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / WindowWrapper

Method WindowWrapper

editor/gui/window_wrapper.cpp:367–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367WindowWrapper::WindowWrapper() {
368 if (!EditorNode::get_singleton()->is_multi_window_enabled()) {
369 return;
370 }
371
372 window = memnew(Window);
373 window_id = window->get_instance_id();
374 window->set_wrap_controls(true);
375
376 add_child(window);
377 window->hide();
378
379 window->connect("close_requested", callable_mp(this, &WindowWrapper::_window_close_request));
380 window->connect("size_changed", callable_mp(this, &WindowWrapper::_window_size_changed));
381
382 ShortcutBin *capturer = memnew(ShortcutBin);
383 window->add_child(capturer);
384
385 window_background = memnew(Panel);
386 window_background->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
387 window->add_child(window_background);
388
389 ProgressDialog::get_singleton()->add_host_window(window);
390}
391
392WindowWrapper::~WindowWrapper() {
393 if (ObjectDB::get_instance(window_id)) {

Callers

nothing calls this directly

Calls 8

set_wrap_controlsMethod · 0.80
add_host_windowMethod · 0.80
connectMethod · 0.65
get_instance_idMethod · 0.45
hideMethod · 0.45
add_childMethod · 0.45

Tested by

no test coverage detected