]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/function.tex
don't remove the old tags of different kinds when setting new style, this removes...
[wxWidgets.git] / docs / latex / wx / function.tex
index 47d46b1b40c634db6d6d7e4e2e32fd038c2e05a2..8fd8b09c791f77a244b0a6f260d3aaca8b2684e8 100644 (file)
@@ -58,7 +58,6 @@ the corresponding topic.
 \helpref{wxCONCAT}{wxconcat}\\
 \helpref{wxConcatFiles}{wxconcatfiles}\\
 \helpref{wxConstCast}{wxconstcast}\\
-\helpref{wxCoordRound}{wxcoordround}\\
 \helpref{wxCopyFile}{wxcopyfile}\\
 \helpref{wxCreateDynamicObject}{wxcreatedynamicobject}\\
 \helpref{wxCreateFileTipProvider}{wxcreatefiletipprovider}\\
@@ -134,7 +133,6 @@ the corresponding topic.
 \helpref{wxGetMousePosition}{wxgetmouseposition}\\
 \helpref{wxGetMouseState}{wxgetmousestate}\\
 \helpref{wxGetMultipleChoices}{wxgetmultiplechoices}\\
-\helpref{wxGetMultipleChoice}{wxgetmultiplechoice}\\
 \helpref{wxGetNumberFromUser}{wxgetnumberfromuser}\\
 \helpref{wxGetOSDirectory}{wxgetosdirectory}\\
 \helpref{wxGetOsDescription}{wxgetosdescription}\\
@@ -181,6 +179,7 @@ the corresponding topic.
 \helpref{wxIsPlatformLittleEndian}{wxisplatformlittleendian}\\
 \helpref{wxIsPlatform64Bit}{wxisplatform64bit}\\
 \helpref{wxIsWild}{wxiswild}\\
+\helpref{wxJoin}{wxjoin}\\
 \helpref{wxKill}{wxkill}\\
 \helpref{wxLaunchDefaultBrowser}{wxlaunchdefaultbrowser}\\
 \helpref{wxLEAVE\_CRIT\_SECT}{wxleavecritsect}\\
@@ -240,6 +239,7 @@ the corresponding topic.
 \helpref{wxShutdown}{wxshutdown}\\
 \helpref{wxSleep}{wxsleep}\\
 \helpref{wxSnprintf}{wxsnprintf}\\
+\helpref{wxSplit}{wxsplit}\\
 \helpref{wxSplitPath}{wxsplitfunction}\\
 \helpref{wxStartTimer}{wxstarttimer}\\
 \helpref{wxStaticCast}{wxstaticcast}\\
@@ -313,10 +313,10 @@ and so normally is not useful.
 
 \membersection{wxCHECK\_GCC\_VERSION}\label{wxcheckgccversion}
 
-\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor, release}}
+\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor}}
 
 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
+compiler (g++) version major.minor or greater. Otherwise, and also if
 the compiler is not GNU C++ at all, returns $0$.
 
 
@@ -696,6 +696,23 @@ application. See \helpref{wxCloseEvent}{wxcloseevent} and \helpref{wxApp}{wxapp}
 <wx/app.h>
 
 
+\membersection{::wxJoin}\label{wxjoin}
+
+\func{wxString}{wxJoin}{\param{const wxArrayString\&}{ arr}, \param{const wxChar}{ sep}, \param{const wxChar}{ escape = '$\backslash$'}}
+
+Concatenate all lines of the given \helpref{wxArrayString}{wxarraystring} object using the separator \arg{sep} and returns
+the result as a \helpref{wxString}{wxstring}.
+
+If the \arg{escape} character is non-\NULL, then it's used as prefix for each occurrence of \arg{sep}
+in the strings contained in \arg{arr} before joining them which is necessary
+in order to be able to recover the original array contents from the string
+later using \helpref{wxSplit}{wxsplit}.
+
+\wxheading{Include files}
+
+<wx/arrstr.h>
+
+
 \membersection{::wxKill}\label{wxkill}
 
 \func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig = wxSIGTERM}, \param{wxKillError }{*rc = NULL}, \param{int }{flags = 0}}
@@ -997,7 +1014,8 @@ Returns true if the file exists and is a plain file.
 
 Returns time of last modification of given file.
 
-The return value is $0$ if an error occured (e.g. file not found).
+The function returns \texttt{(time\_t)}$-1$ if an error occurred (e.g. file not
+found).
 
 
 \membersection{::wxFileNameFromPath}\label{wxfilenamefrompath}
@@ -1067,8 +1085,8 @@ directory doesn't exist).
 
 \wxheading{Portability}
 
-This function is implemented for Win32,
-Mac OS and generic Unix provided the system has {\tt statfs()} function.
+The generic Unix implementation depends on the system having
+the \texttt{statfs()} or \texttt{statvfs()} function.
 
 This function first appeared in wxWidgets 2.3.2.
 
@@ -1114,7 +1132,7 @@ or drive name at the beginning.
 
 \membersection{::wxDirExists}\label{functionwxdirexists}
 
-\func{bool}{wxDirExists}{\param{const wxChar *}{dirname}}
+\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}}
 
 Returns true if \arg{dirname} exists and is a directory.
 
@@ -1274,6 +1292,11 @@ Removes the directory {\it dir}, returning true if successful. Does not work und
 
 The {\it flags} parameter is reserved for future use.
 
+Please notice that there is also a wxRmDir() function which simply wraps the
+standard POSIX rmdir() function and so return an integer error code instead of
+a boolean value (but otherwise is currently identical to wxRmdir), don't
+confuse these two functions.
+
 
 \membersection{::wxSetWorkingDirectory}\label{wxsetworkingdirectory}
 
@@ -1283,6 +1306,27 @@ Sets the current working directory, returning true if the operation succeeded.
 Under MS Windows, the current drive is also changed if {\it dir} contains a drive specification.
 
 
+\membersection{::wxSplit}\label{wxsplit}
+
+\func{wxArrayString}{wxSplit}{\param{const wxString\&}{ str}, \param{const wxChar}{ sep}, \param{const wxChar}{ escape = '\\'}}
+
+Splits the given \helpref{wxString}{wxstring} object using the separator \arg{sep} and returns the
+result as a \helpref{wxArrayString}{wxarraystring}.
+
+If the \arg{escape} character is non-\NULL, then the occurrences of \arg{sep} immediately prefixed
+with \arg{escape} are not considered as separators.
+
+Note that empty tokens will be generated if there are two or more adjacent separators.
+
+\wxheading{See also}
+
+\helpref{wxJoin}{wxjoin}
+
+\wxheading{Include files}
+
+<wx/arrstr.h>
+
+
 \membersection{::wxSplitPath}\label{wxsplitfunction}
 
 \func{void}{wxSplitPath}{\param{const char *}{ fullname}, \param{wxString *}{ path}, \param{wxString *}{ name}, \param{wxString *}{ ext}}
@@ -1576,11 +1620,11 @@ This function is deprecated, use \helpref{wxString}{wxstring} class instead.
 
 \membersection{::wxGetTranslation}\label{wxgettranslation}
 
-\func{const wxChar *}{wxGetTranslation}{\param{const wxChar* }{str},
-  \param{const wxChar* }{domain = NULL}}
+\func{const wxString\& }{wxGetTranslation}{\param{const wxString\& }{str},
+  \param{const wxString\&  }{domain = wxEmptyString}}
 
-\func{const wxChar *}{wxGetTranslation}{\param{const wxChar* }{str}, \param{const wxChar* }{strPlural}, \param{size\_t }{n},
-  \param{const wxChar* }{domain = NULL}}
+\func{const wxString\& }{wxGetTranslation}{\param{const wxString\& }{str}, \param{const wxString\& }{strPlural}, \param{size\_t }{n},
+  \param{const wxString\&  }{domain = wxEmptyString}}
 
 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
@@ -1800,7 +1844,7 @@ even when \texttt{wxUSE\_PRINTF\_POS\_PARAMS} is 1.
 
 \membersection{\_}\label{underscore}
 
-\func{const wxChar *}{\_}{\param{const char *}{s}}
+\func{const wxString\&}{\_}{\param{const wxString\&}{s}}
 
 This macro expands into a call to \helpref{wxGetTranslation}{wxgettranslation}
 function, so it marks the message for the extraction by {\tt xgettext} just as
@@ -1812,7 +1856,7 @@ Don't confuse this macro with \helpref{\_T()}{underscoret}!
 
 \membersection{wxPLURAL}\label{wxplural}
 
-\func{const wxChar *}{wxPLURAL}{\param{const char *}{sing}, \param{const char *}{plur}, \param{size\_t}{n}}
+\func{const wxString\&}{wxPLURAL}{\param{const wxString\&}{sing}, \param{const wxString\&}{plur}, \param{size\_t}{n}}
 
 This macro is identical to \helpref{\_()}{underscore} but for the plural variant
 of \helpref{wxGetTranslation}{wxgettranslation}.
@@ -2183,33 +2227,6 @@ is centred; if false, the message is left-justified.
 <wx/textdlg.h>
 
 
-\membersection{::wxGetMultipleChoice}\label{wxgetmultiplechoice}
-
-\func{int}{wxGetMultipleChoice}{\param{const wxString\& }{message}, \param{const wxString\& }{caption}, \param{int}{ n}, \param{const wxString\& }{choices[]},\\
- \param{int }{nsel}, \param{int *}{selection},
- \param{wxWindow *}{parent = NULL}, \param{int}{ x = -1}, \param{int}{ y = -1},\\
- \param{bool}{ centre = true}, \param{int }{width=150}, \param{int }{height=200}}
-
-Pops up a dialog box containing a message, OK/Cancel buttons and a multiple-selection
-listbox. The user may choose one or more item(s) and press OK or Cancel.
-
-The number of initially selected choices, and array of the selected indices,
-are passed in; this array will contain the user selections on exit, with
-the function returning the number of selections. {\it selection} must be
-as big as the number of choices, in case all are selected.
-
-If Cancel is pressed, -1 is returned.
-
-{\it choices} is an array of {\it n} strings for the listbox.
-
-If {\it centre} is true, the message text (which may include new line characters)
-is centred; if false, the message is left-justified.
-
-\wxheading{Include files}
-
-<wx/choicdlg.h>
-
-
 \membersection{::wxGetSingleChoice}\label{wxgetsinglechoice}
 
 \func{wxString}{wxGetSingleChoice}{\param{const wxString\& }{message},\\
@@ -2848,20 +2865,6 @@ this language feature but still take advantage of it when it is available.
 
 
 
-\membersection{::wxCoordRound}\label{wxcoordround}
-
-\func{wxCoord}{wxCoordRound}{\param{const float\& }{f}}
-
-\func{wxCoord}{wxCoordRound}{\param{const double\& }{f}}
-
-Convert \em{f} to a wxCoord, using round-to-nearest. This is commonly used
-in scaling calculations.
-
-\wxheading{Include files}
-
-<wx/defs.h>
-
-
 \membersection{::wxGetKeyState}\label{wxgetkeystate}
 
 \func{bool}{wxGetKeyState}{\param{wxKeyCode }{key}}
@@ -2928,6 +2931,12 @@ printed. Example of using it:
 
 \func{long}{wxNewId}{\void}
 
+This function is deprecated as the ids generated by it can conflict with the
+ids defined by the user code, use \texttt{wxID\_ANY} to assign ids which are
+guaranteed to not conflict with the user-defined ids for the controls and menu
+items you create instead of using this function.
+
+
 Generates an integer identifier unique to this run of the program.
 
 \wxheading{Include files}
@@ -3104,7 +3113,7 @@ always returns \NULL in the other ports).
 
 \wxheading{Include files}
 
-<wx/windows.h>
+<wx/window.h>
 
 
 \membersection{::wxGetBatteryState}\label{wxgetbatterystate}
@@ -3286,6 +3295,10 @@ Open the \arg{url} in user's default browser. If \arg{flags} parameter contains
 
 Returns \true if the application was successfully launched.
 
+Note that for some configurations of the running user, the application which
+is launched to open the given URL may be URL-dependent (e.g. a browser may be used for
+local URLs while another one may be used for remote URLs).
+
 \wxheading{Include files}
 
 <wx/utils.h>