ToolMap
|
Deals with Recent files. More...
#include <menumanager.h>
Public Member Functions | |
MenuManager (wxMenuBar *menubar) | |
constructor | |
~MenuManager () | |
Destructor. | |
void | InitializeRecentFilesHistory () |
Init the Recent files. | |
void | TerminateRecentFilesHistory () |
Uninit the Recent files. | |
void | AddFileToRecent (const wxString &spath) |
Add a path to the recent file menu. | |
void | RemoveFileFromRecent (int fileid) |
Remove an item from the recent files menu. | |
bool | GetRecentFile (wxString &filepath, int fileid) |
Get a path from the recent file menu. | |
Deals with Recent files.
MenuManager::MenuManager | ( | wxMenuBar * | menubar | ) |
constructor
MenuManager::~MenuManager | ( | ) |
Destructor.
void MenuManager::AddFileToRecent | ( | const wxString & | spath | ) |
Add a path to the recent file menu.
Call this function for adding a recent path to the Recent menu
spath | a wxString containing the path we want to store into the recent files |
bool MenuManager::GetRecentFile | ( | wxString & | filepath, |
int | fileid | ||
) |
Get a path from the recent file menu.
Call this function for getting the path linked to an Menu event. Pay attention fileid is an index and not the Menu ID sending the event see code behind :
filepath | wxString filled with filepath if funtion return TRUE otherwise unchanged |
fileid | the index of the item we want to retrieve from the file history |
void MenuManager::InitializeRecentFilesHistory | ( | ) |
Init the Recent files.
This function search for the ID_MENU_RECENT menu and set it as the menu for recent files
void MenuManager::RemoveFileFromRecent | ( | int | fileid | ) |
Remove an item from the recent files menu.
Remove the specified item from the recent files menu.
fileid | index of element to remove |
void MenuManager::TerminateRecentFilesHistory | ( | ) |
Uninit the Recent files.
This function save the actual File history on the disk and delete the file history object