This macro declares a new object array class named {\it name} and containing
the elements of type {\it T}. Example:
+
\begin{verbatim}
class MyClass;
WX_DEFINE_OBJARRAY(MyClass, wxArrayOfMyClass); // note: not "MyClass *"!
\end{verbatim}
+
You must use \helpref{WX\_DEFINE\_OBJARRAY()}{wxdefineobjarray} macro to define
the array class - otherwise you would get link errors.
It can not be used with wxObjArrays - but they will delete their elements anyhow
when you call Empty().
-\membersection{Default constructors}\label{wxarrayctor}
+\membersection{Default constructors}\label{wxarrayctordef}
\func{}{wxArray}{}
should return a negative, zero or positive value according to whether the first
element passed to it is less than, equal to or greater than the second one.
-\membersection{wxArray copy constructor and assignemnt operator}\label{wxarrayctorcopy}
+\membersection{wxArray copy constructor and assignment operator}\label{wxarrayctorcopy}
\func{}{wxArray}{\param{const wxArray\& }{array}}
\input text.tex
\input textdlg.tex
\input valtext.tex
-\input tempfile.tex
-\input textfile.tex
+% \input tempfile.tex
+% \input textfile.tex
\input thread.tex
\input time.tex
\input timer.tex
\input function.tex
\input keycode.tex
-
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "referenc"
-%%% End:
\wxheading{Constants}
wx/file.h defines the following constants:
+
{\small
\begin{verbatim}
#define wxS_IRUSR 00400
\helpref{wxFile::Create}{wxfilecreate} and \helpref{wxFile::Open}{wxfileopen}.
The {\it OpenMode} enumeration defines the different modes for opening a file,
-it's defined inside wxFile class so its members should be specified with {\it
-wxFile::} scope resolution prefix. It is also used with
-\helpref{wxFile::Access}{wxfileaccess} function.
+it's defined inside wxFile class so its members should be specified with {\it wxFile::} scope
+resolution prefix. It is also used with \helpref{wxFile::Access}{wxfileaccess} function.
-\twocolwidtha{7cm}%
-\begin{twocollist}\itemsep=0pt
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt%
\twocolitem{{\bf wxFile::read}}{Open file for reading or test if it can be opened for reading with Access()}
\twocolitem{{\bf wxFile::write}}{Open file for writing deleting the contents of the file if it already exists
or test if it can be opened for writing with Access()}
mode constants used with \helpref{Seek()}{wxfileseek}:
\twocolwidtha{7cm}
-\begin{twocollist}\itemsep=0pt
+\begin{twocollist}\itemsep=0pt%
\twocolitem{{\bf wxFromStart}}{Count offset from the start of the file}
\twocolitem{{\bf wxFromCurrent}}{Count offset from the current position of the file pointer}
\twocolitem{{\bf wxFromEnd}}{Count offset from the end of the file (backwards)}
NB: it is not virtual so you should {\it not} derive from wxFile!
\membersection{wxFile::Access}\label{wxfileaccess}
-\func{static bool}{Access}{\param{const char *}{ name}, \param{OpenMode}{ mode}
+
+\func{static bool}{Access}{\param{const char *}{ name}, \param{OpenMode}{ mode}}
This function verifies if we may access the given file in specified mode. Only
values of wxFile::read or wxFile::write really make sense here.
\membersection{wxFile::Attach}\label{wxfileattach}
+
\func{void}{Attach}{\param{int}{ fd}}
Attaches an existing file descriptor to the wxFile object. Example of predefined
will ensure it is overwritten.
\membersection{wxFile::Detach}\label{wxfiledetach}
+
\func{void}{Detach}{\void}
Get back a file descriptor from wxFile object - the caller is responsible for closing the file if this
descriptor is opened. \helpref{IsOpened()}{wxfileisopened} will return FALSE after call to Detach().
\membersection{wxFile::fd}\label{wxfilefd}
+
\constfunc{int}{fd}{\void}
Returns the file descriptor associated with the file.
TRUE if the operation was successful.
\membersection{wxFile::Write}\label{wxfilewrites}
+
\func{bool}{Write}{\param{const wxString& }{s}}
-Writes the contents of the string to the file, returns TRUE on success
+Writes the contents of the string to the file, returns TRUE on success.
+
\latexignore{\rtfignore{\wxheading{Members}}}
-\membersection{MessageParameters class}{wxfiletypemessageparameters}
+\membersection{MessageParameters class}\label{wxfiletypemessageparameters}
One of the most common usages of MIME is to encode an e-mail message. The MIME
type of the encoded message is an example of a {\it message parameter}. These
\membersection{wxFTP::SendCommand}
-\func{bool}{SendCommand}{\param{const wxString\&}{command}, \param{char }{ret}}
+\func{bool}{SendCommand}{\param{const wxString\&}{ command}, \param{char }{ret}}
Send the specified \it{command} to the FTP server. \it{ret} specifies
the expected result.
\membersection{wxFTP::ChDir}
-\func{bool}{ChDir}{\param{const wxString\&}{dir}}
+\func{bool}{ChDir}{\param{const wxString\&}{ dir}}
Change the current FTP working directory.
Returns TRUE, if successful.
\membersection{wxFTP::MkDir}
-\func{bool}{MkDir}{\param{const wxString\&}{dir}}
+\func{bool}{MkDir}{\param{const wxString\&}{ dir}}
Create the specified directory in the current FTP working directory.
Returns TRUE, if successful.
\membersection{wxFTP::RmDir}
-\func{bool}{RmDir}{\param{const wxString\&}{dir}}
+\func{bool}{RmDir}{\param{const wxString\&}{ dir}}
Remove the specified directory from the current FTP working directory.
Returns TRUE, if successful.
\membersection{wxFTP::Rename}
-\func{bool}{Rename}{\param{const wxString\&}{src}, \param{const wxString\&}{dst}}
+\func{bool}{Rename}{\param{const wxString\&}{ src}, \param{const wxString\&}{ dst}}
Rename the specified \it{src} element into \it{dst}
Returns TRUE, if successful.
\membersection{wxFTP::RmFile}
-\func{bool}{RmFile}{\param{const wxString\&}{path}}
+\func{bool}{RmFile}{\param{const wxString\&}{ path}}
Delete the file specified by \it{path}.
Returns TRUE, if successful.
\membersection{wxFTP::GetOutputStream}
-\func{wxOutputStream *}{GetOutputStream}{\param{const wxString\&}{file}}
+\func{wxOutputStream *}{GetOutputStream}{\param{const wxString\&}{ file}}
Initializes an output stream to the specified \it{file}. The returned
-stream has all but seek functionality of wxStreams. When the user finishes
+stream has all but the seek functionality of wxStreams. When the user finishes
writing data, he has to delete the stream to close it.
\wxheading{Return value}
An initialized write-only stream.
+
\docparam{type}{May be one of the following:
-\twocolwidtha{5cm}
+\twocolwidtha{5cm}%
\begin{twocollist}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_PNG}}}{Load a PNG bitmap file.}
\docparam{type}{One of the following values:
-\twocolwidtha{5cm}
+\twocolwidtha{5cm}%
\begin{twocollist}
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows image file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Load a PNG image file.}
\docparam{type}{Currently only one type can be used:
-\twocolwidtha{5cm}
+\twocolwidtha{5cm}%
\begin{twocollist}
\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Save a PNG image file.}
\end{twocollist}
\docparam{name}{Handler type.}
-
Clears the list (but does not delete the client data stored with each node).
-\membersection{wxList::DeleteContents}
+\membersection{wxList::DeleteContents}\label{wxlistdeletecontents}
\func{void}{DeleteContents}{\param{bool}{ destroy}}
\membersection{wxProtocol::Abort}\label{wxprotoabort}
-\func{bool }{Abort}{\void}
+\func{bool}{Abort}{\void}
Abort the current stream.
+
\it{WARNING: It is advised to destroy the input stream instead of aborting the stream this way.}
\wxheading{Return value}
\membersection{wxProtocol::GetError}
-\func{wxProtocolError }{GetError}{\void}
+\func{wxProtocolError}{GetError}{\void}
Returns the last occured error.
\membersection{wxProtocol::GetContentType}
-\func{wxString }{GetContentType}{\void}
+\func{wxString}{GetContentType}{\void}
Returns the type of the content of the last opened stream. It is a mime-type.
\membersection{wxProtocol::SetPassword}
-\func{void }{SetPassword}{\param{const wxString\&}{ user}}
+\func{void}{SetPassword}{\param{const wxString\&}{ user}}
Sets the authentication password. It is mainly useful when FTP is used.
+
For the same portability reasons, container classes implementation in wxWindows
does not use templates, but is rather based on C preprocessor i.e. is done with
the macros: {\it WX\_DECLARE\_LIST} and {\it WX\_DEFINE\_LIST} for the linked
-lists and {\it WX\_DECLARE\_ARRAY}, {\it WX\_DECLARE\_OBJARRAY} and {\it
-WX\_DEFINE\_OBJARRAY} for the dynamic arrays. The "DECLARE" macro declares a
+lists and {\it WX\_DECLARE\_ARRAY}, {\it WX\_DECLARE\_OBJARRAY} and {\it WX\_DEFINE\_OBJARRAY} for
+the dynamic arrays. The "DECLARE" macro declares a
new container class containing the elements of given type and is needed for all
three types of container classes: lists, arrays and objarrays. The "DEFINE"
classes must be inserted in your program in a place where the {\bf full
\input tstring.tex
\input tdnd.tex
\input tthreads.tex
-\input tfile.tex
+% \input tfile.tex
\input tusage.tex
It can be one of these errors:
\twocolwidtha{7cm}
-\begin{twocollist}\itemsep=0pt
+\begin{twocollist}\itemsep=0pt%
\twocolitem{{\bf wxURL\_NOERR}}{No error.}
\twocolitem{{\bf wxURL\_SNTXERR}}{Syntax error in the URL string.}
\twocolitem{{\bf wxURL\_NOPROTO}}{Found no protocol which can get this URL.}
# info
# Set WXDIR for your system
+SHELL=cmd.exe
WXDIR = ..
THISDIR=$(WXDIR)/samples
all:
- cd $(WXDIR)/samples/bombs; make -f makefile.g95
- cd $(WXDIR)/samples/fractal; make -f makefile.g95
- cd $(WXDIR)/samples/splitter; make -f makefile.g95
- cd $(WXDIR)/samples/resource; make -f makefile.g95
- cd $(WXDIR)/samples/controls; make -f makefile.g95
- cd $(WXDIR)/samples/listctrl; make -f makefile.g95
- cd $(WXDIR)/samples/treectrl; make -f makefile.g95
- cd $(WXDIR)/samples/validate; make -f makefile.g95
- cd $(WXDIR)/samples/mdi; make -f makefile.g95
- cd $(WXDIR)/samples/minimal; make -f makefile.g95
- cd $(WXDIR)/samples/layout; make -f makefile.g95
- cd $(WXDIR)/samples/printing; make -f makefile.g95
- cd $(WXDIR)/samples/proplist; make -f makefile.g95
- cd $(WXDIR)/samples/toolbar; make -f makefile.g95
- cd $(WXDIR)/samples/dialogs; make -f makefile.g95
- cd $(WXDIR)/samples/docview; make -f makefile.g95
- cd $(WXDIR)/samples/docvwmdi; make -f makefile.g95
- cd $(WXDIR)/samples/sashtest; make -f makefile.g95
- cd $(WXDIR)/samples/controls; make -f makefile.g95
- cd $(WXDIR)/samples/nativdlg; make -f makefile.g95
- cd $(WXDIR)/samples/grid; make -f makefile.g95
- cd $(WXDIR)/samples/internat; make -f makefile.g95
- cd $(WXDIR)/samples/checklst; make -f makefile.g95
- cd $(WXDIR)/samples/dnd; make -f makefile.g95
- cd $(WXDIR)/samples/ownerdrw; make -f makefile.g95
- cd $(WXDIR)/samples/joytest; make -f makefile.g95
- cd $(WXDIR)/samples/memcheck; make -f makefile.g95
-# cd $(WXDIR)/samples/regtest; make -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/bombs -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/fractal -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/splitter -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/resource -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/controls -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/listctrl -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/treectrl -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/validate -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/mdi -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/minimal -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/layout -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/printing -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/proplist -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/toolbar -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/dialogs -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/docview -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/docvwmdi -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/sashtest -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/controls -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/nativdlg -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/grid -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/internat -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/checklst -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/dnd -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/ownerdrw -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/joytest -f makefile.g95
+ $(MAKE) -C $(WXDIR)/samples/memcheck -f makefile.g95
+# $(MAKE) -C $(WXDIR)/samples/regtest -f makefile.g95
clean:
- cd $(WXDIR)/samples/bombs; make -f makefile.g95 clean
- cd $(WXDIR)/samples/fractal; make -f makefile.g95 clean
- cd $(WXDIR)/samples/splitter; make -f makefile.g95 clean
- cd $(WXDIR)/samples/mdi; make -f makefile.g95 clean
- cd $(WXDIR)/samples/minimal; make -f makefile.g95 clean
- cd $(WXDIR)/samples/layout; make -f makefile.g95 clean
- cd $(WXDIR)/samples/printing; make -f makefile.g95 clean
- cd $(WXDIR)/samples/proplist; make -f makefile.g95 clean
- cd $(WXDIR)/samples/toolbar; make -f makefile.g95 clean
- cd $(WXDIR)/samples/dialogs; make -f makefile.g95 clean
- cd $(WXDIR)/samples/resource; make -f makefile.g95 clean
- cd $(WXDIR)/samples/listctrl; make -f makefile.g95 clean
- cd $(WXDIR)/samples/treectrl; make -f makefile.g95 clean
- cd $(WXDIR)/samples/validate; make -f makefile.g95 clean
- cd $(WXDIR)/samples/docview; make -f makefile.g95 clean
- cd $(WXDIR)/samples/docvwmdi; make -f makefile.g95 clean
- cd $(WXDIR)/samples/sashtest; make -f makefile.g95 clean
- cd $(WXDIR)/samples/controls; make -f makefile.g95 clean
- cd $(WXDIR)/samples/nativdlg; make -f makefile.g95 clean
- cd $(WXDIR)/samples/grid; make -f makefile.g95 clean
- cd $(WXDIR)/samples/internat; make -f makefile.g95 clean
- cd $(WXDIR)/samples/checklst; make -f makefile.g95 clean
- cd $(WXDIR)/samples/dnd; make -f makefile.g95 clean
- cd $(WXDIR)/samples/ownerdrw; make -f makefile.g95 clean
- cd $(WXDIR)/samples/regtest; make -f makefile.g95 clean
- cd $(WXDIR)/samples/joytest; make -f makefile.g95 clean
- cd $(WXDIR)/samples/memcheck; make -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/bombs -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/fractal -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/splitter -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/mdi -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/minimal -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/layout -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/printing -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/proplist -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/toolbar -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/dialogs -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/resource -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/listctrl -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/treectrl -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/validate -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/docview -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/docvwmdi -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/sashtest -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/controls -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/nativdlg -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/grid -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/internat -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/checklst -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/dnd -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/ownerdrw -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/regtest -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/joytest -f makefile.g95 clean
+ $(MAKE) -C $(WXDIR)/samples/memcheck -f makefile.g95 clean
+
if ( g_TestBitmap && g_TestBitmap->Ok() )
{
wxMemoryDC memDC;
- if ( g_TestBitmap->GetColourMap() )
+ if ( g_TestBitmap->GetPalette() )
{
- memDC.SetPalette(* g_TestBitmap->GetColourMap());
- dc.SetPalette(* g_TestBitmap->GetColourMap());
+ memDC.SetPalette(* g_TestBitmap->GetPalette());
+ dc.SetPalette(* g_TestBitmap->GetPalette());
}
memDC.SelectObject(* g_TestBitmap);