]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxMenu::UpdateUI to wxMSW, wxGTK, wxMotif, wxStubs; rearranged/debugged
authorJulian Smart <julian@anthemion.co.uk>
Sat, 6 Feb 1999 13:32:46 +0000 (13:32 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 6 Feb 1999 13:32:46 +0000 (13:32 +0000)
docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

34 files changed:
docs/latex/wx/category.tex
docs/latex/wx/classes.tex
docs/latex/wx/datstrm.tex
docs/latex/wx/fltinstr.tex
docs/latex/wx/fltoutst.tex
docs/latex/wx/function.tex
docs/latex/wx/menu.tex
docs/latex/wx/strmext.tex [deleted file]
docs/latex/wx/strmfile.tex [new file with mode: 0644]
docs/latex/wx/strmsock.tex [new file with mode: 0644]
docs/latex/wx/strmzlib.tex [new file with mode: 0644]
docs/latex/wx/tconfig.tex
docs/latex/wx/textfile.tex
docs/latex/wx/thread.tex
docs/latex/wx/upduievt.tex
docs/latex/wx/window.tex
include/wx/filefn.h
include/wx/gtk/menu.h
include/wx/gtk1/menu.h
include/wx/motif/menu.h
include/wx/msw/menu.h
include/wx/stubs/menu.h
src/common/datstrm.cpp
src/common/filefn.cpp
src/gtk/menu.cpp
src/gtk/window.cpp
src/gtk1/menu.cpp
src/gtk1/window.cpp
src/motif/menu.cpp
src/msw/menu.cpp
src/msw/utils.cpp
src/stubs/menu.cpp
utils/dialoged/src/reseditr.cpp
utils/ogl/src/mfutils.h

index 9a113c27287bbeba21ea3b986bb5e81356e42460..6f608b347754d573421bfbfe712e3d6dd007bbeb 100644 (file)
@@ -358,6 +358,28 @@ overview}{wxfileoverview} for more details.
 \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
index b9f91ca60bff29a4c8976683430383723fa400c2..122ab151f610f34b535fc1f3c0357e4a3124b135 100644 (file)
@@ -60,8 +60,8 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \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
@@ -89,6 +89,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input fildrptg.tex
 \input filehist.tex
 \input filetype.tex
+\input strmfile.tex
 \input fltinstr.tex
 \input fltoutst.tex
 \input focusevt.tex
@@ -178,6 +179,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input slider.tex
 \input sckaddr.tex
 \input socket.tex
+\input strmsock.tex
 \input spinbutt.tex
 \input splitter.tex
 \input statbmp.tex
@@ -186,9 +188,8 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \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
@@ -220,7 +221,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input wave.tex
 \input window.tex
 \input windowdc.tex
-
+\input strmzlib.tex
 \input function.tex
 \input keycode.tex
 
index 637ee3ae0b208241bc9b1dd292df7e5d9c85b42a..3c0481935d58118665a7f471962a0d22a09113f7 100644 (file)
-\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: 
index df80a2cdfffcceff5570ef8d1a3363b1d5343584..954e025cc5ed5be4a44b2b4907631ecdc8082df5 100644 (file)
@@ -5,7 +5,8 @@
 
 \wxheading{Derived from}
 
-\helpref{wxInputStream}{wxinputstream}
+\helpref{wxInputStream}{wxinputstream}\\
+\helpref{wxStreamBase}{wxstreambase}
 
 \wxheading{Note}
 
index 48662e16de2611537de2709a36d42b3218169fb0..bb126f619e3c600fa73484057dc4053ef9c9819d 100644 (file)
@@ -5,7 +5,8 @@
 
 \wxheading{Derived from}
 
-\helpref{wxOutputStream}{wxoutputstream}
+\helpref{wxOutputStream}{wxoutputstream}\\
+\helpref{wxStreamBase}{wxstreambase}
 
 \wxheading{Note}
 
index f9487cdb4dd0a9c5466a50513dcb47f916a59fd2..e7befa3eb60e73cf1a6bad859f8823c7f41287be 100644 (file)
@@ -66,6 +66,12 @@ For example:
 
 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}}
index 29304cf79f55037208c439d6f81308ba822edb71..203e6277c0f5a32b0e48a9a8a97bf225fdaec919 100644 (file)
@@ -330,6 +330,18 @@ This is relevant only to popup menus.
 
 \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.
