Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::RecentlyOpenedFilesList Class Reference

RecentlyOpenedFilesList — persistent MRU list. More...

#include <code_editor.hpp>

Public Member Functions

 RecentlyOpenedFilesList ()=default
void add (std::string_view path)
 Add a file to the recent list (moves to front if already present).
void remove (std::string_view path)
 Remove a file from the list.
const std::vector< std::string > & files () const
 Get the list (most recent first).
void set_max_entries (int max)
 Maximum number of entries (default: 10).
void clear ()
 Clear the list.
bool load (std::string_view path)
 Load from a JSON file.
bool save (std::string_view path) const
 Save to a JSON file.

Detailed Description

RecentlyOpenedFilesList — persistent MRU list.

Constructor & Destructor Documentation

◆ RecentlyOpenedFilesList()

pulp::view::RecentlyOpenedFilesList::RecentlyOpenedFilesList ( )
default

Member Function Documentation

◆ add()

void pulp::view::RecentlyOpenedFilesList::add ( std::string_view path)

Add a file to the recent list (moves to front if already present).

◆ clear()

void pulp::view::RecentlyOpenedFilesList::clear ( )
inline

Clear the list.

◆ files()

const std::vector< std::string > & pulp::view::RecentlyOpenedFilesList::files ( ) const
inline

Get the list (most recent first).

◆ load()

bool pulp::view::RecentlyOpenedFilesList::load ( std::string_view path)

Load from a JSON file.

◆ remove()

void pulp::view::RecentlyOpenedFilesList::remove ( std::string_view path)

Remove a file from the list.

◆ save()

bool pulp::view::RecentlyOpenedFilesList::save ( std::string_view path) const

Save to a JSON file.

◆ set_max_entries()

void pulp::view::RecentlyOpenedFilesList::set_max_entries ( int max)
inline

Maximum number of entries (default: 10).


The documentation for this class was generated from the following file: