Plasma Engine  2.0
Loading...
Searching...
No Matches
RecentFilesList.h
1#include <Foundation/Containers/Deque.h>
2#include <Foundation/Strings/String.h>
3#include <ToolsFoundation/ToolsFoundationDLL.h>
4
6class PL_TOOLSFOUNDATION_DLL plRecentFilesList
7{
8public:
9 plRecentFilesList(plUInt32 uiMaxElements) { m_uiMaxElements = uiMaxElements; }
10
13 {
15 : m_iContainerWindow(0)
16 {
17 }
18 RecentFile(plStringView sFile, plInt32 iContainerWindow)
19 : m_File(sFile)
20 , m_iContainerWindow(iContainerWindow)
21 {
22 }
23
24 plString m_File;
25 plInt32 m_iContainerWindow;
26 };
28 void Insert(plStringView sFile, plInt32 iContainerWindow);
29
31 const plDeque<RecentFile>& GetFileList() const { return m_Files; }
32
34 void Clear() { m_Files.Clear(); }
35
37 void Save(plStringView sFile);
38
40 void Load(plStringView sFile);
41
42private:
43 plUInt32 m_uiMaxElements;
44 plDeque<RecentFile> m_Files;
45};
Definition Deque.h:270
Maintains a list of recently used files and the container window ID they previously resided in.
Definition RecentFilesList.h:7
void Clear()
Clears the list.
Definition RecentFilesList.h:34
const plDeque< RecentFile > & GetFileList() const
Returns all files in the list.
Definition RecentFilesList.h:31
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Struct that defines the file and container window of the recent file list.
Definition RecentFilesList.h:13