ToolMap
Loading...
Searching...
No Matches
MenuManager Class Reference

Deals with Recent files. More...

#include <menumanager.h>

Inheritance diagram for MenuManager:

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.
 

Detailed Description

Deals with Recent files.

Author
Lucien Schreiber (c) CREALP 2007
Date
12 March 2008

Constructor & Destructor Documentation

◆ MenuManager()

MenuManager::MenuManager ( wxMenuBar *  menubar)

constructor

Author
Lucien Schreiber (c) CREALP 2007
Date
12 March 2008

◆ ~MenuManager()

MenuManager::~MenuManager ( )

Destructor.

Author
Lucien Schreiber (c) CREALP 2007
Date
12 March 2008

Member Function Documentation

◆ AddFileToRecent()

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

Parameters
spatha wxString containing the path we want to store into the recent files
Author
Lucien Schreiber (c) CREALP 2007
Date
07 April 2008

◆ GetRecentFile()

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 :

...
MenuManager * m_MManager
m_MManager->GetRecentFile(myPath, event.GetId() - wxID_FILE1);
...
Parameters
filepathwxString filled with filepath if funtion return TRUE otherwise unchanged
fileidthe index of the item we want to retrieve from the file history
Returns
true if an item was found in the file history and FALSE otherwise
Author
Lucien Schreiber (c) CREALP 2007
Date
07 April 2008

◆ InitializeRecentFilesHistory()

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

Author
Lucien Schreiber (c) CREALP 2007
Date
07 April 2008

◆ RemoveFileFromRecent()

void MenuManager::RemoveFileFromRecent ( int  fileid)

Remove an item from the recent files menu.

Remove the specified item from the recent files menu.

Parameters
fileidindex of element to remove
Author
Lucien Schreiber (c) CREALP 2007
Date
08 April 2008

◆ TerminateRecentFilesHistory()

void MenuManager::TerminateRecentFilesHistory ( )

Uninit the Recent files.

This function save the actual File history on the disk and delete the file history object

Author
Lucien Schreiber (c) CREALP 2007
Date
07 April 2008

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