MCPcopy Create free account
hub / github.com/dfranx/ImFileDialog / Save

Method Save

ImFileDialog.cpp:449–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447 m_treeCache.clear();
448 }
449 bool FileDialog::Save(const std::string& key, const std::string& title, const std::string& filter, const std::string& startingDir)
450 {
451 if (!m_currentKey.empty())
452 return false;
453
454 m_currentKey = key;
455 m_currentTitle = title + "###" + key;
456 m_isOpen = true;
457 m_calledOpenPopup = false;
458 m_result.clear();
459 m_inputTextbox[0] = 0;
460 m_selections.clear();
461 m_selectedFileItem = -1;
462 m_isMultiselect = false;
463 m_type = IFD_DIALOG_SAVE;
464
465 m_parseFilter(filter);
466 if (!startingDir.empty())
467 m_setDirectory(std::filesystem::u8path(startingDir), false);
468 else
469 m_setDirectory(m_currentDirectory, false); // refresh contents
470
471 return true;
472 }
473 bool FileDialog::Open(const std::string& key, const std::string& title, const std::string& filter, bool isMultiselect, const std::string& startingDir)
474 {
475 if (!m_currentKey.empty())

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected