1 \section{\class{wxFileHistory
}}\label{wxfilehistory
}
3 The wxFileHistory encapsulates a user interface convenience, the
4 list of most recently visited files as shown on a menu (usually the File menu).
6 wxFileHistory can manage one or more file menus. More than one menu may be required
7 in an MDI application, where the file history should appear on each MDI child menu
8 as well as the MDI parent frame.
10 \wxheading{Derived from
}
12 \helpref{wxObject
}{wxobject
}
14 \wxheading{Include files
}
20 \helpref{wxFileHistory overview
}{wxfilehistoryoverview
},
\helpref{wxDocManager
}{wxdocmanager
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxFileHistory::m
\_fileHistory}\label{wxfilehistorymfilehistory
}
26 \member{char**
}{m
\_fileHistory}
28 A character array of strings corresponding to the most recently opened
31 \membersection{wxFileHistory::m
\_fileHistoryN}\label{wxfilehistorymfilehistoryn
}
33 \member{size
\_t}{m
\_fileHistoryN}
35 The number of files stored in the history array.
37 \membersection{wxFileHistory::m
\_fileMaxFiles}\label{wxfilehistorymfilemaxfiles
}
39 \member{size
\_t}{m
\_fileMaxFiles}
41 The maximum number of files to be stored and displayed on the menu.
43 \membersection{wxFileHistory::m
\_fileMenu}\label{wxfilehistorymfilemenu
}
45 \member{wxMenu*
}{m
\_fileMenu}
47 The file menu used to display the file history list (if enabled).
49 \membersection{wxFileHistory::wxFileHistory
}\label{wxfilehistoryctor
}
51 \func{}{wxFileHistory
}{\param{size
\_t}{ maxFiles =
9},
\param{wxWindowID
}{ idBase = wxID
\_FILE1}}
53 Constructor. Pass the maximum number of files that should be stored and
56 {\it idBase
} defaults to wxID
\_FILE1 and represents the id given to the first
57 history menu item. Since menu items can't share the same ID you should change
58 idBase (To one of your own defined IDs) when using more than one wxFileHistory
61 \membersection{wxFileHistory::
\destruct{wxFileHistory
}}\label{wxfilehistorydtor
}
63 \func{}{\destruct{wxFileHistory
}}{\void}
67 \membersection{wxFileHistory::AddFileToHistory
}\label{wxfilehistoryaddfiletohistory
}
69 \func{void
}{AddFileToHistory
}{\param{const wxString\&
}{filename
}}
71 Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
73 \membersection{wxFileHistory::AddFilesToMenu
}\label{wxfilehistoryaddfilestomenu
}
75 \func{void
}{AddFilesToMenu
}{\void}
77 Appends the files in the history list, to all menus managed by the file history object.
79 \func{void
}{AddFilesToMenu
}{\param{wxMenu*
}{ menu
}}
81 Appends the files in the history list, to the given menu only.
83 \membersection{wxFileHistory::GetHistoryFile
}\label{wxfilehistorygethistoryfile
}
85 \constfunc{wxString
}{GetHistoryFile
}{\param{size
\_t}{ index
}}
87 Returns the file at this index (zero-based).
89 \membersection{wxFileHistory::GetMaxFiles
}\label{wxfilehistorygetmaxfiles
}
91 \constfunc{size
\_t}{GetMaxFiles
}{\void}
93 Returns the maximum number of files that can be stored.
95 \membersection{wxFileHistory::GetNoHistoryFiles
}\label{wxfilehistorygetnohistoryfiles
}
97 \constfunc{size
\_t}{GetNoHistoryFiles
}{\void}
99 Returns the number of files currently stored in the file history.
101 \membersection{wxFileHistory::Load
}\label{wxfilehistoryload
}
103 \func{void
}{Load
}{\param{wxConfigBase\&
}{config
}}
105 Loads the file history from the given config object. This function should be called explicitly by the application.
109 \helpref{wxConfig
}{wxconfigbase
}
111 \membersection{wxFileHistory::RemoveMenu
}\label{wxfilehistoryremovemenu
}
113 \func{void
}{RemoveMenu
}{\param{wxMenu*
}{menu
}}
115 Removes this menu from the list of those managed by this object.
117 \membersection{wxFileHistory::Save
}\label{wxfilehistorysave
}
119 \func{void
}{Save
}{\param{wxConfigBase\&
}{config
}}
121 Saves the file history into the given config object. This must be called
122 explicitly by the application.
126 \helpref{wxConfig
}{wxconfigbase
}
128 \membersection{wxFileHistory::UseMenu
}\label{wxfilehistoryusemenu
}
130 \func{void
}{UseMenu
}{\param{wxMenu*
}{menu
}}
132 Adds this menu to the list of those managed by this object.