X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d29bf6775a132497c0190926cc7e9e3ec425e5a7..733a25f0f454eefbb1392faad986d8dde7919230:/docs/latex/wx/function.tex?ds=inline diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index b204d0b798..5d553b30d0 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -21,7 +21,6 @@ the corresponding topic. \helpref{IMPLEMENT\_CLASS}{implementclass}\\ \helpref{IMPLEMENT\_DYNAMIC\_CLASS2}{implementdynamicclass2}\\ \helpref{IMPLEMENT\_DYNAMIC\_CLASS}{implementdynamicclass}\\ -\helpref{ngettext}{ngettext}\\ \helpref{wxCONCAT}{wxconcat}\\ \helpref{WXDEBUG\_NEW}{debugnew}\\ \helpref{WXTRACELEVEL}{tracelevel}\\ @@ -39,6 +38,7 @@ the corresponding topic. \helpref{wxCHECK\_MSG}{wxcheckmsg}\\ \helpref{wxCHECK\_RET}{wxcheckret}\\ \helpref{wxCHECK\_VERSION}{wxcheckversion}\\ +\helpref{wxCHECK\_VERSION\_FULL}{wxcheckversionfull}\\ \helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}\\ \helpref{wxClientDisplayRect}{wxclientdisplayrect}\\ \helpref{wxClipboardOpen}{functionwxclipboardopen}\\ @@ -109,6 +109,7 @@ the corresponding topic. \helpref{wxGetFullHostName}{wxgetfullhostname}\\ \helpref{wxGetHomeDir}{wxgethomedir}\\ \helpref{wxGetHostName}{wxgethostname}\\ +\helpref{wxGetKeyState}{wxgetkeystate}\\ \helpref{wxGetLocalTimeMillis}{wxgetlocaltimemillis}\\ \helpref{wxGetLocalTime}{wxgetlocaltime}\\ \helpref{wxGetMousePosition}{wxgetmouseposition}\\ @@ -174,6 +175,8 @@ the corresponding topic. \helpref{wxMakeMetafilePlaceable}{wxmakemetafileplaceable}\\ \helpref{wxMatchWild}{wxmatchwild}\\ \helpref{wxMessageBox}{wxmessagebox}\\ +\helpref{wxMilliSleep}{wxmillisleep}\\ +\helpref{wxMicroSleep}{wxmicrosleep}\\ \helpref{wxMkdir}{wxmkdir}\\ \helpref{wxMutexGuiEnter}{wxmutexguienter}\\ \helpref{wxMutexGuiLeave}{wxmutexguileave}\\ @@ -181,7 +184,7 @@ the corresponding topic. \helpref{wxNow}{wxnow}\\ \helpref{wxOnAssert}{wxonassert}\\ \helpref{wxOpenClipboard}{wxopenclipboard}\\ -\helpref{wxParseWildcard}{wxparsewildcard}\\ +\helpref{wxParseCommonDialogsFilter}{wxparsecommondialogsfilter}\\ \helpref{wxPathOnly}{wxpathonly}\\ \helpref{wxPostDelete}{wxpostdelete}\\ \helpref{wxPostEvent}{wxpostevent}\\ @@ -251,6 +254,8 @@ The following constants are defined in wxWidgets: \item {\tt wxMAJOR\_VERSION} is the major version of wxWidgets \item {\tt wxMINOR\_VERSION} is the minor version of wxWidgets \item {\tt wxRELEASE\_NUMBER} is the release number +\item {\tt wxSUBRELEASE\_NUMBER} is the subrelease number which is $0$ for all +official releases \end{itemize} For example, the values or these constants for wxWidgets 2.1.15 are 2, 1 and @@ -261,11 +266,23 @@ the full wxWidgets version and {\tt wxVERSION\_NUMBER} is a combination of the three version numbers above: for 2.1.15, it is 2115 and it is 2200 for wxWidgets 2.2. +The subrelease number is only used for the sources in between official releases +and so normally is not useful. + \wxheading{Include files} or +\membersection{wxCHECK\_GCC\_VERSION}\label{wxcheckgccversion} + +\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor, release}} + +Returns $1$ if the compiler being used to compile the code is GNU C++ +compiler (g++) version major.minor.release or greater. Otherwise, and also if +the compiler is not GNU C++ at all, returns $0$. + + \membersection{wxCHECK\_VERSION}\label{wxcheckversion} \func{bool}{wxCHECK\_VERSION}{\param{}{major, minor, release}} @@ -289,13 +306,12 @@ the following can be done: \end{verbatim} -\membersection{wxCHECK\_GCC\_VERSION}\label{wxcheckgccversion} +\membersection{wxCHECK\_VERSION\_FULL}\label{wxcheckversionfull} -\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor, release}} +\func{bool}{wxCHECK\_VERSION\_FULL}{\param{}{major, minor, release, subrel}} -Returns $1$ if the compiler being used to compile the code is GNU C++ -compiler (g++) version major.minor.release or greater. Otherwise, and also if -the compiler is not GNU C++ at all, returns $0$. +Same as \helpref{wxCHECK\_VERSION}{wxcheckversion} but also checks that +\texttt{wxSUBRELEASE\_NUMBER} is at least \arg{subrel}. \membersection{wxCHECK\_W32API\_VERSION}\label{wxcheckw32apiversion} @@ -1094,13 +1110,15 @@ Makes the directory \arg{dir}, returning true if successful. supported (Unix) and doesn't have effect for the other ones. -\membersection{::wxParseWildcard}\label{wxparsewildcard} +\membersection{::wxParseCommonDialogsFilter}\label{wxparsecommondialogsfilter} -\func{int}{wxParseWildcard}{\param{const wxString\& }{wildCard}, \param{wxArrayString\& }{descriptions}, \param{wxArrayString\& }{filters}} +\func{int}{wxParseCommonDialogsFilter}{\param{const wxString\& }{wildCard}, \param{wxArrayString\& }{descriptions}, \param{wxArrayString\& }{filters}} Parses the \arg{wildCard}, returning the number of filters. Returns 0 if none or if there's a problem. The arrays will contain an equal number of items found before the error. +On platforms where native dialogs handle only one filter per entry, +entries in arrays are automatically adjusted. \arg{wildCard} is in the form: \begin{verbatim} "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png" @@ -1406,22 +1424,6 @@ deleted with the {\it delete} operator. This function is deprecated, use \helpref{wxString}{wxstring} class instead. -\membersection{ngettext}\label{ngettext} - -\func{const wxChar *}{ngettext}{\param{const char *}{str}, \param{const char *}{strPlural}, \param{size\_t }{n}} - -This macro expands into a call to plural form version of -\helpref{wxGetTranslation}{wxgettranslation} -function, so it marks the message for the extraction by {\tt xgettext} just as -\helpref{wxTRANSLATE}{wxtranslate} does, but also returns the translation of -the string for the current locale during execution, either singular or plural -form depending on the value of \arg{n}. - -\wxheading{See also} - -\helpref{\_}{underscore} - - \membersection{::wxGetTranslation}\label{wxgettranslation} \func{const char *}{wxGetTranslation}{\param{const char * }{str}} @@ -1445,10 +1447,11 @@ It is also used as the key for the search in the catalog. The \arg{strPlural} parameter is the plural form (in English). The parameter \arg{n} is used to determine the plural form. If no message catalog is found \arg{str} is returned if `n == 1', -otherwise \arg{strPlural}. The \helpref{ngettext}{ngettext} macro is defined -to do the same thing. +otherwise \arg{strPlural}. See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling. +Both versions call \helpref{wxLocale::GetString}{wxlocalegetstring}. + \membersection{::wxIsEmpty}\label{wxisempty} \func{bool}{wxIsEmpty}{\param{const char *}{ p}} @@ -1621,11 +1624,6 @@ the string for the current locale during execution. Don't confuse this macro with \helpref{\_T()}{underscoret}! -\wxheading{See also} - -\helpref{ngettext}{ngettext} - - \membersection{\_T}\label{underscoret} @@ -2566,7 +2564,7 @@ This macro returns the concatenation of two tokens \arg{x} and \arg{y}. \func{}{wxDYNLIB\_FUNCTION}{\param{}{type}, \param{}{name}, \param{}{dynlib}} When loading a function from a DLL you always have to cast the returned -\tt{void *} pointer to the correct type and, even more annoyingly, you have to +{\tt void *} pointer to the correct type and, even more annoyingly, you have to repeat this type twice if you want to declare and define a function pointer all in one line @@ -2595,6 +2593,19 @@ code which might have to be compiled with an old compiler without support for this language feature but still take advantage of it when it is available. +\membersection{::wxGetKeyState}\label{wxgetkeystate} + +\func{bool}{wxGetKeyState}{\param{wxKeyCode }{key}} + +Returns \true if the key parameter is currently pressed on the keyboard, or +with modifier keys, (caps lock, etc) if the key is active (the led light is +on). + +\wxheading{Include files} + + + + \membersection{wxLL}\label{wxll} \func{wxLongLong\_t}{wxLL}{\param{}{number}} @@ -3848,6 +3859,33 @@ Returns the number of seconds since GMT 00:00:00 Jan 1st 1970. +\membersection{::wxMicroSleep}\label{wxmicrosleep} + +\func{void}{wxMicroSleep}{\param{unsigned long}{ microseconds}} + +Sleeps for the specified number of microseconds. The microsecond resolution may +not, in fact, be available on all platforms (currently only Unix platforms with +nanosleep(2) may provide it) in which case this is the same as +\helpref{wxMilliSleep}{wxmillisleep}(\arg{microseconds}$/1000$). + +\wxheading{Include files} + + + + +\membersection{::wxMilliSleep}\label{wxmillisleep} + +\func{void}{wxMilliSleep}{\param{unsigned long}{ milliseconds}} + +Sleeps for the specified number of milliseconds. Notice that usage of this +function is encouraged instead of calling usleep(3) directly because the +standard usleep() function is not MT safe. + +\wxheading{Include files} + + + + \membersection{::wxNow}\label{wxnow} \func{wxString}{wxNow}{\void} @@ -3887,13 +3925,10 @@ See also \helpref{wxTimer}{wxtimer}. \func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}} -Sleeps for the specified number of milliseconds. Notice that usage of this -function is encouraged instead of calling usleep(3) directly because the -standard usleep() function is not MT safe. - -\wxheading{Include files} - - +This function is deprecated because its name is misleading: notice that the +argument is in milliseconds, not microseconds. Please use either +\helpref{wxMilliSleep}{wxmillisleep} or \helpref{wxMicroSleep}{wxmicrosleep} +depending on the resolution you need.