File: wx92.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (153 lines) | stat: -rw-r--r-- 5,410 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<HTML>
<head><title>wxFileHistory</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxfilehistory"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx91.htm#wxfiledroptarget"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx93.htm#wxfileinputstream"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxFileHistory</H2>
<P>
The wxFileHistory encapsulates a user interface convenience, the
list of most recently visited files as shown on a menu (usually the File menu).<P>
wxFileHistory can manage one or more file menus. More than one menu may be required
in an MDI application, where the file history should appear on each MDI child menu
as well as the MDI parent frame.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/docview.h&gt;<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx298.htm#wxfilehistoryoverview">wxFileHistory overview</A>, <A HREF="wx74.htm#wxdocmanager">wxDocManager</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic363">wxFileHistory::m_fileHistory</A><BR>
<A HREF="#topic364">wxFileHistory::m_fileHistoryN</A><BR>
<A HREF="#topic365">wxFileHistory::m_fileMaxFiles</A><BR>
<A HREF="#topic366">wxFileHistory::m_fileMenu</A><BR>
<A HREF="#topic367">wxFileHistory::wxFileHistory</A><BR>
<A HREF="#topic368">wxFileHistory::~wxFileHistory</A><BR>
<A HREF="#topic369">wxFileHistory::AddFileToHistory</A><BR>
<A HREF="#wxfilehistoryaddfilestomenu">wxFileHistory::AddFilesToMenu</A><BR>
<A HREF="#wxfilehistorygethistoryfile">wxFileHistory::GetHistoryFile</A><BR>
<A HREF="#topic370">wxFileHistory::GetMaxFiles</A><BR>
<A HREF="#topic371">wxFileHistory::GetNoHistoryFiles</A><BR>
<A HREF="#topic372">wxFileHistory::Load</A><BR>
<A HREF="#topic373">wxFileHistory::RemoveMenu</A><BR>
<A HREF="#topic374">wxFileHistory::Save</A><BR>
<A HREF="#topic375">wxFileHistory::UseMenu</A><BR>
<P>

<HR>
<A NAME="topic363"></A>
<H3>wxFileHistory::m_fileHistory</H3>
<P>
char** m_fileHistory<P>
A character array of strings corresponding to the most recently opened
files.<P>

<HR>
<A NAME="topic364"></A>
<H3>wxFileHistory::m_fileHistoryN</H3>
<P>
int m_fileHistoryN<P>
The number of files stored in the history array.<P>

<HR>
<A NAME="topic365"></A>
<H3>wxFileHistory::m_fileMaxFiles</H3>
<P>
int m_fileMaxFiles<P>
The maximum number of files to be stored and displayed on the menu.<P>

<HR>
<A NAME="topic366"></A>
<H3>wxFileHistory::m_fileMenu</H3>
<P>
wxMenu* m_fileMenu<P>
The file menu used to display the file history list (if enabled).<P>

<HR>
<A NAME="topic367"></A>
<H3>wxFileHistory::wxFileHistory</H3>
<P>
<B></B> <B>wxFileHistory</B>(<B>int</B><I> maxFiles = 9</I>)<P>
Constructor. Pass the maximum number of files that should be stored and displayed.<P>

<HR>
<A NAME="topic368"></A>
<H3>wxFileHistory::~wxFileHistory</H3>
<P>
<B></B> <B>~wxFileHistory</B>()<P>
Destructor.<P>

<HR>
<A NAME="topic369"></A>
<H3>wxFileHistory::AddFileToHistory</H3>
<P>
<B>void</B> <B>AddFileToHistory</B>(<B>const wxString&amp; </B><I>filename</I>)<P>
Adds a file to the file history list, if the object has a pointer to an appropriate file menu.<P>

<HR>
<A NAME="wxfilehistoryaddfilestomenu"></A>
<H3>wxFileHistory::AddFilesToMenu</H3>
<P>
<B>void</B> <B>AddFilesToMenu</B>()<P>
Appends the files in the history list, to all menus managed by the file history object.<P>
<B>void</B> <B>AddFilesToMenu</B>(<B>wxMenu*</B><I> menu</I>)<P>
Appends the files in the history list, to the given menu only.<P>

<HR>
<A NAME="wxfilehistorygethistoryfile"></A>
<H3>wxFileHistory::GetHistoryFile</H3>
<P>
<B>wxString</B> <B>GetHistoryFile</B>(<B>int</B><I> index</I>) <B>const</B><P>
Returns the file at this index (zero-based).<P>

<HR>
<A NAME="topic370"></A>
<H3>wxFileHistory::GetMaxFiles</H3>
<P>
<B>int</B> <B>GetMaxFiles</B>() <B>const</B><P>
Returns the maximum number of files that can be stored.<P>

<HR>
<A NAME="topic371"></A>
<H3>wxFileHistory::GetNoHistoryFiles</H3>
<P>
<B>int</B> <B>GetNoHistoryFiles</B>() <B>const</B><P>
Returns the number of files currently stored in the file history.<P>

<HR>
<A NAME="topic372"></A>
<H3>wxFileHistory::Load</H3>
<P>
<B>void</B> <B>Load</B>(<B>wxConfigBase&amp; </B><I>config</I>)<P>
Loads the file history from the given config object. This function should be called explicitly by the application.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx55.htm#wxconfigbase">wxConfig</A><P>

<HR>
<A NAME="topic373"></A>
<H3>wxFileHistory::RemoveMenu</H3>
<P>
<B>void</B> <B>RemoveMenu</B>(<B>wxMenu* </B><I>menu</I>)<P>
Removes this menu from the list of those managed by this object.<P>

<HR>
<A NAME="topic374"></A>
<H3>wxFileHistory::Save</H3>
<P>
<B>void</B> <B>Save</B>(<B>wxConfigBase&amp; </B><I>config</I>)<P>
Saves the file history into the given config object. This must be called
explicitly by the application.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx55.htm#wxconfigbase">wxConfig</A><P>

<HR>
<A NAME="topic375"></A>
<H3>wxFileHistory::UseMenu</H3>
<P>
<B>void</B> <B>UseMenu</B>(<B>wxMenu* </B><I>menu</I>)<P>
Adds this menu to the list of those managed by this object.<P>


</BODY></HTML>