]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/filehist.tex
Updating MSW file list.
[wxWidgets.git] / docs / latex / wx / filehist.tex
... / ...
CommitLineData
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
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
10\wxheading{Derived from}
11
12\helpref{wxObject}{wxobject}
13
14\wxheading{Include files}
15
16<wx/docview.h>
17
18\wxheading{See also}
19
20\helpref{wxFileHistory overview}{wxfilehistoryoverview}, \helpref{wxDocManager}{wxdocmanager}
21
22\latexignore{\rtfignore{\wxheading{Members}}}
23
24
25\membersection{wxFileHistory::m\_fileHistory}\label{wxfilehistorymfilehistory}
26
27\member{char**}{m\_fileHistory}
28
29A character array of strings corresponding to the most recently opened
30files.
31
32
33\membersection{wxFileHistory::m\_fileHistoryN}\label{wxfilehistorymfilehistoryn}
34
35\member{size\_t}{m\_fileHistoryN}
36
37The number of files stored in the history array.
38
39
40\membersection{wxFileHistory::m\_fileMaxFiles}\label{wxfilehistorymfilemaxfiles}
41
42\member{size\_t}{m\_fileMaxFiles}
43
44The maximum number of files to be stored and displayed on the menu.
45
46
47\membersection{wxFileHistory::m\_fileMenu}\label{wxfilehistorymfilemenu}
48
49\member{wxMenu*}{m\_fileMenu}
50
51The file menu used to display the file history list (if enabled).
52
53
54\membersection{wxFileHistory::wxFileHistory}\label{wxfilehistoryctor}
55
56\func{}{wxFileHistory}{\param{size\_t}{ maxFiles = 9}, \param{wxWindowID}{ idBase = wxID\_FILE1}}
57
58Constructor. Pass the maximum number of files that should be stored and
59displayed.
60
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.
65
66
67\membersection{wxFileHistory::\destruct{wxFileHistory}}\label{wxfilehistorydtor}
68
69\func{}{\destruct{wxFileHistory}}{\void}
70
71Destructor.
72
73
74\membersection{wxFileHistory::AddFileToHistory}\label{wxfilehistoryaddfiletohistory}
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
80
81\membersection{wxFileHistory::AddFilesToMenu}\label{wxfilehistoryaddfilestomenu}
82
83\func{void}{AddFilesToMenu}{\void}\label{wxfilehistoryaddfilestomenu}
84
85Appends the files in the history list, to all menus managed by the file history object.
86
87\func{void}{AddFilesToMenu}{\param{wxMenu*}{ menu}}
88
89Appends the files in the history list, to the given menu only.
90
91
92\membersection{wxFileHistory::GetCount}\label{wxfilehistorygetcount}
93
94\constfunc{size\_t}{GetCount}{\void}
95
96Returns the number of files currently stored in the file history.
97
98
99\membersection{wxFileHistory::GetHistoryFile}\label{wxfilehistorygethistoryfile}
100
101\constfunc{wxString}{GetHistoryFile}{\param{size\_t}{ index}}
102
103Returns the file at this index (zero-based).
104
105
106\membersection{wxFileHistory::GetMaxFiles}\label{wxfilehistorygetmaxfiles}
107
108\constfunc{int}{GetMaxFiles}{\void}
109
110Returns the maximum number of files that can be stored.
111
112
113\membersection{wxFileHistory::GetMenus}\label{wxfilehistorygetmenus}
114
115\constfunc{const wxList\&}{GetMenus}{\void}
116
117Returns the list of menus that are managed by this file history object.
118
119\wxheading{See also}
120
121\helpref{wxFileHistory::UseMenu}{wxfilehistoryusemenu}
122
123
124\membersection{wxFileHistory::Load}\label{wxfilehistoryload}
125
126\func{void}{Load}{\param{wxConfigBase\& }{config}}
127
128Loads the file history from the given config object. This function should be called explicitly by the application.
129
130\wxheading{See also}
131
132\helpref{wxConfig}{wxconfigbase}
133
134
135\membersection{wxFileHistory::RemoveFileFromHistory}\label{wxfilehistoryfromfilefromhistory}
136
137\func{void}{RemoveFileFromHistory}{\param{size\_t }{i}}
138
139Removes the specified file from the history.
140
141\membersection{wxFileHistory::RemoveMenu}\label{wxfilehistoryremovemenu}
142
143\func{void}{RemoveMenu}{\param{wxMenu* }{menu}}
144
145Removes this menu from the list of those managed by this object.
146
147
148\membersection{wxFileHistory::Save}\label{wxfilehistorysave}
149
150\func{void}{Save}{\param{wxConfigBase\& }{config}}
151
152Saves the file history into the given config object. This must be called
153explicitly by the application.
154
155\wxheading{See also}
156
157\helpref{wxConfig}{wxconfigbase}
158
159
160\membersection{wxFileHistory::UseMenu}\label{wxfilehistoryusemenu}
161
162\func{void}{UseMenu}{\param{wxMenu* }{menu}}
163
164Adds this menu to the list of those menus that are managed by this file history object.
165Also see \helpref{AddFilesToMenu()}{wxfilehistoryaddfilestomenu} for
166initializing the menu with filenames that are already in the history when this
167function is called, as this is not done automatically.
168