X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4db03d266bba0da0fa2d96c408fb3bb697b96128..5595181f48d45d2c277c7d40a4d24bea42d6847b:/docs/latex/wx/function.tex diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index 39d4e61b67..d47a983c0e 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -1801,11 +1801,9 @@ build. In fact, its definition is: \func{const wxChar *}{wxTRANSLATE}{\param{const char *}{s}} This macro doesn't do anything in the program code -- it simply expands to the -value of its argument (except in Unicode build where it is equivalent to -\helpref{wxT}{wxt} which makes it unnecessary to use both wxTRANSLATE and wxT -with the same string which would be really unreadable). +value of its argument. -However it does have a purpose and it is to mark the literal strings for the +However it does have a purpose which is to mark the literal strings for the extraction into the message catalog created by {\tt xgettext} program. Usually this is achieved using \helpref{\_()}{underscore} but that macro not only marks the string for extraction but also expands into a @@ -1820,7 +1818,7 @@ translated (note that it is a bad example, really, as day names already). If you write \begin{verbatim} -static const wxChar * const weekdays[] = { _("Mon"), ..., _("Sun") }; +static const char * const weekdays[] = { _("Mon"), ..., _("Sun") }; ... // use weekdays[n] as usual \end{verbatim} @@ -1829,7 +1827,7 @@ the code wouldn't compile because the function calls are forbidden in the array initializer. So instead you should do \begin{verbatim} -static const wxChar * const weekdays[] = { wxTRANSLATE("Mon"), ..., wxTRANSLATE("Sun") }; +static const char * const weekdays[] = { wxTRANSLATE("Mon"), ..., wxTRANSLATE("Sun") }; ... // use wxGetTranslation(weekdays[n]) \end{verbatim} @@ -1841,6 +1839,7 @@ wxTRANSLATE() in the above, it wouldn't work as expected because there would be no translations for the weekday names in the program message catalog and wxGetTranslation wouldn't find them. + \membersection{::wxVsnprintf}\label{wxvsnprintf} \func{int}{wxVsnprintf}{\param{wxChar *}{buf}, \param{size\_t }{len}, \param{const wxChar *}{format}, \param{va\_list }{argPtr}} @@ -2843,9 +2842,9 @@ The clipboard must have previously been opened for this call to succeed. \membersection{wxBase64Decode}\label{wxbase64decode} -\func{size\_t}{wxBase64Decode}{\param{void *}{dst}, \param{size\_t}{dstLen},\\ -\param{const char * }{src}, \param{size\_t }{srcLen = wxNO\_LEN},\\ -\param{wxBase64DecodeMode }{mode = wxBase64DecodeMode\_Strict},\\ +\func{size\_t}{wxBase64Decode}{\param{void *}{dst}, \param{size\_t }{dstLen}, +\param{const char * }{src}, \param{size\_t }{srcLen = wxNO\_LEN}, +\param{wxBase64DecodeMode }{mode = wxBase64DecodeMode\_Strict}, \param{size\_t }{*posErr = \NULL}} \func{wxMemoryBuffer}{wxBase64Decode}{\\ @@ -2906,10 +2905,10 @@ buffer to be passed to \helpref{wxBase64Decode}{wxbase64decode}. \membersection{wxBase64Encode}\label{wxbase64encode} -\func{size\_t}{wxBase64Encode}{\param{char *}{dst}, \param{size\_t}{dstLen},\\ +\func{size\_t}{wxBase64Encode}{\param{char *}{dst}, \param{size\_t }{dstLen}, \param{const void *}{src}, \param{size\_t }{srcLen}} -\func{wxString}{wxBase64Encode}{\param{const void *}{src}, \param{size\_t}{srcLen}} +\func{wxString}{wxBase64Encode}{\param{const void *}{src}, \param{size\_t }{srcLen}} \func{wxString}{wxBase64Encode}{\param{const wxMemoryBuffer\& }{buf}} @@ -2939,7 +2938,7 @@ size.} \membersection{wxBase64EncodedSize}\label{wxbase64encodedsize} -\func{size\_t}{wxBase64EncodedSize}{\param{size\_t}{len}} +\func{size\_t}{wxBase64EncodedSize}{\param{size\_t }{len}} Returns the length of the string with base64 representation of a buffer of specified size \arg{len}. This can be useful for allocating the buffer passed @@ -3100,7 +3099,9 @@ Generates an integer identifier unique to this run of the program. \membersection{wxON\_BLOCK\_EXIT}\label{wxonblockexit} \func{}{wxON\_BLOCK\_EXIT0}{\param{}{func}} + \func{}{wxON\_BLOCK\_EXIT1}{\param{}{func}, \param{}{p1}} + \func{}{wxON\_BLOCK\_EXIT2}{\param{}{func}, \param{}{p1}, \param{}{p2}} This family of macros allows to ensure that the global function \arg{func} @@ -3128,7 +3129,9 @@ details. \membersection{wxON\_BLOCK\_EXIT\_OBJ}\label{wxonblockexitobj} \func{}{wxON\_BLOCK\_EXIT\_OBJ0}{\param{}{obj}, \param{}{method}} + \func{}{wxON\_BLOCK\_EXIT\_OBJ1}{\param{}{obj}, \param{}{method}, \param{}{p1}} + \func{}{wxON\_BLOCK\_EXIT\_OBJ2}{\param{}{obj}, \param{}{method}, \param{}{p1}, \param{}{p2}} This family of macros is similar to \helpref{wxON\_BLOCK\_EXIT}{wxonblockexit} @@ -3257,6 +3260,18 @@ Find the deepest window at the mouse pointer position, returning the window and current pointer position in screen coordinates. +\membersection{wxFromString}\label{wxfromstring} + +\func{bool}{wxFromString}{\param{const wxString\& }{str}, + \param{wxColour* }{col}} + +\func{bool}{wxFromString}{\param{const wxString\& }{str}, + \param{wxFont* }{col}} + +Converts string to the type of the second argument. Returns \true on success. +See also: \helpref{wxToString}{wxtostring}. + + \membersection{::wxGetActiveWindow}\label{wxgetactivewindow} \func{wxWindow *}{wxGetActiveWindow}{\void} @@ -3572,6 +3587,16 @@ class name internally. Example of using the macro: Notice that there should be no semicolon after this macro. +\membersection{wxToString}\label{wxtostring} + +\func{wxString}{wxToString}{\param{const wxColour\& }{col}} + +\func{wxString}{wxToString}{\param{const wxFont\& }{col}} + +Converts its argument to string. +See also: \helpref{wxFromString}{wxfromstring}. + + \membersection{wxULL}\label{wxull} \func{wxLongLong\_t}{wxULL}{\param{}{number}}