]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/filehist.tex
use 'neither ... nor ...' instead of 'neither ... or ...' in wxFinite documentation
[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
86110e1a 24
b236c10f 25\membersection{wxFileHistory::m\_fileHistory}\label{wxfilehistorymfilehistory}
a660d684
KB
26
27\member{char**}{m\_fileHistory}
28
29A character array of strings corresponding to the most recently opened
30files.
31
86110e1a 32
b236c10f 33\membersection{wxFileHistory::m\_fileHistoryN}\label{wxfilehistorymfilehistoryn}
a660d684 34
0f48e3d5 35\member{size\_t}{m\_fileHistoryN}
a660d684
KB
36
37The number of files stored in the history array.
38
86110e1a 39
b236c10f 40\membersection{wxFileHistory::m\_fileMaxFiles}\label{wxfilehistorymfilemaxfiles}
a660d684 41
0f48e3d5 42\member{size\_t}{m\_fileMaxFiles}
a660d684
KB
43
44The maximum number of files to be stored and displayed on the menu.
45
86110e1a 46
b236c10f 47\membersection{wxFileHistory::m\_fileMenu}\label{wxfilehistorymfilemenu}
a660d684
KB
48
49\member{wxMenu*}{m\_fileMenu}
50
51The file menu used to display the file history list (if enabled).
52
86110e1a 53
b236c10f 54\membersection{wxFileHistory::wxFileHistory}\label{wxfilehistoryctor}
a660d684 55
0f48e3d5 56\func{}{wxFileHistory}{\param{size\_t}{ maxFiles = 9}, \param{wxWindowID}{ idBase = wxID\_FILE1}}
a660d684 57
0f48e3d5
VS
58Constructor. Pass the maximum number of files that should be stored and
59displayed.
e49c85af 60
0f48e3d5
VS
61{\it idBase} defaults to wxID\_FILE1 and represents the id given to the first
62history menu item. Since menu items can't share the same ID you should change
63idBase (To one of your own defined IDs) when using more than one wxFileHistory
64in your application.
e49c85af 65
86110e1a 66
b236c10f 67\membersection{wxFileHistory::\destruct{wxFileHistory}}\label{wxfilehistorydtor}
a660d684
KB
68
69\func{}{\destruct{wxFileHistory}}{\void}
70
71Destructor.
72
86110e1a 73
b236c10f 74\membersection{wxFileHistory::AddFileToHistory}\label{wxfilehistoryaddfiletohistory}
a660d684
KB
75
76\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}}
77
78Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
79
86110e1a 80
7f555861 81\membersection{wxFileHistory::AddFilesToMenu}\label{wxfilehistoryaddfilestomenu}
a660d684 82
86110e1a 83\func{void}{AddFilesToMenu}{\void}\label{wxfilehistoryaddfilestomenu}
a660d684 84
7f555861 85Appends the files in the history list, to all menus managed by the file history object.
a660d684 86
7f555861 87\func{void}{AddFilesToMenu}{\param{wxMenu*}{ menu}}
a660d684 88
7f555861 89Appends the files in the history list, to the given menu only.
a660d684 90
86110e1a 91
652dbdc0
JS
92\membersection{wxFileHistory::GetBaseId}\label{wxfilehistorygetbaseid}
93
94\constfunc{wxWindowID}{GetBaseId}{\void}
95
96Returns the base identifier for the range used for appending items.
97
98
69e72fda
VZ
99\membersection{wxFileHistory::GetCount}\label{wxfilehistorygetcount}
100
101\constfunc{size\_t}{GetCount}{\void}
102
103Returns the number of files currently stored in the file history.
104
105
7f555861 106\membersection{wxFileHistory::GetHistoryFile}\label{wxfilehistorygethistoryfile}
a660d684 107
0f48e3d5 108\constfunc{wxString}{GetHistoryFile}{\param{size\_t}{ index}}
a660d684 109
7f555861 110Returns the file at this index (zero-based).
a660d684 111
86110e1a 112
b236c10f 113\membersection{wxFileHistory::GetMaxFiles}\label{wxfilehistorygetmaxfiles}
a660d684 114
69e72fda 115\constfunc{int}{GetMaxFiles}{\void}
a660d684
KB
116
117Returns the maximum number of files that can be stored.
118
86110e1a 119
69e72fda 120\membersection{wxFileHistory::GetMenus}\label{wxfilehistorygetmenus}
a660d684 121
69e72fda 122\constfunc{const wxList\&}{GetMenus}{\void}
a660d684 123
69e72fda
VZ
124Returns the list of menus that are managed by this file history object.
125
126\wxheading{See also}
127
128\helpref{wxFileHistory::UseMenu}{wxfilehistoryusemenu}
a660d684 129
86110e1a 130
b236c10f 131\membersection{wxFileHistory::Load}\label{wxfilehistoryload}
7f555861
JS
132
133\func{void}{Load}{\param{wxConfigBase\& }{config}}
134
135Loads the file history from the given config object. This function should be called explicitly by the application.
136
137\wxheading{See also}
138
139\helpref{wxConfig}{wxconfigbase}
140
86110e1a 141
e7dfcb8e
JS
142\membersection{wxFileHistory::RemoveFileFromHistory}\label{wxfilehistoryfromfilefromhistory}
143
144\func{void}{RemoveFileFromHistory}{\param{size\_t }{i}}
145
146Removes the specified file from the history.
147
b236c10f 148\membersection{wxFileHistory::RemoveMenu}\label{wxfilehistoryremovemenu}
7f555861
JS
149
150\func{void}{RemoveMenu}{\param{wxMenu* }{menu}}
151
152Removes this menu from the list of those managed by this object.
153
86110e1a 154
b236c10f 155\membersection{wxFileHistory::Save}\label{wxfilehistorysave}
7f555861
JS
156
157\func{void}{Save}{\param{wxConfigBase\& }{config}}
158
159Saves the file history into the given config object. This must be called
160explicitly by the application.
161
162\wxheading{See also}
163
164\helpref{wxConfig}{wxconfigbase}
165
86110e1a 166
652dbdc0
JS
167\membersection{wxFileHistory::SetBaseId}\label{wxfilehistorysetbaseid}
168
169\func{void}{SetBaseId}{\param{wxWindowID}{ baseId}}
170
171Sets the base identifier for the range used for appending items.
172
173
b236c10f 174\membersection{wxFileHistory::UseMenu}\label{wxfilehistoryusemenu}
7f555861
JS
175
176\func{void}{UseMenu}{\param{wxMenu* }{menu}}
177
86110e1a
VZ
178Adds this menu to the list of those menus that are managed by this file history object.
179Also see \helpref{AddFilesToMenu()}{wxfilehistoryaddfilestomenu} for
180initializing the menu with filenames that are already in the history when this
181function is called, as this is not done automatically.
a660d684 182