X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dce0e4dc3aa68951dd86d5eaaf7ccd2cf6c3109..0016bb3b1c6870a3c43b42b5be145c15fab56580:/docs/latex/wx/function.tex diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index f2b0c5ea81..412fa7e839 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -9,7 +9,7 @@ %% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{Functions}\label{functions} +\chapter{Functions and macros}\label{functions} \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setfooter{\thepage}{}{}{}{}{\thepage} @@ -52,6 +52,7 @@ the corresponding topic. \helpref{wxCHECK\_SUNCC\_VERSION}{wxchecksunccversion}\\ \helpref{wxCHECK\_VERSION}{wxcheckversion}\\ \helpref{wxCHECK\_VERSION\_FULL}{wxcheckversionfull}\\ +\helpref{wxCHECK\_VISUALC\_VERSION}{wxcheckvisualcversion}\\ \helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}\\ \helpref{wxClientDisplayRect}{wxclientdisplayrect}\\ \helpref{wxClipboardOpen}{functionwxclipboardopen}\\ @@ -169,6 +170,7 @@ the corresponding topic. \helpref{wxGetenv}{wxgetenvmacro}\\ \helpref{wxHandleFatalExceptions}{wxhandlefatalexceptions}\\ \helpref{wxICON}{wxiconmacro}\\ +\helpref{wxInfoMessageBox}{wxinfomessagebox}\\ \helpref{wxINTXX\_SWAP\_ALWAYS}{intswapalways}\\ \helpref{wxINTXX\_SWAP\_ON\_BE}{intswaponbe}\\ \helpref{wxINTXX\_SWAP\_ON\_LE}{intswaponle}\\ @@ -224,6 +226,7 @@ the corresponding topic. \helpref{wxRemoveFile}{wxremovefile}\\ \helpref{wxRenameFile}{wxrenamefile}\\ \helpref{wxRmdir}{wxrmdir}\\ +\helpref{wxS}{wxs}\\ \helpref{wxSafeShowMessage}{wxsafeshowmessage}\\ \helpref{wxSafeYield}{wxsafeyield}\\ \helpref{wxSetClipboardData}{wxsetclipboarddata}\\ @@ -363,6 +366,15 @@ Same as \helpref{wxCHECK\_VERSION}{wxcheckversion} but also checks that \texttt{wxSUBRELEASE\_NUMBER} is at least \arg{subrel}. +\membersection{wxCHECK\_VISUALC\_VERSION}\label{wxcheckvisualcversion} + +\func{bool}{wxCHECK\_VISUALC\_VERSION}{\param{}{major}} + +Returns $1$ if the compiler being used to compile the code is Visual C++ +compiler version \arg{major} or greater. Otherwise, and also if +the compiler is not Visual C++ at all, returns $0$. + + \membersection{wxCHECK\_W32API\_VERSION}\label{wxcheckw32apiversion} \func{bool}{wxCHECK\_W32API\_VERSION}{\param{}{major, minor, release}} @@ -1695,6 +1707,25 @@ Returns \true if the pointer is either {\tt NULL} or points to an empty string, \false otherwise. +\membersection{wxS}\label{wxs} + +\func{wxStringCharType}{wxS}{\param{char }{ch}} + +\func{const wxStringCharType *}{wxS}{\param{const char *}{s}} + +wxS is macro which can be used with character and string literals to either +convert them to wide characters or strings in \texttt{wchar\_t}-based Unicode +builds or keep them unchanged in UTF-8 builds. The use of this macro is +optional as the translation will always be done at run-time even if there is a +mismatch between the kind of the literal used and wxStringCharType used in the +current build, but using it can be beneficial in performance-sensitive code to +do the conversion at compile-time instead. + +\wxheading{See also} + +\helpref{wxT}{wxt} + + \membersection{::wxStrcmp}\label{wxstrcmp} \func{int}{wxStrcmp}{\param{const char *}{p1}, \param{const char *}{p2}} @@ -2109,7 +2140,7 @@ customization. \membersection{::wxGetColourFromUser}\label{wxgetcolourfromuser} -\func{wxColour}{wxGetColourFromUser}{\param{wxWindow *}{parent}, \param{const wxColour\& }{colInit}, \param{const wxString\& }{caption = wxEmptyString}} +\func{wxColour}{wxGetColourFromUser}{\param{wxWindow *}{parent}, \param{const wxColour\& }{colInit}, \param{const wxString\& }{caption = wxEmptyString}, \param{wxColourData *}{data = \NULL}} Shows the colour selection dialog and returns the colour selected by user or invalid colour (use \helpref{wxColour:IsOk}{wxcolourisok} to test whether a colour @@ -2123,6 +2154,10 @@ is valid) if the dialog was cancelled. \docparam{caption}{If given, this will be used for the dialog caption.} +\docparam{data}{Optional object storing additional colour dialog settings, such +as custom colours. If none is provided the same settings as the last time are +used.} + \wxheading{Include files} @@ -2351,6 +2386,23 @@ and {\tt choices}, and the client data array must have the same length as the choices array.} +\membersection{::wxInfoMessageBox}\label{wxinfomessagebox} + +\func{void}{wxInfoMessageBox}{\param{wxWindow (}{parent = \NULL}} + +Shows a message box with the information about the wxWidgets build used, +including its version, most important build parameters and the version of the +underlying GUI toolkit. This is mainly used for diagnostic purposes and can be +invoked by Ctrl-Alt-middle clicking on any wxWindow which doesn't otherwise +handle this event. + +\newsince{2.9.0} + +\wxheading{Include files} + + + + \membersection{::wxIsBusy}\label{wxisbusy} \func{bool}{wxIsBusy}{\void} @@ -2598,9 +2650,11 @@ This function is only available under Windows. \membersection{::wxSetCursor}\label{wxsetcursor} -\func{void}{wxSetCursor}{\param{wxCursor *}{cursor}} +\func{void}{wxSetCursor}{\param{const wxCursor\&}{ cursor}} + +Globally sets the cursor; only has an effect on Windows, Mac and GTK+. You should +call this function with wxNullCursor to restore the system cursor. -Globally sets the cursor; only has an effect in Windows and GTK. See also \helpref{wxCursor}{wxcursor}, \helpref{wxWindow::SetCursor}{wxwindowsetcursor}. @@ -2848,7 +2902,7 @@ Passes data to the clipboard. The clipboard must have previously been opened for this call to succeed. -\section{Miscellaneous functions}\label{miscellany} +\section{Miscellaneous functions and macros}\label{miscellany} \membersection{wxBase64Decode}\label{wxbase64decode} @@ -2964,9 +3018,37 @@ to \helpref{wxBase64Encode}{wxbase64encode}. \membersection{wxCONCAT}\label{wxconcat} -\func{}{wxCONCAT}{\param{}{x}, \param{}{y}} +\func{}{wxCONCAT}{\param{}{x1}, \param{}{x2}} + +\func{}{wxCONCAT3}{\param{}{x1}, \param{}{x2}, \param{}{x3}} + +\func{}{wxCONCAT4}{\param{}{x1}, \param{}{x2}, \param{}{x3}, \param{}{x4}} + +\func{}{wxCONCAT5}{\param{}{x1}, \param{}{x2}, \param{}{x3}, \param{}{x4}, \param{}{x5}} + +These macro return the concatenation of the tokens passed as their arguments. +Unlike when using the preprocessor \texttt{##} operator, the arguments undergo +the macro expansion before being concatenated. -This macro returns the concatenation of two tokens \arg{x} and \arg{y}. + +\membersection{wxDECLARE\_APP}\label{wxdeclareapp} + +\func{}{wxDECLARE\_APP}{className} + +This is used in headers to create a forward declaration of the +\helpref{wxGetApp}{wxgetapp} function implemented by +\helpref{wxIMPLEMENT\_APP}{wximplementapp}. It creates the declaration +{\tt className\& wxGetApp(void)}. + +Example: + +\begin{verbatim} + wxDECLARE_APP(MyApp) +\end{verbatim} + +\wxheading{Include files} + + \membersection{wxDYNLIB\_FUNCTION}\label{wxdynlibfunction} @@ -3741,6 +3823,59 @@ Use these macros to read data from and write data to a file that stores data in big-endian format. +\membersection{wxFORCE\_LINK\_THIS\_MODULE}\label{wxforcelinkthismodule} + +\func{}{wxFORCE\_LINK\_THIS\_MODULE}{moduleName} + +This macro can be used in conjunction with the +\helpref{wxFORCE\_LINK\_MODULE}{wxforcelinkmodule} macro to force +the linker to include in its output a specific object file. + +In particular, you should use this macro in the source file which you want +to force for inclusion. The \tt{moduleName} needs to be a name not already +in use in other \tt{wxFORCE\_LINK\_THIS\_MODULE} macros, but is not required +to be e.g. the same name of the source file (even if it's a good choice). + +\wxheading{Include files} + + + + +\membersection{wxFORCE\_LINK\_MODULE}\label{wxforcelinkmodule} + +\func{}{wxFORCE\_LINK\_MODULE}{moduleName} + +This macro can be used in conjunction with the +\helpref{wxFORCE\_LINK\_THIS\_MODULE}{wxforcelinkthismodule} macro to force +the linker to include in its output a specific object file. + +In particular, you should use this macro in a source file which you know +for sure is linked in the output (e.g. the source file containing the "main()" +of your app). The \tt{moduleName} is the name of the module you want to forcefully link +(i.e. the name you used in the relative \helpref{wxFORCE\_LINK\_THIS\_MODULE}{wxforcelinkthismodule} macro. + +\wxheading{Include files} + + + + +\membersection{wxIMPLEMENT\_APP}\label{wximplementapp} + +\func{}{wxIMPLEMENT\_APP}{className} + +This is used in the application class implementation file to make the application class +known to wxWidgets for dynamic construction. You use this as: + +\begin{verbatim} + wxIMPLEMENT_APP(MyApp) +\end{verbatim} + +See also \helpref{wxDECLARE\_APP}{wxdeclareapp}. + +\wxheading{Include files} + + + \section{RTTI functions}\label{rttimacros}