MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / display

Method display

source/MaterialXGraphEditor/FileDialog.cpp:62–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void FileDialog::display()
63{
64 // Only call the dialog if it's not already displayed
65 if (!_openFlag || _isOpened)
66 {
67 return;
68 }
69 _openFlag = false;
70
71 // Check if we want to save or open
72 bool save = !(_flags & SelectDirectory) && (_flags & EnterNewFilename);
73
74 mx::StringVec result = launchFileDialog(_filetypes, save, false);
75 std::string path = result.empty() ? "" : result.front();
76 if (!path.empty())
77 {
78 _selectedFilenames.push_back(path);
79 }
80
81 _isOpened = false;
82}
83
84#if !defined(__APPLE__)
85mx::StringVec launchFileDialog(const std::vector<std::pair<std::string, std::string>>& filetypes, bool save, bool multiple)

Callers 1

drawGraphMethod · 0.80

Calls 3

launchFileDialogFunction · 0.85
push_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected