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

Method Open

libs/misc/ImFileDialog.cpp:469–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467 return true;
468 }
469 bool FileDialog::Open(const std::string& key, const std::string& title, const std::string& filter, bool isMultiselect, const std::string& startingDir)
470 {
471 if (!m_currentKey.empty())
472 return false;
473
474 m_currentKey = key;
475 m_currentTitle = title + "###" + key;
476 m_isOpen = true;
477 m_calledOpenPopup = false;
478 m_result.clear();
479 m_inputTextbox[0] = 0;
480 m_selections.clear();
481 m_selectedFileItem = -1;
482 m_isMultiselect = isMultiselect;
483 m_type = filter.empty() ? IFD_DIALOG_DIRECTORY : IFD_DIALOG_FILE;
484
485 m_parseFilter(filter);
486 if (!startingDir.empty())
487 m_setDirectory(std::filesystem::u8path(startingDir), false);
488 else
489 m_setDirectory(m_currentDirectory, false); // refresh contents
490
491 return true;
492 }
493 bool FileDialog::IsDone(const std::string& key)
494 {
495 bool isMe = m_currentKey == key;

Callers 1

mainFunction · 0.45

Calls 2

emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected