MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / create_context

Method create_context

src/ui/core/ui_context.cpp:207–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207recompui::ContextId recompui::create_context(const std::filesystem::path& path) {
208 ContextId new_context = create_context_impl(nullptr);
209
210 auto workingdir = std::filesystem::current_path();
211
212 new_context.open();
213 Rml::ElementDocument* doc = recompui::load_document(path.string());
214 opened_context->document = doc;
215 opened_context->root_element.base = doc;
216 new_context.close();
217
218 {
219 std::lock_guard lock{ context_state.all_contexts_lock };
220 context_state.documents_to_contexts.emplace(doc, new_context);
221 }
222
223 return new_context;
224}
225
226recompui::ContextId recompui::create_context(Rml::ElementDocument* document) {
227 assert(document != nullptr);

Callers

nothing calls this directly

Calls 8

create_context_implFunction · 0.85
openMethod · 0.80
closeMethod · 0.80
emplaceMethod · 0.80
get_root_elementMethod · 0.80
set_widthMethod · 0.80
set_heightMethod · 0.80
set_displayMethod · 0.45

Tested by

no test coverage detected