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