X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84ed77ef28c568c729de218f821cf25bb5c7c2d7..69a126b0c72e4318adb5b1d526f1082d368c7509:/docs/latex/wx/function.tex?ds=sidebyside diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index c235d3d3ef..7b2f4c1d31 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -23,6 +23,8 @@ 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}\\ \helpref{WXTRACE}{trace}\\ @@ -898,8 +900,7 @@ slashes. \func{bool}{wxFileExists}{\param{const wxString\& }{filename}} -Returns true if the file exists. It also returns true if the file is -a directory. +Returns true if the file exists and is a plain file. \membersection{::wxFileModificationTime}\label{wxfilemodificationtime} @@ -1394,10 +1395,28 @@ 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}} +\func{const char *}{wxGetTranslation}{\param{const char * }{str}, \param{const char * }{strPlural}, \param{size\_t }{n}} + This function returns the translation of string {\it str} in the current \helpref{locale}{wxlocale}. If the string is not found in any of the loaded message catalogs (see \helpref{internationalization overview}{internationalization}), the @@ -1407,6 +1426,17 @@ is used very often, an alternative (and also common in Unix world) syntax is provided: the \helpref{\_()}{underscore} macro is defined to do the same thing as wxGetTranslation. +The second form is used when retrieving translation of string that has +different singular and plural form in English or different plural forms in some +other language. It takes two extra arguments: \arg{str} +parameter must contain the singular form of the string to be converted. +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. +See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling. \membersection{::wxIsEmpty}\label{wxisempty} @@ -1600,6 +1630,10 @@ 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} @@ -2529,6 +2563,13 @@ The clipboard must have previously been opened for this call to succeed. \section{Miscellaneous functions}\label{miscellany} +\membersection{wxCONCAT}\label{wxconcat} + +\func{}{wxCONCAT}{\param{}{x}, \param{}{y}} + +This macro returns the concatenation of two tokens \arg{x} and \arg{y}. + + \membersection{wxDYNLIB\_FUNCTION}\label{wxdynlibfunction} \func{}{wxDYNLIB\_FUNCTION}{\param{}{type}, \param{}{name}, \param{}{dynlib}} @@ -3927,6 +3968,11 @@ use it on the same line in two different source files. In this case you may either change the line in which either of them appears on or use the \helpref{wxCOMPILE\_TIME\_ASSERT2}{wxcompiletimeassert2} macro. +Also note that Microsoft Visual C++ has a bug which results in compiler errors +if you use this macro with ``Program Database For Edit And Continue'' +(\texttt{/ZI}) option, so you shouldn't use it (``Program Database'' +(\texttt{/Zi}) is ok though) for the code making use of this macro. + \wxheading{See also} \helpref{wxASSERT\_MSG}{wxassertmsg},\\