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

Method Open

ImFileDialog.cpp:473–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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())
476 return false;
477
478 m_currentKey = key;
479 m_currentTitle = title + "###" + key;
480 m_isOpen = true;
481 m_calledOpenPopup = false;
482 m_result.clear();
483 m_inputTextbox[0] = 0;
484 m_selections.clear();
485 m_selectedFileItem = -1;
486 m_isMultiselect = isMultiselect;
487 m_type = filter.empty() ? IFD_DIALOG_DIRECTORY : IFD_DIALOG_FILE;
488
489 m_parseFilter(filter);
490 if (!startingDir.empty())
491 m_setDirectory(std::filesystem::u8path(startingDir), false);
492 else
493 m_setDirectory(m_currentDirectory, false); // refresh contents
494
495 return true;
496 }
497 bool FileDialog::IsDone(const std::string& key)
498 {
499 bool isMe = m_currentKey == key;

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected