1. wxDir works for MSW and documented
2. wxDateTime works with dates very close to the Epoch 3. setting font for wxRadioBox works git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -377,6 +377,7 @@ wxWindows has several small classes to work with disk files, see \helpref{file c
|
||||
overview}{wxfileoverview} for more details.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxDir}{wxdir}}{Class for enumerating files/subdirectories.}
|
||||
\twocolitem{\helpref{wxFile}{wxfile}}{Low-level file input/output class.}
|
||||
\twocolitem{\helpref{wxFFile}{wxffile}}{Another low-level file input/output class.}
|
||||
\twocolitem{\helpref{wxTempFile}{wxtempfile}}{Class to safely replace an existing file}
|
||||
|
@@ -52,6 +52,7 @@
|
||||
\input ddeservr.tex
|
||||
\input debugcxt.tex
|
||||
\input dialog.tex
|
||||
\input dir.tex
|
||||
\input dirdlg.tex
|
||||
\input docchfrm.tex
|
||||
\input docmanag.tex
|
||||
|
119
docs/latex/wx/dir.tex
Normal file
119
docs/latex/wx/dir.tex
Normal file
@@ -0,0 +1,119 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% include\wx\dir.h at 11/Dec/99 00:55:30
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxDir}}\label{wxdir}
|
||||
|
||||
wxDir is a portable equivalent of Unix {open/read/close}dir functions which
|
||||
allow enumerating of the files in a directory. wxDir allows enumerate files as
|
||||
well as directories.
|
||||
|
||||
Example of use:
|
||||
|
||||
\begin{verbatim}
|
||||
wxDir dir(wxGetCwd());
|
||||
|
||||
if ( !dir.IsOpened() )
|
||||
{
|
||||
// deal with the error here - wxDir would already log an error message
|
||||
// explaining the exact reason of the failure
|
||||
return;
|
||||
}
|
||||
|
||||
puts("Enumerating object files in current directory:");
|
||||
|
||||
wxString filename;
|
||||
|
||||
bool cont = dir.GetFirst(&filename, filespec, flags);
|
||||
while ( cont )
|
||||
{
|
||||
printf("%s\n", filename.c_str());
|
||||
|
||||
cont = dir.GetNext(&filename);
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Constants}
|
||||
|
||||
These flags define what kind of filenames is included in the list of files
|
||||
enumerated by GetFirst/GetNext
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
enum
|
||||
{
|
||||
wxDIR_FILES = 0x0001, // include files
|
||||
wxDIR_DIRS = 0x0002, // include directories
|
||||
wxDIR_HIDDEN = 0x0004, // include hidden files
|
||||
wxDIR_DOTDOT = 0x0008, // include '.' and '..'
|
||||
|
||||
// by default, enumerate everything except '.' and '..'
|
||||
wxDIR_DEFAULT = wxDIR\_FILES | wxDIR\_DIRS | wxDIR\_HIDDEN
|
||||
}
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/dir.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDir::Exists}\label{wxdirexists}
|
||||
|
||||
\func{static bool}{Exists}{\param{const wxString\& }{dir}}
|
||||
|
||||
Test for existence of a directory with the given name
|
||||
|
||||
\membersection{wxDir::wxDir}\label{wxdirwxdir}
|
||||
|
||||
\func{}{wxDir}{\void}
|
||||
|
||||
Default constructor, use \helpref{Open()}{wxdiropen} afterwards.
|
||||
|
||||
\func{}{wxDir}{\param{const wxString\& }{dir}}
|
||||
|
||||
Opens the directory for enumeration, use \helpref{IsOpened()}{wxdirisopened}
|
||||
to test for errors.
|
||||
|
||||
\membersection{wxDir::\destruct{wxDir}}\label{wxdirdtor}
|
||||
|
||||
\func{}{\destruct{wxDir}}{\void}
|
||||
|
||||
Destructor cleans up the associated ressources. It is not virtual and so this
|
||||
class is not meant to be used polymorphically.
|
||||
|
||||
\membersection{wxDir::Open}\label{wxdiropen}
|
||||
|
||||
\func{bool}{Open}{\param{const wxString\& }{dir}}
|
||||
|
||||
Open the directory for enumerating, returns TRUE on success or FALSE if an
|
||||
error occured.
|
||||
|
||||
\membersection{wxDir::IsOpened}\label{wxdirisopened}
|
||||
|
||||
\constfunc{bool}{IsOpened}{\void}
|
||||
|
||||
Returns TRUE if the directory was successfully opened by a previous call to
|
||||
\helpref{Open}{wxdiropen}.
|
||||
|
||||
\membersection{wxDir::GetFirst}\label{wxdirgetfirst}
|
||||
|
||||
\constfunc{bool}{GetFirst}{\param{wxString* }{filename}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
|
||||
|
||||
Start enumerating all files matching {\it filespec} (or all files if it is
|
||||
empty) and flags, return TRUE on success.
|
||||
|
||||
\membersection{wxDir::GetNext}\label{wxdirgetnext}
|
||||
|
||||
\constfunc{bool}{GetNext}{\param{wxString* }{filename}}
|
||||
|
||||
Continue enumerating files satisfying the criteria specified by the last call
|
||||
to \helpref{GetFirst}{wxdirgetfirst}.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
\section{File classes and functions overview}\label{wxfileoverview}
|
||||
|
||||
Classes: \helpref{wxFile}{wxfile}, \helpref{wxTempFile}{wxtempfile},
|
||||
Classes: \helpref{wxFile}{wxfile}, \helpref{wxDir}{wxdir}, \helpref{wxTempFile}{wxtempfile},
|
||||
\helpref{wxTextFile}{wxtextfile}
|
||||
|
||||
Functions: see \helpref{file functions}{filefunctions}.
|
||||
@@ -25,3 +25,6 @@ and program source files. It can be also used to work with files with "non
|
||||
native" line termination characters and write them as "native" files if needed
|
||||
(in fact, the files may be written in any format).
|
||||
|
||||
wxDir is a helper class for enumerating the files or subdirectories of a
|
||||
directory. It may be used to enumerate all files, only files satisfying the
|
||||
given template mask or only non-hidden files.
|
||||
|
Reference in New Issue
Block a user