X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40786029bdd143adcf213118a6a53ecdc7832270..cab07038130a820b53b79a29464176ee8d429243:/docs/latex/wx/function.tex diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index ac1fc9f3be..78ae7251df 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -1,3 +1,14 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: function.tex +%% Purpose: Functions and macros +%% Author: wxWidgets Team +%% Modified by: +%% Created: +%% RCS-ID: $Id$ +%% Copyright: (c) wxWidgets Team +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \chapter{Functions}\label{functions} \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setfooter{\thepage}{}{}{}{}{\thepage} @@ -21,16 +32,12 @@ the corresponding topic. \helpref{IMPLEMENT\_CLASS}{implementclass}\\ \helpref{IMPLEMENT\_DYNAMIC\_CLASS2}{implementdynamicclass2}\\ \helpref{IMPLEMENT\_DYNAMIC\_CLASS}{implementdynamicclass}\\ -\helpref{wxCONCAT}{wxconcat}\\ -\helpref{WXDEBUG\_NEW}{debugnew}\\ -\helpref{WXTRACELEVEL}{tracelevel}\\ -\helpref{WXTRACE}{trace}\\ +\helpref{wxASSERT}{wxassert}\\ \helpref{wxASSERT\_MIN\_BITSIZE}{wxassertminbitsize}\\ \helpref{wxASSERT\_MSG}{wxassertmsg}\\ -\helpref{wxASSERT}{wxassert}\\ -\helpref{wxBITMAP}{wxbitmapmacro}\\ \helpref{wxBeginBusyCursor}{wxbeginbusycursor}\\ \helpref{wxBell}{wxbell}\\ +\helpref{wxBITMAP}{wxbitmapmacro}\\ \helpref{wxCHANGE\_UMASK}{wxchangeumask}\\ \helpref{wxCHECK}{wxcheck}\\ \helpref{wxCHECK2\_MSG}{wxcheck2msg}\\ @@ -47,6 +54,7 @@ the corresponding topic. \helpref{wxColourDisplay}{wxcolourdisplay}\\ \helpref{wxCOMPILE\_TIME\_ASSERT}{wxcompiletimeassert}\\ \helpref{wxCOMPILE\_TIME\_ASSERT2}{wxcompiletimeassert2}\\ +\helpref{wxCONCAT}{wxconcat}\\ \helpref{wxConcatFiles}{wxconcatfiles}\\ \helpref{wxConstCast}{wxconstcast}\\ \helpref{wxCopyFile}{wxcopyfile}\\ @@ -60,6 +68,8 @@ the corresponding topic. \helpref{wxDDEInitialize}{wxddeinitialize}\\ \helpref{wxDROP\_ICON}{wxdropicon}\\ \helpref{wxDebugMsg}{wxdebugmsg}\\ +\helpref{WXDEBUG\_NEW}{debugnew}\\ +\helpref{wxDirExists}{functionwxdirexists}\\ \helpref{wxDirSelector}{wxdirselector}\\ \helpref{wxDisplayDepth}{wxdisplaydepth}\\ \helpref{wxDisplaySize}{wxdisplaysize}\\ @@ -117,6 +127,7 @@ the corresponding topic. \helpref{wxGetLocalTimeMillis}{wxgetlocaltimemillis}\\ \helpref{wxGetLocalTime}{wxgetlocaltime}\\ \helpref{wxGetMousePosition}{wxgetmouseposition}\\ +\helpref{wxGetMouseState}{wxgetmousestate}\\ \helpref{wxGetMultipleChoices}{wxgetmultiplechoices}\\ \helpref{wxGetMultipleChoice}{wxgetmultiplechoice}\\ \helpref{wxGetNumberFromUser}{wxgetnumberfromuser}\\ @@ -193,8 +204,8 @@ the corresponding topic. \helpref{wxON\_BLOCK\_EXIT\_OBJ}{wxonblockexitobj}\\ \helpref{wxOpenClipboard}{wxopenclipboard}\\ \helpref{wxParseCommonDialogsFilter}{wxparsecommondialogsfilter}\\ -\helpref{wxDirExists}{functionwxdirexists}\\ \helpref{wxPathOnly}{wxpathonly}\\ +\helpref{wxPLURAL}{wxplural}\\ \helpref{wxPostDelete}{wxpostdelete}\\ \helpref{wxPostEvent}{wxpostevent}\\ \helpref{wxRegisterClipboardFormat}{wxregisterclipboardformat}\\ @@ -229,13 +240,17 @@ the corresponding topic. \helpref{wxStricmp}{wxstricmp}\\ \helpref{wxStringEq}{wxstringeq}\\ \helpref{wxStringMatch}{wxstringmatch}\\ +\helpref{wxStringTokenize}{wxstringtokenize}\\ \helpref{wxStripMenuCodes}{wxstripmenucodes}\\ \helpref{wxStrlen}{wxstrlen}\\ +\helpref{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}{wxsuppressgccprivatedtorwarning}\\ \helpref{wxSysErrorCode}{wxsyserrorcode}\\ \helpref{wxSysErrorMsg}{wxsyserrormsg}\\ \helpref{wxT}{wxt}\\ -\helpref{wxTraceLevel}{wxtracelevel}\\ \helpref{wxTrace}{wxtrace}\\ +\helpref{WXTRACE}{trace}\\ +\helpref{wxTraceLevel}{wxtracelevel}\\ +\helpref{WXTRACELEVEL}{tracelevel}\\ \helpref{wxTransferFileToStream}{wxtransferfiletostream}\\ \helpref{wxTransferStreamToFile}{wxtransferstreamtofile}\\ \helpref{wxTrap}{wxtrap}\\ @@ -252,9 +267,10 @@ the corresponding topic. \helpref{wx\_const\_cast}{wxconstcastraw}\\ \helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}\\ \helpref{wx\_static\_cast}{wxstaticcastraw}\\ +\helpref{wx\_truncate\_cast}{wxtruncatecast}\\ \helpref{\_}{underscore}\\ -\helpref{wxPLURAL}{wxplural}\\ \helpref{\_T}{underscoret} +\helpref{\_\_WXFUNCTION\_\_}{wxfunction} @@ -588,7 +604,7 @@ happening, i.e. with this flag the child process window will be shown normally. Under Unix the flag {\tt wxEXEC\_MAKE\_GROUP\_LEADER} may be used to ensure that the new process is a group leader (this will create a new session if needed). Calling \helpref{wxKill}{wxkill} passing wxKILL\_CHILDREN will -will kill this process as well as all of its children (except those which have +kill this process as well as all of its children (except those which have started their own session). Finally, you may use the third overloaded version of this function to execute @@ -1070,7 +1086,9 @@ Returns the directory part of the filename. \membersection{::wxUnix2DosFilename}\label{wxunix2dosfilename} -\func{void}{wxUnix2DosFilename}{\param{const wxString\& }{s}} +\func{void}{wxUnix2DosFilename}{\param{wxChar *}{s}} + +This function is deprecated, use \helpref{wxFileName}{wxfilename} instead. Converts a Unix to a DOS filename by replacing forward slashes with backslashes. @@ -1118,7 +1136,7 @@ Returns a string containing the current (or working) directory. \func{wxString}{wxGetWorkingDirectory}{\param{char *}{buf=NULL}, \param{int }{sz=1000}} -{\bf NB:} This function is obsolete: use \helpref{wxGetCwd}{wxgetcwd} instead. +{\bf NB:} This function is deprecated: use \helpref{wxGetCwd}{wxgetcwd} instead. Copies the current working directory into the buffer if supplied, or copies the working directory into new storage (which you {\emph must} delete @@ -1197,10 +1215,14 @@ Removes \arg{file}, returning true if successful. \membersection{::wxRenameFile}\label{wxrenamefile} -\func{bool}{wxRenameFile}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2}} +\func{bool}{wxRenameFile}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2}, \param{bool }{overwrite = true}} Renames \arg{file1} to \arg{file2}, returning true if successful. +If \arg{overwrite} parameter is true (default), the destination file is +overwritten if it exists, but if \arg{overwrite} is false, the functions fails +in this case. + \membersection{::wxRmdir}\label{wxrmdir} @@ -1328,7 +1350,8 @@ Return the (current) user's home directory. \wxheading{See also} -\helpref{wxGetUserHome}{wxgetuserhome} +\helpref{wxGetUserHome}{wxgetuserhome}\\ +\helpref{wxStandardPaths}{wxstandardpaths} \wxheading{Include files} @@ -1509,24 +1532,24 @@ 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: as above, \arg{str} +other language. It takes two extra arguments: as above, \arg{str} parameter must contain the singular form of the string to be converted and is 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}. -See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} +See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling. For a shorter alternative see the \helpref{wxPLURAL()}{wxplural} macro. Both versions call \helpref{wxLocale::GetString}{wxlocalegetstring}. Note that this function is not suitable for literal strings in Unicode -builds, since the literal strings must be enclosed into +builds, since the literal strings must be enclosed into \helpref{\_T()}{underscoret} or \helpref{wxT}{wxt} macro which makes them unrecognised by \texttt{xgettext}, and so they are not extracted to the message -catalog. Instead, use the \helpref{\_()}{underscore} and +catalog. Instead, use the \helpref{\_()}{underscore} and \helpref{wxPLURAL}{wxplural} macro for all literal strings. @@ -1560,6 +1583,19 @@ This function complements the standard C function {\it strcmp()} which performs case-sensitive comparison. +\membersection{::wxStringEq}\label{wxstringeq} + +\func{bool}{wxStringEq}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2}} + +{\bf NB:} This function is obsolete, use \helpref{wxString}{wxstring} instead. + +A macro defined as: + +\begin{verbatim} +#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0)) +\end{verbatim} + + \membersection{::wxStringMatch}\label{wxstringmatch} \func{bool}{wxStringMatch}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2},\\ @@ -1572,17 +1608,19 @@ ignoring case if {\it exact} is false. If {\it subString} is \false, no substring matching is done. -\membersection{::wxStringEq}\label{wxstringeq} +\membersection{::wxStringTokenize}\label{wxstringtokenize} -\func{bool}{wxStringEq}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2}} +\func{wxArrayString}{wxStringTokenize}{\param{const wxString\& }{str},\\ + \param{const wxString\& }{delims = wxDEFAULT\_DELIMITERS},\\ + \param{wxStringTokenizerMode }{mode = wxTOKEN\_DEFAULT}} -{\bf NB:} This function is obsolete, use \helpref{wxString}{wxstring} instead. +This is a convenience function wrapping +\helpref{wxStringTokenizer}{wxstringtokenizer} which simply returns all tokens +found in the given \arg{str} in an array. -A macro defined as: - -\begin{verbatim} -#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0)) -\end{verbatim} +Please see +\helpref{wxStringTokenizer::wxStringTokenizer}{wxstringtokenizerwxstringtokenizer} +for the description of the other parameters. \membersection{::wxStrlen}\label{wxstrlen} @@ -1824,7 +1862,9 @@ If path is empty, the current directory will be used. If filename is empty, no default filename will be supplied. The wildcard determines what files are displayed in the file selector, and file extension supplies a type extension for the required filename. Flags may be a combination of wxOPEN, -wxSAVE, wxOVERWRITE\_PROMPT, wxFILE\_MUST\_EXIST, wxMULTIPLE or 0. +wxSAVE, wxOVERWRITE\_PROMPT or wxFILE\_MUST\_EXIST. Note that wxMULTIPLE +can only be used with \helpref{wxFileDialog}{wxfiledialog} and not here as this +function only returns a single file name. Both the Unix and Windows versions implement a wildcard filter. Typing a filename containing wildcards (*, ?) in the filename text item, and @@ -1872,7 +1912,7 @@ See also \helpref{wxIsBusy}{wxisbusy}, \helpref{wxBusyCursor}{wxbusycursor}. \membersection{::wxGetColourFromUser}\label{wxgetcolourfromuser} -\func{wxColour}{wxGetColourFromUser}{\param{wxWindow *}{parent}, \param{const wxColour\& }{colInit}} +\func{wxColour}{wxGetColourFromUser}{\param{wxWindow *}{parent}, \param{const wxColour\& }{colInit}, \param{const wxString\& }{caption = wxEmptyString}} Shows the colour selection dialog and returns the colour selected by user or invalid colour (use \helpref{wxColour::Ok}{wxcolourok} to test whether a colour @@ -1884,6 +1924,8 @@ is valid) if the dialog was cancelled. \docparam{colInit}{If given, this will be the colour initially selected in the dialog.} +\docparam{caption}{If given, this will be used for the dialog caption.} + \wxheading{Include files} @@ -1891,7 +1933,7 @@ is valid) if the dialog was cancelled. \membersection{::wxGetFontFromUser}\label{wxgetfontfromuser} -\func{wxFont}{wxGetFontFromUser}{\param{wxWindow *}{parent}, \param{const wxFont\& }{fontInit}} +\func{wxFont}{wxGetFontFromUser}{\param{wxWindow *}{parent}, \param{const wxFont\& }{fontInit}, \param{const wxString\& }{caption = wxEmptyString}} Shows the font selection dialog and returns the font selected by user or invalid font (use \helpref{wxFont::Ok}{wxfontok} to test whether a font @@ -1903,6 +1945,8 @@ is valid) if the dialog was cancelled. \docparam{fontInit}{If given, this will be the font initially selected in the dialog.} +\docparam{caption}{If given, this will be used for the dialog caption.} + \wxheading{Include files} @@ -2162,7 +2206,7 @@ following identifiers: \begin{twocollist}\itemsep=0pt \twocolitem{wxYES\_NO}{Puts Yes and No buttons on the message box. May be combined with wxCANCEL.} -\twocolitem{wxCANCEL}{Puts a Cancel button on the message box. May be combined with +\twocolitem{wxCANCEL}{Puts a Cancel button on the message box. May only be combined with wxYES\_NO or wxOK.} \twocolitem{wxOK}{Puts an Ok button on the message box. May be combined with wxCANCEL.} \twocolitem{wxICON\_EXCLAMATION}{Displays an exclamation mark symbol.} @@ -2552,7 +2596,7 @@ Empties the clipboard. \membersection{::wxEnumClipboardFormats}\label{wxenumclipboardformats} -\func{int}{wxEnumClipboardFormats}{\param{int}{dataFormat}} +\func{int}{wxEnumClipboardFormats}{\param{int}{ dataFormat}} Enumerates the formats found in a list of available formats that belong to the clipboard. Each call to this function specifies a known @@ -2573,7 +2617,7 @@ wxOpenClipboard function. \membersection{::wxGetClipboardData}\label{wxgetclipboarddata} -\func{wxObject *}{wxGetClipboardData}{\param{int}{dataFormat}} +\func{wxObject *}{wxGetClipboardData}{\param{int}{ dataFormat}} Gets data from the clipboard. @@ -2589,7 +2633,7 @@ The clipboard must have previously been opened for this call to succeed. \membersection{::wxGetClipboardFormatName}\label{wxgetclipboardformatname} -\func{bool}{wxGetClipboardFormatName}{\param{int}{dataFormat}, \param{const wxString\& }{formatName}, \param{int}{maxCount}} +\func{bool}{wxGetClipboardFormatName}{\param{int}{ dataFormat}, \param{const wxString\& }{formatName}, \param{int}{ maxCount}} Gets the name of a registered clipboard format, and puts it into the buffer {\it formatName} which is of maximum length {\it maxCount}. {\it dataFormat} must not specify a predefined clipboard format. @@ -2597,7 +2641,7 @@ length {\it maxCount}. {\it dataFormat} must not specify a predefined clipboard \membersection{::wxIsClipboardFormatAvailable}\label{wxisclipboardformatavailable} -\func{bool}{wxIsClipboardFormatAvailable}{\param{int}{dataFormat}} +\func{bool}{wxIsClipboardFormatAvailable}{\param{int}{ dataFormat}} Returns true if the given data format is available on the clipboard. @@ -2618,7 +2662,7 @@ Registers the clipboard data format name and returns an identifier. \membersection{::wxSetClipboardData}\label{wxsetclipboarddata} -\func{bool}{wxSetClipboardData}{\param{int}{dataFormat}, \param{wxObject *}{data}, \param{int}{width}, \param{int}{height}} +\func{bool}{wxSetClipboardData}{\param{int}{ dataFormat}, \param{wxObject*}{ data}, \param{int}{ width}, \param{int}{ height}} Passes data to the clipboard. @@ -2634,8 +2678,6 @@ Passes data to the clipboard. The clipboard must have previously been opened for this call to succeed. - - \section{Miscellaneous functions}\label{miscellany} @@ -2787,7 +2829,7 @@ details. \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} +This family of macros is similar to \helpref{wxON\_BLOCK\_EXIT}{wxonblockexit} but calls a method of the given object instead of a free function. \wxheading{Include files} @@ -2840,7 +2882,7 @@ See also \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEClient}{wxddeclient}, \membersection{::wxEnableTopLevelWindows}\label{wxenabletoplevelwindows} -\func{void}{wxEnableTopLevelWindow}{\param{bool}{ enable = true}} +\func{void}{wxEnableTopLevelWindows}{\param{bool}{ enable = true}} This function enables or disables all top level windows. It is used by \helpref{::wxSafeYield}{wxsafeyield}. @@ -2917,7 +2959,8 @@ and current pointer position in screen coordinates. \func{wxWindow *}{wxGetActiveWindow}{\void} -Gets the currently active window (Windows only). +Gets the currently active window (implemented for MSW and GTK only currently, +always returns \NULL in the other ports). \wxheading{Include files} @@ -2975,6 +3018,55 @@ Returns the mouse position in screen coordinates. +\membersection{::wxGetMouseState}\label{wxgetmousestate} + +\func{wxMouseState}{wxGetMouseState}{\void} + +Returns the current state of the mouse. Returns a wxMouseState +instance that contains the current position of the mouse pointer in +screen coordinants, as well as boolean values indicating the up/down +status of the mouse buttons and the modifier keys. + +\wxheading{Include files} + + + +wxMouseState has the following interface: + +\begin{verbatim} +class wxMouseState +{ +public: + wxMouseState(); + + wxCoord GetX(); + wxCoord GetY(); + + bool LeftDown(); + bool MiddleDown(); + bool RightDown(); + + bool ControlDown(); + bool ShiftDown(); + bool AltDown(); + bool MetaDown(); + bool CmdDown(); + + void SetX(wxCoord x); + void SetY(wxCoord y); + + void SetLeftDown(bool down); + void SetMiddleDown(bool down); + void SetRightDown(bool down); + + void SetControlDown(bool down); + void SetShiftDown(bool down); + void SetAltDown(bool down); + void SetMetaDown(bool down); +}; +\end{verbatim} + + \membersection{::wxGetResource}\label{wxgetresource} \func{bool}{wxGetResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, @@ -3012,7 +3104,7 @@ See also \helpref{wxWriteResource}{wxwriteresource}, \helpref{wxConfigBase}{wxco \membersection{::wxGetStockLabel}\label{wxgetstocklabel} -\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{wxString }{accelerator = wxEmptyString}} +\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{const wxString\& }{accelerator = wxEmptyString}} Returns label that should be used for given {\it id} element. @@ -3046,16 +3138,19 @@ frame or dialog containing it, or {\tt NULL}. \membersection{::wxLaunchDefaultBrowser}\label{wxlaunchdefaultbrowser} -\func{bool}{wxLaunchDefaultBrowser}{\param{const wxString\& }{sUrl}} +\func{bool}{wxLaunchDefaultBrowser}{\param{const wxString\& }{url}, \param{int }{flags = $0$}} -Launches the user's default browser and tells it to open the location at {\tt sUrl}. +Open the \arg{url} in user's default browser. If \arg{flags} parameter contains +\texttt{wxBROWSER\_NEW\_WINDOW} flag, a new window is opened for the URL +(currently this is only supported under Windows). -Returns true if the application was successfully launched. +Returns \true if the application was successfully launched. \wxheading{Include files} + \membersection{::wxLoadUserResource}\label{wxloaduserresource} \func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}} @@ -3145,6 +3240,36 @@ as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows). +\membersection{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}\label{wxsuppressgccprivatedtorwarning} + +\func{}{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}{\param{}{name}} + +GNU C++ compiler gives a warning for any class whose destructor is private +unless it has a friend. This warning may sometimes be useful but it doesn't +make sense for reference counted class which always delete themselves (hence +destructor should be private) but don't necessarily have any friends, so this +macro is provided to disable the warning in such case. The \arg{name} parameter +should be the name of the class but is only used to construct a unique friend +class name internally. Example of using the macro: + +\begin{verbatim} + class RefCounted + { + public: + RefCounted() { m_nRef = 1; } + void IncRef() { m_nRef++ ; } + void DecRef() { if ( !--m_nRef ) delete this; } + + private: + ~RefCounted() { } + + wxSUPPRESS_GCC_PRIVATE_DTOR(RefCounted) + }; +\end{verbatim} + +Notice that there should be no semicolon after this macro. + + \membersection{wxULL}\label{wxull} \func{wxLongLong\_t}{wxULL}{\param{}{number}} @@ -3169,7 +3294,7 @@ allows to define unsigned 64 bit compile time constants: \membersection{wxVaCopy}\label{wxvacopy} -\func{void}{wxVaCopy}{\param{va\_list }{argptrDst}, \param{va\_list}{argptrSrc}} +\func{void}{wxVaCopy}{\param{va\_list }{argptrDst}, \param{va\_list}{ argptrSrc}} This macro is the same as the standard C99 \texttt{va\_copy} for the compilers which support it or its replacement for those that don't. It must be used to @@ -3212,6 +3337,15 @@ See also \helpref{wxGetResource}{wxgetresource}, \helpref{wxConfigBase}{wxconfig +\membersection{\_\_WXFUNCTION\_\_}\label{wxfunction} + +\func{}{\_\_WXFUNCTION\_\_}{\void} + +This macro expands to the name of the current function if the compiler supports +any of \texttt{\_\_FUNCTION\_\_}, \texttt{\_\_func\_\_} or equivalent variables +or macros or to \NULL if none of them is available. + + \section{Byte order macros}\label{byteordermacros} @@ -3371,7 +3505,7 @@ dynamically. The same as DECLARE\_ABSTRACT\_CLASS. Used inside a class declaration to make the class known to wxWidgets RTTI system and also declare that the objects of this class should be dynamically creatable from run-time type information. Notice that this implies that the -class should have a default constructor, if this is not the case consider using +class should have a default constructor, if this is not the case consider using \helpref{DECLARE\_CLASS}{declareclass}. Example: @@ -3662,9 +3796,21 @@ star is not appended to it. \wxheading{See also} \helpref{wx\_const\_cast}{wxconstcastraw},\\ -\helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw} +\helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw},\\ +\helpref{wx\_truncate\_cast}{wxtruncatecast} +\membersection{wx\_truncate\_cast}\label{wxtruncatecast} + +\func{T}{wx\_truncate\_cast}{T, x} + +This case doesn't correspond to any standard cast but exists solely to make +casts which possibly result in a truncation of an integer value more readable. + +\wxheading{See also} + +\helpref{wx\_static\_cast}{wxstaticcastraw} + \section{Log functions}\label{logfunctions} @@ -4181,7 +4327,7 @@ compilation error messages if the condition they check fail. \membersection{::wxOnAssert}\label{wxonassert} -\func{void}{wxOnAssert}{\param{const char *}{fileName}, \param{int}{ lineNumber}, \param{const char *}{cond}, \param{const char *}{msg = NULL}} +\func{void}{wxOnAssert}{\param{const char *}{fileName}, \param{int}{ lineNumber}, \param{const char *}{func}, \param{const char *}{cond}, \param{const char *}{msg = NULL}} This function is called whenever one of debugging macros fails (i.e. condition is false in an assertion). It is only defined in the debug mode, in release @@ -4190,7 +4336,7 @@ builds the \helpref{wxCHECK}{wxcheck} failures don't result in anything. To override the default behaviour in the debug builds which is to show the user a dialog asking whether he wants to abort the program, continue or continue ignoring any subsequent assert failures, you may override -\helpref{wxApp::OnAssert}{wxapponassert} which is called by this function if +\helpref{wxApp::OnAssertFailure}{wxapponassertfailure} which is called by this function if the global application object exists. @@ -4439,4 +4585,3 @@ Removes the variable {\it var} from the environment. function. Returns \true on success. -