\twocolitem{\helpref{wxTextFile}{wxtextfile}}{Class for working with text files as with arrays of lines}
\end{twocollist}
+{\large {\bf Stream classes}}
+
+wxWindows has its own set of stream classes, as an alternative to often buggy standard stream
+libraries, and to provide enhanced functionality.
+
+\begin{twocollist}\itemsep=0pt
+\twocolitem{\helpref{wxStreamBase}{wxstreambase}}{Stream base class}
+\twocolitem{\helpref{wxStreamBuffer}{wxstreambuffer}}{Stream buffer class}
+\twocolitem{\helpref{wxInputStream}{wxinputstream}}{Input stream class}
+\twocolitem{\helpref{wxOutputStream}{wxoutputstream}}{Output stream class}
+\twocolitem{\helpref{wxFilterInputStream}{wxfilterinputstream}}{Filtered input stream class}
+\twocolitem{\helpref{wxFilterOutputStream}{wxfilteroutputstream}}{Filtered output stream class}
+\twocolitem{\helpref{wxDataInputStream}{wxdatainputstream}}{Platform-independent data input stream class}
+\twocolitem{\helpref{wxDataOutputStream}{wxdataoutputstream}}{Platform-independent data output stream class}
+\twocolitem{\helpref{wxFileInputStream}{wxfileinputstream}}{File input stream class}
+\twocolitem{\helpref{wxFileOutputStream}{wxfileoutputstream}}{File output stream class}
+\twocolitem{\helpref{wxZlibInputStream}{wxzlibinputstream}}{Zlib (compression) input stream class}
+\twocolitem{\helpref{wxZlibOutputStream}{wxzliboutputstream}}{Zlib (compression) output stream class}
+\twocolitem{\helpref{wxSocketInputStream}{wxsocketinputstream}}{Socket input stream class}
+\twocolitem{\helpref{wxSocketOutputStream}{wxsocketoutputstream}}{Socket output stream class}
+\end{twocollist}
+
{\large {\bf Miscellaneous}}
\begin{twocollist}\itemsep=0pt
\input cursor.tex
\input database.tex
\input dataobj.tex
-\input date.tex
\input datstrm.tex
+\input date.tex
\input dc.tex
\input ddeclint.tex
\input ddeconn.tex
\input fildrptg.tex
\input filehist.tex
\input filetype.tex
+\input strmfile.tex
\input fltinstr.tex
\input fltoutst.tex
\input focusevt.tex
\input slider.tex
\input sckaddr.tex
\input socket.tex
+\input strmsock.tex
\input spinbutt.tex
\input splitter.tex
\input statbmp.tex
\input statusbr.tex
\input wxstring.tex
\input strlist.tex
-\input stream.tex
\input strmbase.tex
-\input strmext.tex
+\input stream.tex
\input sysclevt.tex
\input settings.tex
\input tab.tex
\input wave.tex
\input window.tex
\input windowdc.tex
-
+\input strmzlib.tex
\input function.tex
\input keycode.tex
-\section{\class{wxDataStream}}\label{wxdatastream}
+\section{\class{wxDataInputStream}}\label{wxdatainputstream}
-This class provides functions that read and write integers or double in a
+This class provides functions that read data types in a
portable way. So, a file written by an Intel processor can be read by a
Sparc or anything else.
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxDataStream::wxDataStream}\label{wxdatastreamconstr}
-
-\func{}{wxDataStream}{\param{istream\&}{ stream}}
+\wxheading{Derived from}
-Constructs a datastream object from a C++ input stream. Only read methods will
-be available.
+\helpref{wxFilterInputStream}{wxfilterinputstream}\\
+\helpref{wxInputStream}{wxinputstream}\\
+\helpref{wxStreamBase}{wxstreambase}
-\wxheading{Parameters}
+\latexignore{\rtfignore{\wxheading{Members}}}
-\docparam{stream}{The C++ input stream.}
+\membersection{wxDataInputStream::wxDataInputStream}\label{wxdatainputstreamconstr}
-\func{}{wxDataStream}{\param{istream\&}{ stream}}
+\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}}
-Constructs a datastream object from a C++ input stream. Only read methods will
+Constructs a datastream object from an input stream. Only read methods will
be available.
\wxheading{Parameters}
-\docparam{stream}{The C++ input stream.}
+\docparam{stream}{The input stream.}
-\membersection{wxDataStream::\destruct{wxDataStream}}
+\membersection{wxDataInputStream::\destruct{wxDataInputStream}}
-\func{}{\destruct{wxDataStream}}{\void}
+\func{}{\destruct{wxDataInputStream}}{\void}
-Destroys the wxDataStream object.
+Destroys the wxDataInputStream object.
-\membersection{wxDataStream::Read8}
+\membersection{wxDataInputStream::Read8}
\func{unsigned char}{Read8}{\void}
Reads a single byte from the stream.
-\membersection{wxDataStream::Read16}
+\membersection{wxDataInputStream::Read16}
\func{unsigned short}{Read16}{\void}
Reads a 16 bit integer from the stream.
-\membersection{wxDataStream::Read32}
+\membersection{wxDataInputStream::Read32}
\func{unsigned long}{Read32}{\void}
Reads a 32 bit integer from the stream.
-\membersection{wxDataStream::ReadDouble}
+\membersection{wxDataInputStream::ReadDouble}
\func{double}{ReadDouble}{\void}
Reads a double (IEEE encoded) from the stream.
-\membersection{wxDataStream::ReadString}
+\membersection{wxDataInputStream::ReadString}
-\func{wxString}{wxDataStream::ReadString}{\void}
+\func{wxString}{wxDataInputStream::ReadString}{\void}
-Reads a string from a stream. Actually, this function first reads a byte
+Reads a string from a stream. Actually, this function first reads a long integer
specifying the length of the string (without the last null character) and then
reads the string.
-\membersection{wxDataStream::ReadLine}
+\membersection{wxDataInputStream::ReadLine}
-\func{wxString}{wxDataStream::ReadLine}{\void}
+\func{wxString}{wxDataInputStream::ReadLine}{\void}
Reads a line from the stream. A line is a string which ends with \\n or \\r\\n.
-\membersection{wxDataStream::Write8}
+\section{\class{wxDataOutputStream}}\label{wxdataoutputstream}
+
+This class provides functions that write data types in a
+portable way. So, a file written by an Intel processor can be read by a
+Sparc or anything else.
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxDataOutputStream::wxDataOutputStream}\label{wxdataoutputstreamconstr}
+
+\func{}{wxDataInputStream}{\param{wxOutputStream\&}{ stream}}
+
+Constructs a datastream object from an output stream. Only read methods will
+be available.
+
+\wxheading{Parameters}
+
+\docparam{stream}{The output stream.}
+
+\membersection{wxDataOutputStream::\destruct{wxDataOutputStream}}
+
+\func{}{\destruct{wxDataOutputStream}}{\void}
+
+Destroys the wxDataOutputStream object.
+
+\membersection{wxDataOutputStream::Write8}
-\func{void}{wxDataStream::Write8}{{\param unsigned char }{i8}}
+\func{void}{wxDataOutputStream::Write8}{{\param unsigned char }{i8}}
Writes the single byte {\it i8} to the stream.
-\membersection{wxDataStream::Write16}
+\membersection{wxDataOutputStream::Write16}
-\func{void}{wxDataStream::Write16}{{\param unsigned short }{i16}}
+\func{void}{wxDataOutputStream::Write16}{{\param unsigned short }{i16}}
Writes the 16 bit integer {\it i16} to the stream.
-\membersection{wxDataStream::Write32}
+\membersection{wxDataOutputStream::Write32}
-\func{void}{wxDataStream::Write32}{{\param unsigned long }{i32}}
+\func{void}{wxDataOutputStream::Write32}{{\param unsigned long }{i32}}
Writes the 32 bit integer {\it i32} to the stream.
-\membersection{wxDataStream::WriteDouble}
+\membersection{wxDataOutputStream::WriteDouble}
-\func{void}{wxDataStream::WriteDouble}{{\param double }{f}}
+\func{void}{wxDataOutputStream::WriteDouble}{{\param double }{f}}
Writes the double {\it f} to the stream using the IEEE format.
-\membersection{wxDataStream::WriteString}
+\membersection{wxDataOutputStream::WriteString}
-\func{void}{wxDataStream::WriteString}{{\param const wxString\& }{string}}
+\func{void}{wxDataOutputStream::WriteString}{{\param const wxString\& }{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.
-\membersection{wxDataStream::WriteLine}
+\membersection{wxDataOutputStream::WriteLine}
-\func{void}{wxDataStream::WriteLine}{{\param const wxString\& }{string}}
+\func{void}{wxDataOutputStream::WriteLine}{{\param const wxString\& }{string}}
Writes {\it string} as a line. Depending on the operating system, it adds
-\\n or \\r\\n.
+$\backslash$n or $\backslash$r$\backslash$n.
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "referenc"
-%%% End:
\wxheading{Derived from}
-\helpref{wxInputStream}{wxinputstream}
+\helpref{wxInputStream}{wxinputstream}\\
+\helpref{wxStreamBase}{wxstreambase}
\wxheading{Note}
\wxheading{Derived from}
-\helpref{wxOutputStream}{wxoutputstream}
+\helpref{wxOutputStream}{wxoutputstream}\\
+\helpref{wxStreamBase}{wxstreambase}
\wxheading{Note}
Returns the next file that matches the path passed to \helpref{wxFindFirstFile}{wxfindfirstfile}.
+\membersection{::wxGetOSDirectory}\label{wxgetosdirectory}
+
+\func{wxString}{wxGetOSDirectory}{\void}
+
+Returns the Windows directory under Windows; on other platforms returns the empty string.
+
\membersection{::wxIsAbsolutePath}
\func{bool}{wxIsAbsolutePath}{\param{const wxString\& }{filename}}
\helpref{wxMenu::SetTitle}{wxmenusettitle}
+\membersection{wxMenu::UpdateUI}\label{wxmenuupdateui}
+
+\constfunc{void}{UpdateUI}{\param{wxEvtHandler*}{ source = NULL}}
+
+Sends events to {\it source} (or owning window if NULL) to update the
+menu UI. This is called just before the menu is popped up with \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}, but
+the application may call it at other times if required.
+
+\wxheading{See also}
+
+\helpref{wxUpdateUIEvent}{wxupdateuievent}
+
\section{\class{wxMenuBar}}\label{wxmenubar}
A menu bar is a series of menus accessible from the top of a frame.
+++ /dev/null
-% -----------------------------------------------------------------------------
-% wxZlibInputStream
-% -----------------------------------------------------------------------------
-\section{\class{wxZlibInputStream}}
-
-\wxheading{Derived from}
-
-\helpref{wxFilterInputStream}{wxfilterinputstream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxInputStream}{wxinputstream}
-
-\wxheading{Short description}
-
-This stream uncompresses all data read from it. It uses the ``filtered''
-stream to get new compressed data.
-
-% -----------------------------------------------------------------------------
-% wxZlibOutputStream
-% -----------------------------------------------------------------------------
-\section{\class{wxZlibOutputStream}}
-
-\wxheading{Derived from}
-
-\helpref{wxFilterOutputStream}{wxfilteroutputstream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxOutputStream}{woutputstream}
-
-\wxheading{Short description}
-
-This stream compresses all data written to it and passed the compressed data
-to the ``filtered'' stream.
-
-% -----------------------------------------------------------------------------
-% wxFileInputStream
-% -----------------------------------------------------------------------------
-\section{\class{wxFileInputStream}}\label{wxfileinputstream}
-
-\wxheading{Derived from}
-
-\helpref{wxInputStream}{wxinputstream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}
-
-% ----------
-% Members
-% ----------
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxFileInputStream::wxFileInputStream}
-
-\func{}{wxFileInputStream}{\param{const wxString\&}{ ifileName}}
-
-Opens the specified file using its \it{ifilename} name in read-only mode.
-
-\func{}{wxFileInputStream}{\param{wxFile\&}{ file}}
-
-Initializes a file stream in read-only mode using the file I/O object \it{file}.
-
-\func{}{wxFileInputStream}{\param{int}{ fd}}
-
-Initializes a file stream in read-only mode using the specified file descriptor.
-
-\membersection{wxFileInputStream::\destruct{wxFileInputStream}}
-
-\func{}{\destruct{wxFileInputStream}}{\void}
-
-Destructor.
-
-\membersection{wxFileInputStream::Ok}
-
-\constfunc{bool}{Ok}{\void}
-
-Returns TRUE if the stream is initialized and ready.
-
-% -----------------------------------------------------------------------------
-% wxFileOutputStream
-% -----------------------------------------------------------------------------
-\section{\class{wxFileOutputStream}}\label{wxfileoutputstream}
-
-\wxheading{Derived from}
-
-\helpref{wxOutputStream}{wxoutputstream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}
-
-% ----------
-% Members
-% ----------
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxFileOutputStream::wxFileOutputStream}
-
-\func{}{wxFileOutputStream}{\param{const wxString\&}{ ofileName}}
-
-Creates a new file with \it{ofilename} name and initializes the stream in
-write-only mode.
-
-\func{}{wxFileOutputStream}{\param{wxFile&}{ file}}
-
-Initializes a file stream in write-only mode using the file I/O object \it{file}.
-
-\func{}{wxFileOutputStream}{\param{int}{ fd}}
-
-Initializes a file stream in write-only mode using the file descriptor \it{fd}.
-
-\membersection{wxFileOutputStream::\destruct{wxFileOutputStream}}
-
-\func{}{\destruct{wxFileOutputStream}}{\void}
-
-Destructor.
-
-\membersection{wxFileOutputStream::Ok}
-
-\constfunc{bool}{Ok}{\void}
-
-Returns TRUE if the stream is initialized and ready.
-
-% -----------------------------------------------------------------------------
-% wxFileStream
-% -----------------------------------------------------------------------------
-\section{\class{wxFileStream}}
-
-\wxheading{Derived from}
-
-\helpref{wxFileOutputStream}{wxFileOutputStream}, \helpref{wxFileInputStream}{wxfileinputstream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxFileStream::wxFileStream}
-
-\func{}{wxFileStream}{\param{const wxString\&}{ iofileName}}
-
-Initializes a new file stream in read-write mode using the specified
-\it{iofilename} name.
-
-% -----------------------------------------------------------------------------
-% wxSocketInputStream
-% -----------------------------------------------------------------------------
-\section{\class{wxSocketInputStream}}
-
-\wxheading{Derived from}
-
-\helpref{wxInputStream}{wxinputStream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxSocketBase}{wxsocketbase}
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxSocketInputStream::wxSocketInputStream}
-
-\func{}{wxSocketInputStream}{\param{wxSocketBase\&}{ s}}
-
-Initializes a new read-only socket stream using the specified initialized
-socket connection.
-
-% -----------------------------------------------------------------------------
-% wxSocketOutputStream
-% -----------------------------------------------------------------------------
-\section{\class{wxSocketInputStream}}
-
-\wxheading{Derived from}
-
-\helpref{wxOutputStream}{wxoutputStream}
-
-\wxheading{See also}
-
-\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxSocketBase}{wxsocketbase}
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxSocketOutputStream::wxSocketOutputStream}
-
-\func{}{wxSocketInputStream}{\param{wxSocketBase\&}{ s}}
-
-Initializes a new write-only socket stream using the specified initialized
-socket connection.
-
--- /dev/null
+% -----------------------------------------------------------------------------
+% wxFileInputStream
+% -----------------------------------------------------------------------------
+\section{\class{wxFileInputStream}}\label{wxfileinputstream}
+
+\wxheading{Derived from}
+
+\helpref{wxInputStream}{wxinputstream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}
+
+% ----------
+% Members
+% ----------
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxFileInputStream::wxFileInputStream}
+
+\func{}{wxFileInputStream}{\param{const wxString\&}{ ifileName}}
+
+Opens the specified file using its \it{ifilename} name in read-only mode.
+
+\func{}{wxFileInputStream}{\param{wxFile\&}{ file}}
+
+Initializes a file stream in read-only mode using the file I/O object \it{file}.
+
+\func{}{wxFileInputStream}{\param{int}{ fd}}
+
+Initializes a file stream in read-only mode using the specified file descriptor.
+
+\membersection{wxFileInputStream::\destruct{wxFileInputStream}}
+
+\func{}{\destruct{wxFileInputStream}}{\void}
+
+Destructor.
+
+\membersection{wxFileInputStream::Ok}
+
+\constfunc{bool}{Ok}{\void}
+
+Returns TRUE if the stream is initialized and ready.
+
+% -----------------------------------------------------------------------------
+% wxFileOutputStream
+% -----------------------------------------------------------------------------
+\section{\class{wxFileOutputStream}}\label{wxfileoutputstream}
+
+\wxheading{Derived from}
+
+\helpref{wxOutputStream}{wxoutputstream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}
+
+% ----------
+% Members
+% ----------
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxFileOutputStream::wxFileOutputStream}
+
+\func{}{wxFileOutputStream}{\param{const wxString\&}{ ofileName}}
+
+Creates a new file with \it{ofilename} name and initializes the stream in
+write-only mode.
+
+\func{}{wxFileOutputStream}{\param{wxFile&}{ file}}
+
+Initializes a file stream in write-only mode using the file I/O object \it{file}.
+
+\func{}{wxFileOutputStream}{\param{int}{ fd}}
+
+Initializes a file stream in write-only mode using the file descriptor \it{fd}.
+
+\membersection{wxFileOutputStream::\destruct{wxFileOutputStream}}
+
+\func{}{\destruct{wxFileOutputStream}}{\void}
+
+Destructor.
+
+\membersection{wxFileOutputStream::Ok}
+
+\constfunc{bool}{Ok}{\void}
+
+Returns TRUE if the stream is initialized and ready.
+
+% -----------------------------------------------------------------------------
+% wxFileStream
+% -----------------------------------------------------------------------------
+\section{\class{wxFileStream}}
+
+\wxheading{Derived from}
+
+\helpref{wxFileOutputStream}{wxFileOutputStream}, \helpref{wxFileInputStream}{wxfileinputstream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxFileStream::wxFileStream}
+
+\func{}{wxFileStream}{\param{const wxString\&}{ iofileName}}
+
+Initializes a new file stream in read-write mode using the specified
+\it{iofilename} name.
+
--- /dev/null
+% -----------------------------------------------------------------------------
+% wxSocketInputStream
+% -----------------------------------------------------------------------------
+\section{\class{wxSocketInputStream}}
+
+\wxheading{Derived from}
+
+\helpref{wxInputStream}{wxinputStream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxSocketBase}{wxsocketbase}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxSocketInputStream::wxSocketInputStream}
+
+\func{}{wxSocketInputStream}{\param{wxSocketBase\&}{ s}}
+
+Initializes a new read-only socket stream using the specified initialized
+socket connection.
+
+% -----------------------------------------------------------------------------
+% wxSocketOutputStream
+% -----------------------------------------------------------------------------
+\section{\class{wxSocketInputStream}}
+
+\wxheading{Derived from}
+
+\helpref{wxOutputStream}{wxoutputStream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxSocketBase}{wxsocketbase}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxSocketOutputStream::wxSocketOutputStream}
+
+\func{}{wxSocketInputStream}{\param{wxSocketBase\&}{ s}}
+
+Initializes a new write-only socket stream using the specified initialized
+socket connection.
+
--- /dev/null
+% -----------------------------------------------------------------------------
+% wxZlibInputStream
+% -----------------------------------------------------------------------------
+\section{\class{wxZlibInputStream}}
+
+\wxheading{Derived from}
+
+\helpref{wxFilterInputStream}{wxfilterinputstream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxInputStream}{wxinputstream}
+
+\wxheading{Short description}
+
+This stream uncompresses all data read from it. It uses the ``filtered''
+stream to get new compressed data.
+
+% -----------------------------------------------------------------------------
+% wxZlibOutputStream
+% -----------------------------------------------------------------------------
+\section{\class{wxZlibOutputStream}}
+
+\wxheading{Derived from}
+
+\helpref{wxFilterOutputStream}{wxfilteroutputstream}
+
+\wxheading{See also}
+
+\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxOutputStream}{wxoutputstream}
+
+\wxheading{Short description}
+
+This stream compresses all data written to it and passed the compressed data
+to the ``filtered'' stream.
+
Classes: \helpref{wxConfig}{wxconfigbase}
-This overview briefly describes what the config classes are and what are the
+This overview briefly describes what the config classes are and what they are
for. All the details about how to use them may be found in the description of
the \helpref{wxConfigBase}{wxconfigbase} class and the documentation of the
file, registry and INI file based implementations mentions all the
binary data, for example.
\item{2.} Small. For instance, it is not recommended to use the Windows
registry for amounts of data more than a couple of kilobytes.
-\item{3.} Not performance critical, neither from speed nor from memory
+\item{3.} Not performance critical, neither from speed nor from a memory
consumption point of view.
\end{itemize}
-On the other hand, the provided features make them very useful for storing all
-kind of small to medioum volumes of hierarchically organized heterogenous
+On the other hand, the features provided make them very useful for storing all
+kinds of small to medium volumes of hierarchically-organized, heterogenous
data. In short, this is a place where you can conveniently stuff all your data
(numbers and strings) organizing it in a tree where you use the
filesystem-like paths to specify the location of a piece of data. In
configuration files. Other (future) implementations of wxConfigBase might also
understand GTK ressource files or their analogues on the KDE side.
-In any case, each implementation of wxConfigBase does its best (although due
+In any case, each implementation of wxConfigBase does its best to
+make the data look the same way everywhere. Due
to the limitations of the underlying physical storage as in the case of
-wxIniConfigs it may not implement 100\% of the base class functionality) to
-make the data look the same way everywhere. So you have the groups of entries
-and the entries themselves. Each entry contains either a string or a number
-(or a boolean value... support for other types of data such as dates or
+wxIniConfig, it may not implement 100\% of the base class functionality.
+
+There are groups of entries and the entries themselves. Each entry contains either a string or a number
+(or a boolean value; support for other types of data such as dates or
timestamps is planned) and is identified by the full path to it: something
like /MyApp/UserPreferences/Colors/Foreground. The previous elements in the
-path are the group names, each name may contain an arbitrary number of entries
+path are the group names, and each name may contain an arbitrary number of entries
and subgroups. The path components are {\bf always} separated with a slash,
-even though some implementations use the backslash internally. The further
-details (including how to read/write these entries) may be found in
-\helpref{wxConfigBase}{wxconfigbase} documentation.
+even though some implementations use the backslash internally. Further
+details (including how to read/write these entries) may be found in
+the documentation for \helpref{wxConfigBase}{wxconfigbase}.
line basis. It also understands the differences in line termination characters
under different platforms and will not do anything bad to files with "non
native" line termination sequences - in fact, it can be also used to modify the
-text files and chaneg the line termination characters from one type (say DOS) to
+text files and change the line termination characters from one type (say DOS) to
another (say Unix).
One word of warning: the class is not at all optimized for big files and so it
in the constructor), reads its contents in memory and closes it. If all of these
operations are successful, Open() will return TRUE and FALSE on error.
\item Work with the lines in the file: this may be done either with "direct
-access" functions like \helpref{GetLineCount}{wxtextfilegetlinecount} and
+access" functions like \helpref{GetLineCount}{wxtextfilegetlinecount} and
\helpref{GetLine}{wxtextfilegetline} ({\it operator[]} does exactly the same
but looks more like array addressing) or with "sequential access" functions
which include \helpref{GetFirstLine}{wxtextfilegetfirstline}/
\item Add/remove lines to the file: \helpref{AddLine}{wxtextfileaddline} and
\helpref{InsertLine}{wxtextfileinsertline} add new lines while
\helpref{RemoveLine}{wxtextfileremoveline} deletes the existing ones.
-\item Save your changes: notice that the changes you do to the file will {\bf
-not} be saved automatically, calling \helpref{Close}{wxtextfileclose} or doing
-nothing discards them! To save the chanegs you must explicitly call
+\item Save your changes: notice that the changes you make to the file will {\bf
+not} be saved automatically; calling \helpref{Close}{wxtextfileclose} or doing
+nothing discards them! To save the changes you must explicitly call
\helpref{Write}{wxtextfilewrite} - here, you may also change the line
termination type if you wish.
\end{itemize}
\constfunc{void}{GoToLine}{\param{size\_t }{n}}
Changes the value returned by \helpref{GetCurrentLine}{wxtextfilegetcurrentline}
-and used by \helpref{GetFirstLine()}{wxtextfilegetfirstline}()/\helpref{GetNextLine()}{wxtextfilegetnextline}.
+and used by \helpref{GetFirstLine()}{wxtextfilegetfirstline}/\helpref{GetNextLine()}{wxtextfilegetnextline}.
\membersection{wxTextFile::Eof}\label{wxtextfileeof}
\constfunc{void}{RemoveLine}{\param{size\_t }{n}}
-Delete one line from the file.
+Delete line number {\it n} from the file.
\membersection{wxTextFile::Write}\label{wxtextfilewrite}
\constfunc{bool}{Write}{\param{wxTextFileType }{typeNew = wxTextFileType\_None}}
-Change the file on disk. The {\it typeNew} parameter allows to change the
+Change the file on disk. The {\it typeNew} parameter allows you to change the
file format (default argument means "don't change type") and may be used to
convert, for example, DOS files to Unix.
\section{\class{wxThread}}\label{wxthread}
A thread is basically a path of execution through a program. Threads are also
-sometimes calls {\it light-wight processes}, but the fundamental difference
+sometimes called {\it light-weight processes}, but the fundamental difference
between threads and processes is that memory spaces of different processes are
separated while all threads share the same address space. While it makes it
much easier to share common data between several threads, it also makes much
-easier to shoot oneself in a leg, so careful use of synchronization objects
+easier to shoot oneself in the foot, so careful use of synchronization objects
such as \helpref{mutexes}{wxmutex} and/or \helpref{critical sections}{wxcriticalsection} is recommended.
\wxheading{Derived from}
\wxheading{Event table macros}
-To process a menu event, use these event handler macros to direct input to member
+To process an update event, use these event handler macros to direct input to member
functions that take a wxUpdateUIEvent argument.
\twocolwidtha{7cm}
object, such as \helpref{wxUpdateUIEvent::Check}{wxupdateuieventcheck}. wxWindows
will determine whether such a call has been made, and which UI element to update.
+These events will work for popup menus as well as menubars. Just before a menu is popped
+up, \helpref{wxMenu::UpdateUI}{wxmenuupdateui} is called to process any UI events for
+the window that owns the menu.
+
\wxheading{See also}
\helpref{Event handling overview}{eventhandlingoverview}
\helpref{wxWindow::IsEnabled}{wxwindowisenabled}
-\membersection{wxWindow::FakePopupMenu}\label{wxwindowfakepopupmenu}
-
-\func{virtual bool}{FakePopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}}
-
-A replacement for wxWindow::PopupMenu for cases where the PopupMenu implementation
-does not work correctly, in particular on Motif platforms.
-
-\wxheading{Parameters}
-
-\docparam{menu}{Menu to pop up.}
-
-\docparam{x}{Required x position for the menu to appear.}
-
-\docparam{y}{Required y position for the menu to appear.}
-
-\wxheading{Remarks}
-
-This is a cut-down version of PopupMenu using a dialog and listbox; pull-right menus
-are not supported.
-
-\wxheading{See also}
-
-\helpref{wxMenu}{wxmenu}, \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}
-
\membersection{wxWindow::FindFocus}\label{wxwindowfindfocus}
\func{static wxWindow*}{FindFocus}{\void}
\wxheading{See also}
-\helpref{wxMenu}{wxmenu}, \helpref{wxWindow::FakePopupMenu}{wxwindowfakepopupmenu}
+\helpref{wxMenu}{wxmenu}
+
+\wxheading{Remarks}
+
+Just before the menu is popped up, \helpref{wxMenu::UpdateUI}{wxmenuupdateui} is called
+to ensure that the menu items are in the correct state.
\membersection{wxWindow::PushEventHandler}\label{wxwindowpusheventhandler}
// find a file in a list of directories, returns false if not found
WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile);
+// Get the OS directory if appropriate (such as the Windows directory).
+// On non-Windows platform, probably just return the empty string.
+WXDLLEXPORT wxString wxGetOSDirectory();
+
// ----------------------------------------------------------------------------
// classes
// ----------------------------------------------------------------------------
inline void SetClientData( void* clientData ) { m_clientData = clientData; }
inline void* GetClientData() const { return m_clientData; }
+ // Updates the UI for a menu and all submenus recursively.
+ // source is the object that has the update event handlers
+ // defined for it. If NULL, the menu or associated window
+ // will be used.
+ void UpdateUI(wxEvtHandler* source = (wxEvtHandler*) NULL);
+
// implementation
int FindMenuIdByMenuItem( GtkWidget *menuItem ) const;
inline void SetClientData( void* clientData ) { m_clientData = clientData; }
inline void* GetClientData() const { return m_clientData; }
+ // Updates the UI for a menu and all submenus recursively.
+ // source is the object that has the update event handlers
+ // defined for it. If NULL, the menu or associated window
+ // will be used.
+ void UpdateUI(wxEvtHandler* source = (wxEvtHandler*) NULL);
+
// implementation
int FindMenuIdByMenuItem( GtkWidget *menuItem ) const;
// Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL.
wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const;
+ // Updates the UI for a menu and all submenus recursively.
+ // source is the object that has the update event handlers
+ // defined for it. If NULL, the menu or associated window
+ // will be used.
+ void UpdateUI(wxEvtHandler* source = (wxEvtHandler*) NULL);
+
void ProcessCommand(wxCommandEvent& event);
inline void Callback(const wxFunction func) { m_callback = func; }
inline wxList& GetItems() const { return (wxList&) m_menuItems; }
+ void SetInvokingWindow(wxWindow *pWin) { m_pInvokingWindow = pWin; }
+ wxWindow *GetInvokingWindow() const { return m_pInvokingWindow; }
+
//// Motif-specific
inline WXWidget GetButtonWidget() const { return m_buttonWidget; }
inline void SetButtonWidget(WXWidget buttonWidget) { m_buttonWidget = buttonWidget; }
wxEvtHandler * m_parent;
wxEvtHandler * m_eventHandler;
void* m_clientData;
+ wxWindow* m_pInvokingWindow;
//// Motif-specific
int m_numColumns;
// Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL.
wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const;
+ // Updates the UI for a menu and all submenus recursively.
+ // source is the object that has the update event handlers
+ // defined for it. If NULL, the menu or associated window
+ // will be used.
+ void UpdateUI(wxEvtHandler* source = (wxEvtHandler*) NULL);
+
void ProcessCommand(wxCommandEvent& event);
inline void Callback(const wxFunction func) { m_callback = func; }
inline void SetClientData(void* clientData) { m_clientData = clientData; }
inline void* GetClientData() const { return m_clientData; }
+ void SetInvokingWindow(wxWindow *pWin) { m_pInvokingWindow = pWin; }
+ wxWindow *GetInvokingWindow() const { return m_pInvokingWindow; }
+
// item properties
// title
void SetTitle(const wxString& label);
void ProcessCommand(wxCommandEvent& event);
inline void Callback(const wxFunction func) { m_callback = func; }
+ // Updates the UI for a menu and all submenus recursively.
+ // source is the object that has the update event handlers
+ // defined for it. If NULL, the menu or associated window
+ // will be used.
+ void UpdateUI(wxEvtHandler* source = (wxEvtHandler*) NULL);
+
virtual void SetParent(wxEvtHandler *parent) { m_parent = parent; }
inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
inline wxEvtHandler *GetEventHandler() { return m_eventHandler; }
wxEvtHandler * m_parent;
wxEvtHandler * m_eventHandler;
void* m_clientData;
+ wxWindow* m_pInvokingWindow;
};
// ----------------------------------------------------------------------------
#if wxUSE_APPLE_IEEE
ConvertToIeeeExtended(d, (unsigned char *)buf);
#else
-# pragma warning "wxDataStream::WriteDouble() not using IeeeExtended - will not work!"
+# pragma warning "wxDataOutputStream::WriteDouble() not using IeeeExtended - will not work!"
buf[0] = '\0';
#endif
Write(buf, 10);
#endif
}
+// Get the OS directory if appropriate (such as the Windows directory).
+// On non-Windows platform, probably just return the empty string.
+wxString wxGetOSDirectory()
+{
+#ifdef __WINDOWS__
+ char buf[256];
+ GetWindowsDirectory(buf, 256);
+ return wxString(buf);
+#else
+ return wxEmptyString;
+#endif
+}
+
bool wxEndsWithPathSeparator(const char *pszFileName)
{
size_t len = Strlen(pszFileName);
return m_invokingWindow;
}
+// Update a menu and all submenus recursively.
+// source is the object that has the update event handlers
+// defined for it. If NULL, the menu or associated window
+// will be used.
+void wxMenu::UpdateUI(wxEvtHandler* source)
+{
+ if (!source && GetInvokingWindow())
+ source = GetInvokingWindow()->GetEventHandler();
+ if (!source)
+ source = GetEventHandler();
+ if (!source)
+ source = this;
+
+ wxNode* node = GetItems().First();
+ while (node)
+ {
+ wxMenuItem* item = (wxMenuItem*) node->Data();
+ if ( !item->IsSeparator() )
+ {
+ wxWindowID id = item->GetId();
+ wxUpdateUIEvent event(id);
+ event.SetEventObject( source );
+
+ if (source->ProcessEvent(event))
+ {
+ if (event.GetSetText())
+ SetLabel(id, event.GetText());
+ if (event.GetSetChecked())
+ Check(id, event.GetChecked());
+ if (event.GetSetEnabled())
+ Enable(id, event.GetEnabled());
+ }
+
+ if (item->GetSubMenu())
+ item->GetSubMenu()->UpdateUI(source);
+ }
+ node = node->Next();
+ }
+}
+
SetInvokingWindow( menu, this );
+ menu->UpdateUI();
+
gs_pop_x = x;
gs_pop_y = y;
return m_invokingWindow;
}
+// Update a menu and all submenus recursively.
+// source is the object that has the update event handlers
+// defined for it. If NULL, the menu or associated window
+// will be used.
+void wxMenu::UpdateUI(wxEvtHandler* source)
+{
+ if (!source && GetInvokingWindow())
+ source = GetInvokingWindow()->GetEventHandler();
+ if (!source)
+ source = GetEventHandler();
+ if (!source)
+ source = this;
+
+ wxNode* node = GetItems().First();
+ while (node)
+ {
+ wxMenuItem* item = (wxMenuItem*) node->Data();
+ if ( !item->IsSeparator() )
+ {
+ wxWindowID id = item->GetId();
+ wxUpdateUIEvent event(id);
+ event.SetEventObject( source );
+
+ if (source->ProcessEvent(event))
+ {
+ if (event.GetSetText())
+ SetLabel(id, event.GetText());
+ if (event.GetSetChecked())
+ Check(id, event.GetChecked());
+ if (event.GetSetEnabled())
+ Enable(id, event.GetEnabled());
+ }
+
+ if (item->GetSubMenu())
+ item->GetSubMenu()->UpdateUI(source);
+ }
+ node = node->Next();
+ }
+}
+
SetInvokingWindow( menu, this );
+ menu->UpdateUI();
+
gs_pop_x = x;
gs_pop_y = y;
m_eventHandler = this;
m_noItems = 0;
m_menuBar = NULL;
+ m_pInvokingWindow = NULL;
//// Motif-specific members
m_numColumns = 1;
{
processed = GetEventHandler()->ProcessEvent(event);
}
- /* TODO
// Try the window the menu was popped up from (and up
// through the hierarchy)
if ( !processed && GetInvokingWindow())
processed = GetInvokingWindow()->ProcessEvent(event);
- */
+}
+
+// Update a menu and all submenus recursively.
+// source is the object that has the update event handlers
+// defined for it. If NULL, the menu or associated window
+// will be used.
+void wxMenu::UpdateUI(wxEvtHandler* source)
+{
+ if (!source && GetInvokingWindow())
+ source = GetInvokingWindow()->GetEventHandler();
+ if (!source)
+ source = GetEventHandler();
+ if (!source)
+ source = this;
+
+ wxNode* node = GetItems().First();
+ while (node)
+ {
+ wxMenuItem* item = (wxMenuItem*) node->Data();
+ if ( !item->IsSeparator() )
+ {
+ wxWindowID id = item->GetId();
+ wxUpdateUIEvent event(id);
+ event.SetEventObject( source );
+
+ if (source->ProcessEvent(event))
+ {
+ if (event.GetSetText())
+ SetLabel(id, event.GetText());
+ if (event.GetSetChecked())
+ Check(id, event.GetChecked());
+ if (event.GetSetEnabled())
+ Enable(id, event.GetEnabled());
+ }
+
+ if (item->GetSubMenu())
+ item->GetSubMenu()->UpdateUI(source);
+ }
+ node = node->Next();
+ }
}
bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
menu->SetId(1); /* Mark as popped-up */
menu->CreateMenu(NULL, widget, menu);
+ menu->SetInvokingWindow(this);
+
+ menu->UpdateUI();
+
// menu->SetParent(parent);
// parent->children->Append(menu); // Store menu for later deletion
bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
{
menu->SetInvokingWindow(this);
+ menu->UpdateUI();
HWND hWnd = (HWND) GetHWND();
HMENU hMenu = (HMENU)menu->m_hMenu;
return 0;
}
+// Update a menu and all submenus recursively.
+// source is the object that has the update event handlers
+// defined for it. If NULL, the menu or associated window
+// will be used.
+void wxMenu::UpdateUI(wxEvtHandler* source)
+{
+ if (!source && GetInvokingWindow())
+ source = GetInvokingWindow()->GetEventHandler();
+ if (!source)
+ source = GetEventHandler();
+ if (!source)
+ source = this;
+
+ wxNode* node = GetItems().First();
+ while (node)
+ {
+ wxMenuItem* item = (wxMenuItem*) node->Data();
+ if ( !item->IsSeparator() )
+ {
+ wxWindowID id = item->GetId();
+ wxUpdateUIEvent event(id);
+ event.SetEventObject( source );
+
+ if (source->ProcessEvent(event))
+ {
+ if (event.GetSetText())
+ SetLabel(id, event.GetText());
+ if (event.GetSetChecked())
+ Check(id, event.GetChecked());
+ if (event.GetSetEnabled())
+ Enable(id, event.GetEnabled());
+ }
+
+ if (item->GetSubMenu())
+ item->GetSubMenu()->UpdateUI(source);
+ }
+ node = node->Next();
+ }
+}
#include <stdarg.h>
//// BEGIN for console support: VC++ only
+#ifdef __VISUALC__
#include "wx/msw/msvcrt.h"
# define new new(__FILE__,__LINE__)
# endif
+#endif
+ // __VISUALC__
/// END for console support
// In the WIN.INI file
*/
}
+// Update a menu and all submenus recursively.
+// source is the object that has the update event handlers
+// defined for it. If NULL, the menu or associated window
+// will be used.
+void wxMenu::UpdateUI(wxEvtHandler* source)
+{
+ if (!source && GetInvokingWindow())
+ source = GetInvokingWindow()->GetEventHandler();
+ if (!source)
+ source = GetEventHandler();
+ if (!source)
+ source = this;
+
+ wxNode* node = GetItems().First();
+ while (node)
+ {
+ wxMenuItem* item = (wxMenuItem*) node->Data();
+ if ( !item->IsSeparator() )
+ {
+ wxWindowID id = item->GetId();
+ wxUpdateUIEvent event(id);
+ event.SetEventObject( source );
+
+ if (source->ProcessEvent(event))
+ {
+ if (event.GetSetText())
+ SetLabel(id, event.GetText());
+ if (event.GetSetChecked())
+ Check(id, event.GetChecked());
+ if (event.GetSetEnabled())
+ Enable(id, event.GetEnabled());
+ }
+
+ if (item->GetSubMenu())
+ item->GetSubMenu()->UpdateUI(source);
+ }
+ node = node->Next();
+ }
+}
+
bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
{
+ menu->SetInvokingWindow(this);
+ menu->UpdateUI();
+
// TODO
return FALSE;
}
#include <strstream>
#endif
-#ifdef __WXMSW__
-#include <windows.h>
-#endif
-
#ifdef __WXMSW__
#include "wx/help.h"
#endif
bool wxResourceManager::Initialize()
{
// Set up the resource filename for each platform.
+ // TODO: This shold be replaced by wxConfig usage.
#ifdef __WXMSW__
// dialoged.ini in the Windows directory
- char buf[256];
- GetWindowsDirectory(buf, 256);
- strcat(buf, "\\dialoged.ini");
- m_optionsResourceFilename = buf;
+ wxString windowsDir = wxGetOSDirectory();
+ windowsDir += "\\dialoged.ini" ;
+
+ m_optionsResourceFilename = windowsDir;
#elif defined(__WXGTK__) || defined(__WXMOTIF__)
wxGetHomeDir( &m_optionsResourceFilename );
m_optionsResourceFilename += "/.dialogedrc";
#include <wx/metafile.h>
-#ifndef __WXMSW__
+#ifndef GetRValue
#define GetRValue(rgb) ((unsigned char)(rgb))
#define GetGValue(rgb) ((unsigned char)(((int)(rgb)) >> 8))
#define GetBValue(rgb) ((unsigned char)((rgb)>>16))
/* Metafile Functions */
/* Win32s/Borland need these macros, although META_SETBKCOLOR is defined */
-#if !defined(META_SETBKCOLOR) || defined(WIN32)
+#if !defined(META_SETBKCOLOR) // || defined(WIN32)
#define META_SETBKCOLOR 0x0201
#define META_SETBKMODE 0x0102
/* PitchAndFamily family values (high 4 bits) */
/* Win32s/Borland don't need this */
-#if !defined(__BORLANDC__) && !defined(WIN32)
+#ifndef FF_DONTCARE // !defined(__BORLANDC__) && !defined(WIN32)
#define FF_DONTCARE 0x00
#define FF_ROMAN 0x10
#define FF_SWISS 0x20