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{wxFileHistory overview
}{wxfilehistoryoverview
},
\helpref{wxDocManager
}{wxdocmanager
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
25 \membersection{wxFileHistory::m
\_fileHistory}\label{wxfilehistorymfilehistory
}
27 \member{char**
}{m
\_fileHistory}
29 A character array of strings corresponding to the most recently opened
33 \membersection{wxFileHistory::m
\_fileHistoryN}\label{wxfilehistorymfilehistoryn
}
35 \member{size
\_t}{m
\_fileHistoryN}
37 The number of files stored in the history array.
40 \membersection{wxFileHistory::m
\_fileMaxFiles}\label{wxfilehistorymfilemaxfiles
}
42 \member{size
\_t}{m
\_fileMaxFiles}
44 The maximum number of files to be stored and displayed on the menu.
47 \membersection{wxFileHistory::m
\_fileMenu}\label{wxfilehistorymfilemenu
}
49 \member{wxMenu*
}{m
\_fileMenu}
51 The file menu used to display the file history list (if enabled).
54 \membersection{wxFileHistory::wxFileHistory
}\label{wxfilehistoryctor
}
56 \func{}{wxFileHistory
}{\param{size
\_t}{ maxFiles =
9},
\param{wxWindowID
}{ idBase = wxID
\_FILE1}}
58 Constructor. Pass the maximum number of files that should be stored and
61 {\it idBase
} defaults to wxID
\_FILE1 and represents the id given to the first
62 history menu item. Since menu items can't share the same ID you should change
63 idBase (To one of your own defined IDs) when using more than one wxFileHistory
67 \membersection{wxFileHistory::
\destruct{wxFileHistory
}}\label{wxfilehistorydtor
}
69 \func{}{\destruct{wxFileHistory
}}{\void}
74 \membersection{wxFileHistory::AddFileToHistory
}\label{wxfilehistoryaddfiletohistory
}
76 \func{void
}{AddFileToHistory
}{\param{const wxString\&
}{filename
}}
78 Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
81 \membersection{wxFileHistory::AddFilesToMenu
}\label{wxfilehistoryaddfilestomenu
}
83 \func{void
}{AddFilesToMenu
}{\void}\label{wxfilehistoryaddfilestomenu
}
85 Appends the files in the history list, to all menus managed by the file history object.
87 \func{void
}{AddFilesToMenu
}{\param{wxMenu*
}{ menu
}}
89 Appends the files in the history list, to the given menu only.
92 \membersection{wxFileHistory::GetBaseId
}\label{wxfilehistorygetbaseid
}
94 \constfunc{wxWindowID
}{GetBaseId
}{\void}
96 Returns the base identifier for the range used for appending items.
99 \membersection{wxFileHistory::GetCount
}\label{wxfilehistorygetcount
}
101 \constfunc{size
\_t}{GetCount
}{\void}
103 Returns the number of files currently stored in the file history.
106 \membersection{wxFileHistory::GetHistoryFile
}\label{wxfilehistorygethistoryfile
}
108 \constfunc{wxString
}{GetHistoryFile
}{\param{size
\_t}{ index
}}
110 Returns the file at this index (zero-based).
113 \membersection{wxFileHistory::GetMaxFiles
}\label{wxfilehistorygetmaxfiles
}
115 \constfunc{int
}{GetMaxFiles
}{\void}
117 Returns the maximum number of files that can be stored.
120 \membersection{wxFileHistory::GetMenus
}\label{wxfilehistorygetmenus
}
122 \constfunc{const wxList\&
}{GetMenus
}{\void}
124 Returns the list of menus that are managed by this file history object.
128 \helpref{wxFileHistory::UseMenu
}{wxfilehistoryusemenu
}
131 \membersection{wxFileHistory::Load
}\label{wxfilehistoryload
}
133 \func{void
}{Load
}{\param{wxConfigBase\&
}{config
}}
135 Loads the file history from the given config object. This function should be called explicitly by the application.
139 \helpref{wxConfig
}{wxconfigbase
}
142 \membersection{wxFileHistory::RemoveFileFromHistory
}\label{wxfilehistoryfromfilefromhistory
}
144 \func{void
}{RemoveFileFromHistory
}{\param{size
\_t }{i
}}
146 Removes the specified file from the history.
148 \membersection{wxFileHistory::RemoveMenu
}\label{wxfilehistoryremovemenu
}
150 \func{void
}{RemoveMenu
}{\param{wxMenu*
}{menu
}}
152 Removes this menu from the list of those managed by this object.
155 \membersection{wxFileHistory::Save
}\label{wxfilehistorysave
}
157 \func{void
}{Save
}{\param{wxConfigBase\&
}{config
}}
159 Saves the file history into the given config object. This must be called
160 explicitly by the application.
164 \helpref{wxConfig
}{wxconfigbase
}
167 \membersection{wxFileHistory::SetBaseId
}\label{wxfilehistorysetbaseid
}
169 \func{void
}{SetBaseId
}{\param{wxWindowID
}{ baseId
}}
171 Sets the base identifier for the range used for appending items.
174 \membersection{wxFileHistory::UseMenu
}\label{wxfilehistoryusemenu
}
176 \func{void
}{UseMenu
}{\param{wxMenu*
}{menu
}}
178 Adds this menu to the list of those menus that are managed by this file history object.
179 Also see
\helpref{AddFilesToMenu()
}{wxfilehistoryaddfilestomenu
} for
180 initializing the menu with filenames that are already in the history when this
181 function is called, as this is not done automatically.