MCPcopy Create free account
hub / github.com/chrxh/alien / Open

Method Open

external/ImFileDialog/ImFileDialog.cpp:471–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected