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{wxCore
}{librarieslist
}
24 \helpref{wxFileHistory overview
}{wxfilehistoryoverview
},
\helpref{wxDocManager
}{wxdocmanager
}
26 \latexignore{\rtfignore{\wxheading{Members
}}}
29 \membersection{wxFileHistory::m
\_fileHistory}\label{wxfilehistorymfilehistory
}
31 \member{char**
}{m
\_fileHistory}
33 A character array of strings corresponding to the most recently opened
37 \membersection{wxFileHistory::m
\_fileHistoryN}\label{wxfilehistorymfilehistoryn
}
39 \member{size
\_t}{m
\_fileHistoryN}
41 The number of files stored in the history array.
44 \membersection{wxFileHistory::m
\_fileMaxFiles}\label{wxfilehistorymfilemaxfiles
}
46 \member{size
\_t}{m
\_fileMaxFiles}
48 The maximum number of files to be stored and displayed on the menu.
51 \membersection{wxFileHistory::m
\_fileMenu}\label{wxfilehistorymfilemenu
}
53 \member{wxMenu*
}{m
\_fileMenu}
55 The file menu used to display the file history list (if enabled).
58 \membersection{wxFileHistory::wxFileHistory
}\label{wxfilehistoryctor
}
60 \func{}{wxFileHistory
}{\param{size
\_t}{ maxFiles =
9},
\param{wxWindowID
}{ idBase = wxID
\_FILE1}}
62 Constructor. Pass the maximum number of files that should be stored and
65 {\it idBase
} defaults to wxID
\_FILE1 and represents the id given to the first
66 history menu item. Since menu items can't share the same ID you should change
67 idBase (To one of your own defined IDs) when using more than one wxFileHistory
71 \membersection{wxFileHistory::
\destruct{wxFileHistory
}}\label{wxfilehistorydtor
}
73 \func{}{\destruct{wxFileHistory
}}{\void}
78 \membersection{wxFileHistory::AddFileToHistory
}\label{wxfilehistoryaddfiletohistory
}
80 \func{void
}{AddFileToHistory
}{\param{const wxString\&
}{filename
}}
82 Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
85 \membersection{wxFileHistory::AddFilesToMenu
}\label{wxfilehistoryaddfilestomenu
}
87 \func{void
}{AddFilesToMenu
}{\void}\label{wxfilehistoryaddfilestomenu
}
89 Appends the files in the history list, to all menus managed by the file history object.
91 \func{void
}{AddFilesToMenu
}{\param{wxMenu*
}{ menu
}}
93 Appends the files in the history list, to the given menu only.
96 \membersection{wxFileHistory::GetBaseId
}\label{wxfilehistorygetbaseid
}
98 \constfunc{wxWindowID
}{GetBaseId
}{\void}
100 Returns the base identifier for the range used for appending items.
103 \membersection{wxFileHistory::GetCount
}\label{wxfilehistorygetcount
}
105 \constfunc{size
\_t}{GetCount
}{\void}
107 Returns the number of files currently stored in the file history.
110 \membersection{wxFileHistory::GetHistoryFile
}\label{wxfilehistorygethistoryfile
}
112 \constfunc{wxString
}{GetHistoryFile
}{\param{size
\_t}{ index
}}
114 Returns the file at this index (zero-based).
117 \membersection{wxFileHistory::GetMaxFiles
}\label{wxfilehistorygetmaxfiles
}
119 \constfunc{int
}{GetMaxFiles
}{\void}
121 Returns the maximum number of files that can be stored.
124 \membersection{wxFileHistory::GetMenus
}\label{wxfilehistorygetmenus
}
126 \constfunc{const wxList\&
}{GetMenus
}{\void}
128 Returns the list of menus that are managed by this file history object.
132 \helpref{wxFileHistory::UseMenu
}{wxfilehistoryusemenu
}
135 \membersection{wxFileHistory::Load
}\label{wxfilehistoryload
}
137 \func{void
}{Load
}{\param{wxConfigBase\&
}{config
}}
139 Loads the file history from the given config object. This function should be called explicitly by the application.
143 \helpref{wxConfig
}{wxconfigbase
}
146 \membersection{wxFileHistory::RemoveFileFromHistory
}\label{wxfilehistoryfromfilefromhistory
}
148 \func{void
}{RemoveFileFromHistory
}{\param{size
\_t }{i
}}
150 Removes the specified file from the history.
152 \membersection{wxFileHistory::RemoveMenu
}\label{wxfilehistoryremovemenu
}
154 \func{void
}{RemoveMenu
}{\param{wxMenu*
}{menu
}}
156 Removes this menu from the list of those managed by this object.
159 \membersection{wxFileHistory::Save
}\label{wxfilehistorysave
}
161 \func{void
}{Save
}{\param{wxConfigBase\&
}{config
}}
163 Saves the file history into the given config object. This must be called
164 explicitly by the application.
168 \helpref{wxConfig
}{wxconfigbase
}
171 \membersection{wxFileHistory::SetBaseId
}\label{wxfilehistorysetbaseid
}
173 \func{void
}{SetBaseId
}{\param{wxWindowID
}{ baseId
}}
175 Sets the base identifier for the range used for appending items.
178 \membersection{wxFileHistory::UseMenu
}\label{wxfilehistoryusemenu
}
180 \func{void
}{UseMenu
}{\param{wxMenu*
}{menu
}}
182 Adds this menu to the list of those menus that are managed by this file history object.
183 Also see
\helpref{AddFilesToMenu()
}{wxfilehistoryaddfilestomenu
} for
184 initializing the menu with filenames that are already in the history when this
185 function is called, as this is not done automatically.