/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Tools/Libs/ToolsFoundation/Utilities/RecentFilesList.h
47 строк
1 KB
Jan Krassnigg
Windows jumplist support (#1730)
02 дек 2025, 21:29
Не верифицирован
02 дек 2025, 21:29
37a738b
Код
Авторство
О чём код?
#pragma once #include <Foundation/Containers/Deque.h> #include <Foundation/Strings/String.h> #include <ToolsFoundation/ToolsFoundationDLL.h> /// \brief Maintains a list of recently used files and the container window ID they previously resided in. class EZ_TOOLSFOUNDATION_DLL ezRecentFilesList { public: ezRecentFilesList(ezUInt32 uiMaxElements) { m_uiMaxElements = uiMaxElements; } /// \brief Struct that defines the file and container window of the recent file list. struct RecentFile { RecentFile() : m_iContainerWindow(0) { } RecentFile(ezStringView sFile, ezInt32 iContainerWindow) : m_File(sFile) , m_iContainerWindow(iContainerWindow) { } ezString m_File; ezInt32 m_iContainerWindow; }; /// \brief Moves the inserted file to the front with the given container ID. void Insert(ezStringView sFile, ezInt32 iContainerWindow); /// \brief Returns all files in the list. const ezDeque<RecentFile>& GetFileList() const { return m_Files; } /// \brief Clears the list. void Clear() { m_Files.Clear(); } /// \brief Saves the recent files list to the given file. Uses a simple text file format (one line per item). void Save(ezStringView sFile); /// \brief Loads the recent files list from the given file. Uses a simple text file format (one line per item). void Load(ezStringView sFile); private: ezUInt32 m_uiMaxElements; ezDeque<RecentFile> m_Files; };