$szTitle = "wxfilehistory"; include "./_header.inc"; ?>
the wxfilehistory encapsulates a user interface convenience, the list of most recently visited files as shown on a menu (usually the file menu).
wxfilehistory can manage one or more file menus. more than one menu may be required in an mdi application, where the file history should appear on each mdi child menu as well as the mdi parent frame.
derived from
include files
<wx/docview.h>
see also
wxfilehistory overview, wxdocmanager
members
wxfilehistory::m_filehistory
wxfilehistory::m_filehistoryn
wxfilehistory::m_filemaxfiles
wxfilehistory::m_filemenu
wxfilehistory::wxfilehistory
wxfilehistory::~wxfilehistory
wxfilehistory::addfiletohistory
wxfilehistory::addfilestomenu
wxfilehistory::getbaseid
wxfilehistory::getcount
wxfilehistory::gethistoryfile
wxfilehistory::getmaxfiles
wxfilehistory::getmenus
wxfilehistory::load
wxfilehistory::removefilefromhistory
wxfilehistory::removemenu
wxfilehistory::save
wxfilehistory::setbaseid
wxfilehistory::usemenu
char** m_filehistory
a character array of strings corresponding to the most recently opened files.
size_t m_filehistoryn
the number of files stored in the history array.
size_t m_filemaxfiles
the maximum number of files to be stored and displayed on the menu.
wxmenu* m_filemenu
the file menu used to display the file history list (if enabled).
wxfilehistory(size_t maxfiles = 9, wxwindowid idbase = wxid_file1)
constructor. pass the maximum number of files that should be stored and displayed.
idbase defaults to wxid_file1 and represents the id given to the first history menu item. since menu items can't share the same id you should change idbase (to one of your own defined ids) when using more than one wxfilehistory in your application.
~wxfilehistory()
destructor.
void addfiletohistory(const wxstring& filename)
adds a file to the file history list, if the object has a pointer to an appropriate file menu.
void addfilestomenu()
appends the files in the history list, to all menus managed by the file history object.
void addfilestomenu(wxmenu* menu)
appends the files in the history list, to the given menu only.
wxwindowid getbaseid() const
returns the base identifier for the range used for appending items.
size_t getcount() const
returns the number of files currently stored in the file history.
wxstring gethistoryfile(size_t index) const
returns the file at this index (zero-based).
int getmaxfiles() const
returns the maximum number of files that can be stored.
const wxlist& getmenus() const
returns the list of menus that are managed by this file history object.
see also
void load(wxconfigbase& config)
loads the file history from the given config object. this function should be called explicitly by the application.
see also
void removefilefromhistory(size_t i)
removes the specified file from the history.
void removemenu(wxmenu* menu)
removes this menu from the list of those managed by this object.
void save(wxconfigbase& config)
saves the file history into the given config object. this must be called explicitly by the application.
see also
void setbaseid(wxwindowid baseid)
sets the base identifier for the range used for appending items.
void usemenu(wxmenu* menu)
adds this menu to the list of those menus that are managed by this file history object. also see addfilestomenu() for initializing the menu with filenames that are already in the history when this function is called, as this is not done automatically.
include "./_footer.inc"; ?>