]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/filehist.tex
suppress VC7.1 64 bit correctness warnings
[wxWidgets.git] / docs / latex / wx / filehist.tex
CommitLineData
a660d684
KB
1\section{\class{wxFileHistory}}\label{wxfilehistory}
2
3The wxFileHistory encapsulates a user interface convenience, the
4list of most recently visited files as shown on a menu (usually the File menu).
5
7f555861
JS
6wxFileHistory can manage one or more file menus. More than one menu may be required
7in an MDI application, where the file history should appear on each MDI child menu
8as well as the MDI parent frame.
9
a660d684
KB
10\wxheading{Derived from}
11
12\helpref{wxObject}{wxobject}
13
954b8ae6
JS
14\wxheading{Include files}
15
16<wx/docview.h>
17
a660d684
KB
18\wxheading{See also}
19
7f555861 20\helpref{wxFileHistory overview}{wxfilehistoryoverview}, \helpref{wxDocManager}{wxdocmanager}
a660d684
KB
21
22\latexignore{\rtfignore{\wxheading{Members}}}
23
24\membersection{wxFileHistory::m\_fileHistory}
25
26\member{char**}{m\_fileHistory}
27
28A character array of strings corresponding to the most recently opened
29files.
30
31\membersection{wxFileHistory::m\_fileHistoryN}
32
0f48e3d5 33\member{size\_t}{m\_fileHistoryN}
a660d684
KB
34
35The number of files stored in the history array.
36
37\membersection{wxFileHistory::m\_fileMaxFiles}
38
0f48e3d5 39\member{size\_t}{m\_fileMaxFiles}
a660d684
KB
40
41The maximum number of files to be stored and displayed on the menu.
42
43\membersection{wxFileHistory::m\_fileMenu}
44
45\member{wxMenu*}{m\_fileMenu}
46
47The file menu used to display the file history list (if enabled).
48
49\membersection{wxFileHistory::wxFileHistory}
50
0f48e3d5 51\func{}{wxFileHistory}{\param{size\_t}{ maxFiles = 9}, \param{wxWindowID}{ idBase = wxID\_FILE1}}
a660d684 52
0f48e3d5
VS
53Constructor. Pass the maximum number of files that should be stored and
54displayed.
e49c85af 55
0f48e3d5
VS
56{\it idBase} defaults to wxID\_FILE1 and represents the id given to the first
57history menu item. Since menu items can't share the same ID you should change
58idBase (To one of your own defined IDs) when using more than one wxFileHistory
59in your application.
e49c85af 60
a660d684
KB
61\membersection{wxFileHistory::\destruct{wxFileHistory}}
62
63\func{}{\destruct{wxFileHistory}}{\void}
64
65Destructor.
66
67\membersection{wxFileHistory::AddFileToHistory}
68
69\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}}
70
71Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
72
7f555861 73\membersection{wxFileHistory::AddFilesToMenu}\label{wxfilehistoryaddfilestomenu}
a660d684 74
7f555861 75\func{void}{AddFilesToMenu}{\void}
a660d684 76
7f555861 77Appends the files in the history list, to all menus managed by the file history object.
a660d684 78
7f555861 79\func{void}{AddFilesToMenu}{\param{wxMenu*}{ menu}}
a660d684 80
7f555861 81Appends the files in the history list, to the given menu only.
a660d684 82
7f555861 83\membersection{wxFileHistory::GetHistoryFile}\label{wxfilehistorygethistoryfile}
a660d684 84
0f48e3d5 85\constfunc{wxString}{GetHistoryFile}{\param{size\_t}{ index}}
a660d684 86
7f555861 87Returns the file at this index (zero-based).
a660d684
KB
88
89\membersection{wxFileHistory::GetMaxFiles}
90
0f48e3d5 91\constfunc{size\_t}{GetMaxFiles}{\void}
a660d684
KB
92
93Returns the maximum number of files that can be stored.
94
95\membersection{wxFileHistory::GetNoHistoryFiles}
96
0f48e3d5 97\constfunc{size\_t}{GetNoHistoryFiles}{\void}
a660d684
KB
98
99Returns the number of files currently stored in the file history.
100
7f555861
JS
101\membersection{wxFileHistory::Load}
102
103\func{void}{Load}{\param{wxConfigBase\& }{config}}
104
105Loads the file history from the given config object. This function should be called explicitly by the application.
106
107\wxheading{See also}
108
109\helpref{wxConfig}{wxconfigbase}
110
111\membersection{wxFileHistory::RemoveMenu}
112
113\func{void}{RemoveMenu}{\param{wxMenu* }{menu}}
114
115Removes this menu from the list of those managed by this object.
116
117\membersection{wxFileHistory::Save}
118
119\func{void}{Save}{\param{wxConfigBase\& }{config}}
120
121Saves the file history into the given config object. This must be called
122explicitly by the application.
123
124\wxheading{See also}
125
126\helpref{wxConfig}{wxconfigbase}
127
128\membersection{wxFileHistory::UseMenu}
129
130\func{void}{UseMenu}{\param{wxMenu* }{menu}}
131
132Adds this menu to the list of those managed by this object.
133
a660d684 134