diff --git a/docs/latex/wx/strmext.tex b/docs/latex/wx/strmext.tex
deleted file mode 100644 (file)
index c793d4b..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-% -----------------------------------------------------------------------------
-% 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.
-
diff --git a/docs/latex/wx/strmfile.tex b/docs/latex/wx/strmfile.tex
new file mode 100644 (file)
index 0000000..e19a2c9
--- /dev/null
@@ -0,0 +1,111 @@
+% -----------------------------------------------------------------------------
+% 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.
+
diff --git a/docs/latex/wx/strmsock.tex b/docs/latex/wx/strmsock.tex
new file mode 100644 (file)
index 0000000..08a6e81
--- /dev/null
@@ -0,0 +1,44 @@
+% -----------------------------------------------------------------------------
+% 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.
+
diff --git a/docs/latex/wx/strmzlib.tex b/docs/latex/wx/strmzlib.tex
new file mode 100644 (file)
index 0000000..1bfbf12
--- /dev/null
@@ -0,0 +1,36 @@
+% -----------------------------------------------------------------------------
+% 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.
+
index 8b6a4b1628803ed31f8b357fcc3eb849f5b0e5eb..42c046ca35cf622bccf7ea0c9668589fb3a3ac17 100644 (file)
@@ -2,7 +2,7 @@
 
 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
@@ -17,12 +17,12 @@ means that this information should be:
 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 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
@@ -33,17 +33,18 @@ differences between the Windows registry and the standard Unix text format
 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}.
 
index a6ca12687f2dd417ecf2765e1220fdaf50c94139..0ffa822a364d59d02d3fea4696f239f3c16583c1 100644 (file)
@@ -4,7 +4,7 @@ The wxTextFile is a simple class which allows to work with text files on line by
 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
@@ -22,7 +22,7 @@ function which opens the file (name may be specified either as Open argument or
 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}/
@@ -34,9 +34,9 @@ changed with \helpref{GoToLine}{wxtextfilegotoline}.
 \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}
@@ -145,7 +145,7 @@ GoToLine().
 \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}
 
@@ -223,13 +223,13 @@ Insert a line before the line number {\it n}.
 
 \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.
 
index fa1716ff4d5301e9a660b7785a6163f67230dc6b..742473d5dafaf863e059e2625be192e52a9ca6bc 100644 (file)
@@ -1,11 +1,11 @@
 \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}
index 2423083c1d734f644156802b09a440a26cdad628..c7f13a2734ff983d29b61c1ba0c583445652266b 100644 (file)
@@ -10,7 +10,7 @@ to give an application the chance to update various user interface elements.
 
 \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}
@@ -36,6 +36,10 @@ Instead of directly manipulating the menu or button, you call functions in the e
 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}
index c5421a8edb7cef73c93c1c7efec9ee61e92a569d..047981dd63cbcc3d4380a4d38248dfa631e7aa0f 100644 (file)
@@ -298,30 +298,6 @@ Enable or disable the window for user input.
 
 \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}
@@ -1409,7 +1385,12 @@ the commandInt member of the event to check the selected menu identifier.
 
 \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}
 
index 1067e88f5eeb56369ee28b702497fc33e0edc5b0..8ed4d7ffbe02e3dbec2c302b8288601dd174af9d 100644 (file)
@@ -197,6 +197,10 @@ WXDLLEXPORT void wxSplitPath(const char *pszFileName,
 // 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
 // ----------------------------------------------------------------------------
index 18844219c92eb6a0793b9bc1a1b479de570edd94..347acf3340bf89d1550fb3fe0246337b8cf93369 100644 (file)
@@ -128,6 +128,12 @@ public:
   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;
index 18844219c92eb6a0793b9bc1a1b479de570edd94..347acf3340bf89d1550fb3fe0246337b8cf93369 100644 (file)
@@ -128,6 +128,12 @@ public:
   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;
index d29ae23ac40278bcb066f7b2ba49c425df6a74b8..1ed3a0da6b4d9f5c00e153b80da2cf71246c7133 100644 (file)
@@ -85,6 +85,12 @@ public:
     // 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; }
 
@@ -94,6 +100,9 @@ public:
 
   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; }
@@ -136,6 +145,7 @@ public:
   wxEvtHandler *    m_parent;
   wxEvtHandler *    m_eventHandler;
   void*             m_clientData;
+  wxWindow*         m_pInvokingWindow;
 
   //// Motif-specific
   int               m_numColumns;
index 6ca343d1afef8dab7996889cc05cc8fe5eaa9acf..7c40f1ab0e8f43fc0fc87e39d84fd704d0218f69 100644 (file)
@@ -83,6 +83,12 @@ public:
     // 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; }
 
index fa3936557c40c6be7ff93edbe361af94f7482de5..db15f8fc708a0abd66ef8b56b513a4bb62fead92 100644 (file)
@@ -66,6 +66,9 @@ public:
   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);
@@ -86,6 +89,12 @@ public:
   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; }
@@ -102,6 +111,7 @@ public:
   wxEvtHandler *    m_parent;
   wxEvtHandler *    m_eventHandler;
   void*             m_clientData;
+  wxWindow*         m_pInvokingWindow;
 };
 
 // ----------------------------------------------------------------------------
index d455a6dc4ea4182a2772a0536a775aec3f3a6434..b9ad7564f98a8dd8d10a468d5674b47f1be2409c 100644 (file)
@@ -195,7 +195,7 @@ void wxDataOutputStream::WriteDouble(double d)
 #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);
index 8207942f5e321bfa296b80cfd629c13846b8ccd3..59a9cd78f097a0bc4ef0072d88a8803cda6a735b 100644 (file)
@@ -1451,6 +1451,19 @@ bool wxSetWorkingDirectory(const wxString& d)
 #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);
index faa9236de76a6e8090038432db1e3339fae488fc..7f42dd5e946786113d9e085107572b8996ddee49 100644 (file)
@@ -642,4 +642,44 @@ wxWindow *wxMenu::GetInvokingWindow()
     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();
+  }
+}
+
 
index ac31501f9b192c24df14ca48a3efa478b6fa7c53..3bb8f1cea5eead1a98ff73ed84170f6cf92d6d21 100644 (file)
@@ -2727,6 +2727,8 @@ bool wxWindow::PopupMenu( wxMenu *menu, int x, int y )
 
     SetInvokingWindow( menu, this );
 
+    menu->UpdateUI();
+
     gs_pop_x = x;
     gs_pop_y = y;
 
index faa9236de76a6e8090038432db1e3339fae488fc..7f42dd5e946786113d9e085107572b8996ddee49 100644 (file)
@@ -642,4 +642,44 @@ wxWindow *wxMenu::GetInvokingWindow()
     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();
+  }
+}
+
 
index ac31501f9b192c24df14ca48a3efa478b6fa7c53..3bb8f1cea5eead1a98ff73ed84170f6cf92d6d21 100644 (file)
@@ -2727,6 +2727,8 @@ bool wxWindow::PopupMenu( wxMenu *menu, int x, int y )
 
     SetInvokingWindow( menu, this );
 
+    menu->UpdateUI();
+
     gs_pop_x = x;
     gs_pop_y = y;
 
index 2ee35df7c290228a7316c86f98b1645fc5a05194..959d442bb99df1b98f2235fff2ad1507ead84f0b 100644 (file)
@@ -65,6 +65,7 @@ wxMenu::wxMenu(const wxString& title, const wxFunction func)
     m_eventHandler = this;
     m_noItems = 0;
     m_menuBar = NULL;
+    m_pInvokingWindow = NULL;
     
     //// Motif-specific members
     m_numColumns = 1;
@@ -379,12 +380,50 @@ void wxMenu::ProcessCommand(wxCommandEvent & event)
     {
         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)
@@ -409,6 +448,10 @@ 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
     
index 2278e11d3f45c0b34362b7f23374296b8df1c6d2..670372224f4b50ef241b7786d0fb989ec9bce41c 100644 (file)
@@ -519,6 +519,7 @@ extern wxMenu *wxCurrentPopupMenu;
 bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
 {
   menu->SetInvokingWindow(this);
+  menu->UpdateUI();
 
   HWND hWnd = (HWND) GetHWND();
   HMENU hMenu = (HMENU)menu->m_hMenu;
@@ -945,3 +946,42 @@ WXHMENU wxMenu::GetHMenu() const
   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();
+  }
+}
index 6d51207e7c92e4884a76dac065d0825d98b99c91..0664c058379be3f9875dd5e258ce0750e2a5622f 100644 (file)
@@ -75,6 +75,7 @@
 #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
index 1fc7c4a22941326f98c5bf900b6c9a354c2200d9..5880beab530c0a58cd6881c075a15719b1d56a40 100644 (file)
@@ -303,8 +303,51 @@ void wxMenu::ProcessCommand(wxCommandEvent & 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->SetInvokingWindow(this);
+    menu->UpdateUI();
+
     // TODO
     return FALSE;
 }
index a6a17293a530c31b0ae5dd3d6116f07330daa68c..34a5dd365c693f0b723df98322cbc073fd6f420f 100644 (file)
 #include <strstream>
 #endif
 
-#ifdef __WXMSW__
-#include <windows.h>
-#endif
-
 #ifdef __WXMSW__
 #include "wx/help.h"
 #endif
@@ -152,12 +148,13 @@ wxResourceManager::~wxResourceManager()
 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";
index e4b1c2c4fe9bfbc676436c590bcef470d157cc68..e5fe51fc2d93d32e16eaa7f23fc3750d8f87155b 100644 (file)
@@ -19,7 +19,7 @@
 
 #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))
@@ -27,7 +27,7 @@
 
 /* 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