1. fixed bug with the accels in sub menus not working

2. fixed minor bugs in wxCmdLineParser, underscores and digits are now allows
   in the option names
3. made wxGetLocalTimeMillis() public, documented it and other time functions,
   added wxDateTime::UNow(), also "%l" format specificator in
   wxDateTime::Format()
4. fixed fatal bug in wxTimeSpan::Format()
5. fixed nice bug in wxDateTime::Subtract(wxDateTime) which returned the result
   with the wrong sign


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-07-02 21:48:22 +00:00
parent 888b22c897
commit 948f1f2b77
11 changed files with 221 additions and 97 deletions

View File

@@ -85,7 +85,8 @@ enum wxCmdLineEntryType
The field {\tt shortName} is the usual, short, name of the switch or the option.
{\tt longName} is the corresponding long name or NULL if the option has no long
name. Both of these fields are unused for the parameters.
name. Both of these fields are unused for the parameters. Both the short and
long option names can contain only letters, digits and the underscores.
{\tt description} is used by the \helpref{Usage()}{wxcmdlineparserusage} method
to construct a help message explaining the syntax of the program.
@@ -109,7 +110,8 @@ enum
wxCMD\_LINE\_OPTION\_MANDATORY = 0x01, // this option must be given
wxCMD\_LINE\_PARAM\_OPTIONAL = 0x02, // the parameter may be omitted
wxCMD\_LINE\_PARAM\_MULTIPLE = 0x04, // the parameter may be repeated
wxCMD\_LINE\_OPTION\_HELP = 0x08 // this option is a help request
wxCMD\_LINE\_OPTION\_HELP = 0x08, // this option is a help request
wxCMD\_LINE\_NEEDS\_SEPARATOR = 0x10, // must have sep before the value
}
\end{verbatim}}
@@ -125,6 +127,10 @@ use \helpref{GetParamCount}{wxcmdlineparsergetparamcount} to retrieve the number
of parameters effectively specified after calling
\helpref{Parse}{wxcmdlineparserparse}.
The last flag {\tt wxCMD\_LINE\_NEEDS\_SEPARATOR} can be specified to require a
separator (either a colon, an equal sign or white space) between the option
name and its value. By default, no separator is required.
\wxheading{See also}
\helpref{wxApp::argc}{wxappargc} and \helpref{wxApp::argv}{wxappargv}\\

View File

@@ -212,6 +212,7 @@ supported. Future versions will support other calendars.
\helpref{GetBeginDST}{wxdatetimegetbegindst}\\
\helpref{GetEndDST}{wxdatetimegetenddst}\\
\helpref{Now}{wxdatetimenow}\\
\helpref{UNow}{wxdatetimeunow}\\
\helpref{Today}{wxdatetimetoday}
\membersection{Constructors, assignment operators and setters}
@@ -562,6 +563,10 @@ Example:
printf("Current time in Paris:\t%s\n", now.Format("%c", wxDateTime::CET).c_str());
\end{verbatim}
Note that this function is accurate up to second:
\helpref{wxDateTime::UNow}{wxdatetimeunow} should be used for better precision
(but it is less efficient and might not be availabel on all platforms).
\wxheading{See also}
\helpref{Today}{wxdatetimetoday}
@@ -591,6 +596,18 @@ same as \helpref{Now()}{wxdatetimenow}, but the time part is set to $0$).
\helpref{Now}{wxdatetimenow}
\membersection{wxDateTime::UNow}\label{wxdatetimeunow}
\func{static wxDateTime}{UNow}{\void}
Returns the object corresopnding to the current time including the
milliseconds if a function to get time with such precision is available on the
current platform (supported under most Unices and Win32).
\wxheading{See also}
\helpref{Now}{wxdatetimenow}
%%%%%%%%%%%%%%%%%%%%%%%%%%% constructors &c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimedef}
@@ -1069,6 +1086,10 @@ the character which stopped the scan.
This function does the same as the standard ANSI C {\tt strftime(3)} function.
Please see its description for the meaning of {\it format} parameter.
It also accepts a few wxWindows-specific extensions: you can optionally specify
the width of the field to follow using {\tt printf(3)}-like syntax and the
format specificator {\tt \%l} can be used to get the number of milliseconds.
\wxheading{See also}
\helpref{ParseFormat}{wxdatetimeparseformat}

View File

@@ -1459,21 +1459,6 @@ Return the (current) user's home directory.
<wx/utils.h>
\membersection{::wxGetElapsedTime}\label{wxgetelapsedtime}
\func{long}{wxGetElapsedTime}{\param{bool}{ resetTimer = TRUE}}
Gets the time in milliseconds since the last \helpref{::wxStartTimer}{wxstarttimer}.
If {\it resetTimer} is TRUE (the default), the timer is reset to zero
by this call.
See also \helpref{wxTimer}{wxtimer}.
\wxheading{Include files}
<wx/timer.h>
\membersection{::wxGetFreeMemory}\label{wxgetfreememory}
\func{long}{wxGetFreeMemory}{\void}
@@ -1803,18 +1788,6 @@ as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows).
<wx/utils.h>
\membersection{::wxStartTimer}\label{wxstarttimer}
\func{void}{wxStartTimer}{\void}
Starts a stopwatch; use \helpref{::wxGetElapsedTime}{wxgetelapsedtime} to get the elapsed time.
See also \helpref{wxTimer}{wxtimer}.
\wxheading{Include files}
<wx/timer.h>
\membersection{::wxToLower}\label{wxtolower}
\func{char}{wxToLower}{\param{char }{ch}}
@@ -2700,6 +2673,86 @@ Returns the error message corresponding to the given system error code. If
\helpref{wxSysErrorCode}{wxsyserrorcode},
\helpref{wxLogSysError}{wxlogsyserror}
\section{Time functions}\label{timefunctions}
The functions in this section deal with getting the current time and
starting/stopping the global timers. Please note that the timer functions are
deprecated because they work with one global timer only and
\helpref{wxTimer}{wxtimer} and/or \helpref{wxStopWatch}{wxstopwatch} classes
should be used instead. For retrieving the current time, you may also use
\helpref{wxDateTime::Now}{wxdatetimenow} or
\helpref{wxDateTime::UNow}{wxdatetimeunow} methods.
\membersection{::wxGetElapsedTime}\label{wxgetelapsedtime}
\func{long}{wxGetElapsedTime}{\param{bool}{ resetTimer = TRUE}}
Gets the time in milliseconds since the last \helpref{::wxStartTimer}{wxstarttimer}.
If {\it resetTimer} is TRUE (the default), the timer is reset to zero
by this call.
See also \helpref{wxTimer}{wxtimer}.
\wxheading{Include files}
<wx/timer.h>
\membersection{::wxGetLocalTime}\label{wxgetlocaltime}
\func{long}{wxGetLocalTime}{\void}
Returns the number of seconds since local time 00:00:00 Jan 1st 1970.
\wxheading{See also}
\helpref{wxDateTime::Now}{wxdatetimenow}
\wxheading{Include files}
<wx/timer.h>
\membersection{::wxGetLocalTimeMillis}\label{wxgetlocaltimemillis}
\func{wxLongLone}{wxGetLocalTimeMillis}{\void}
Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970.
\wxheading{See also}
\helpref{wxDateTime::Now}{wxdatetimenow},\\
\helpref{wxLongLone}{wxlonglong}
\wxheading{Include files}
<wx/timer.h>
\membersection{::wxGetUTCTime}\label{wxgetutctime}
\func{long}{wxGetUTCTime}{\void}
Returns the number of seconds since GMT 00:00:00 Jan 1st 1970.
\wxheading{See also}
\helpref{wxDateTime::Now}{wxdatetimenow}
\wxheading{Include files}
<wx/timer.h>
\membersection{::wxStartTimer}\label{wxstarttimer}
\func{void}{wxStartTimer}{\void}
Starts a stopwatch; use \helpref{::wxGetElapsedTime}{wxgetelapsedtime} to get the elapsed time.
See also \helpref{wxTimer}{wxtimer}.
\wxheading{Include files}
<wx/timer.h>
\section{Debugging macros and functions}\label{debugmacros}
Useful macros and functions for error checking and defensive programming. ASSERTs are only