MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / m_InitPlaces

Method m_InitPlaces

ImGuiFileDialog.cpp:3146–3162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3144
3145#ifdef USE_PLACES_FEATURE
3146void IGFD::PlacesFeature::m_InitPlaces(FileDialogInternal& vFileDialogInternal) {
3147#ifdef USE_PLACES_BOOKMARKS
3148 (void)vFileDialogInternal; // for disable compiler warning about unused var
3149 AddPlacesGroup(placesBookmarksGroupName, placesBookmarksDisplayOrder, true, PLACES_BOOKMARK_DEFAULT_OPEPEND);
3150#endif // USE_PLACES_BOOKMARK
3151#ifdef USE_PLACES_DEVICES
3152 AddPlacesGroup(placesDevicesGroupName, placesDevicesDisplayOrder, false, PLACES_DEVICES_DEFAULT_OPEPEND);
3153 auto devices_ptr = GetPlacesGroupPtr(placesDevicesGroupName);
3154 if (devices_ptr != nullptr && vFileDialogInternal.fileManager.GetFileSystemInstance() != nullptr) {
3155 const auto& devices = vFileDialogInternal.fileManager.GetFileSystemInstance()->GetDevicesList();
3156 for (const auto& device : devices) {
3157 devices_ptr->AddPlace(device.first + " " + device.second, device.first + IGFD::Utils::GetPathSeparator(), false);
3158 }
3159 devices_ptr = nullptr;
3160 }
3161#endif // USE_PLACES_DEVICES
3162}
3163
3164void IGFD::PlacesFeature::m_DrawPlacesButton() {
3165 IMGUI_TOGGLE_BUTTON(placesButtonString, &m_PlacesPaneShown);

Callers

nothing calls this directly

Calls 2

AddPlaceMethod · 0.80
GetDevicesListMethod · 0.45

Tested by

no test coverage detected