⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 5 页
字号:
the original value on scope exit. It works by declaring a variable which setsumask to \arg{mask} in its constructor and restores it in its destructor.Under other platforms this macro expands to nothing.\membersection{::wxConcatFiles}\label{wxconcatfiles}\func{bool}{wxConcatFiles}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2},\param{const wxString\& }{file3}}Concatenates {\it file1} and {\it file2} to {\it file3}, returningtrue if successful.\membersection{::wxCopyFile}\label{wxcopyfile}\func{bool}{wxCopyFile}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2}, \param{bool }{overwrite = true}}Copies {\it file1} to {\it file2}, returning true if successful. If{\it overwrite} parameter is true (default), the destination file is overwrittenif it exists, but if {\it overwrite} is false, the functions fails in thiscase.\membersection{::wxGetCwd}\label{wxgetcwd}\func{wxString}{wxGetCwd}{\void}Returns a string containing the current (or working) directory.\membersection{::wxGetWorkingDirectory}\label{wxgetworkingdirectory}\func{wxString}{wxGetWorkingDirectory}{\param{char *}{buf=NULL}, \param{int }{sz=1000}}{\bf NB:} This function is deprecated: use \helpref{wxGetCwd}{wxgetcwd} instead.Copies the current working directory into the buffer if supplied, orcopies the working directory into new storage (which you {\emph must} deleteyourself) if the buffer is NULL.{\it sz} is the size of the buffer if supplied.\membersection{::wxGetTempFileName}\label{wxgettempfilename}\func{char *}{wxGetTempFileName}{\param{const wxString\& }{prefix}, \param{char *}{buf=NULL}}\func{bool}{wxGetTempFileName}{\param{const wxString\& }{prefix}, \param{wxString\& }{buf}}%% Makes a temporary filename based on {\it prefix}, opens and closes the file,%% and places the name in {\it buf}. If {\it buf} is NULL, new store%% is allocated for the temporary filename using {\it new}.%%%% Under Windows, the filename will include the drive and name of the%% directory allocated for temporary files (usually the contents of the%% TEMP variable). Under Unix, the {\tt /tmp} directory is used.%%%% It is the application's responsibility to create and delete the file.{\bf NB:} These functions are obsolete, please use\rtfsp\helpref{wxFileName::CreateTempFileName}{wxfilenamecreatetempfilename}\rtfspinstead.\membersection{::wxIsWild}\label{wxiswild}\func{bool}{wxIsWild}{\param{const wxString\& }{pattern}}Returns true if the pattern contains wildcards. See \helpref{wxMatchWild}{wxmatchwild}.\membersection{::wxMatchWild}\label{wxmatchwild}\func{bool}{wxMatchWild}{\param{const wxString\& }{pattern}, \param{const wxString\& }{text}, \param{bool}{ dot\_special}}Returns true if the \arg{pattern}\/ matches the {\it text}\/; if {\itdot\_special}\/ is true, filenames beginning with a dot are not matchedwith wildcard characters. See \helpref{wxIsWild}{wxiswild}.\membersection{::wxMkdir}\label{wxmkdir}\func{bool}{wxMkdir}{\param{const wxString\& }{dir}, \param{int }{perm = 0777}}Makes the directory \arg{dir}, returning true if successful.{\it perm} is the access mask for the directory for the systems on which it issupported (Unix) and doesn't have any effect on the other ones.\membersection{::wxParseCommonDialogsFilter}\label{wxparsecommondialogsfilter}\func{int}{wxParseCommonDialogsFilter}{\param{const wxString\& }{wildCard}, \param{wxArrayString\& }{descriptions}, \param{wxArrayString\& }{filters}}Parses the \arg{wildCard}, returning the number of filters.Returns 0 if none or if there's a problem.The arrays will contain an equal number of items found before the error.On platforms where native dialogs handle only one filter per entry,entries in arrays are automatically adjusted.\arg{wildCard} is in the form:\begin{verbatim} "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"\end{verbatim}\membersection{::wxRemoveFile}\label{wxremovefile}\func{bool}{wxRemoveFile}{\param{const wxString\& }{file}}Removes \arg{file}, returning true if successful.\membersection{::wxRenameFile}\label{wxrenamefile}\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 isoverwritten if it exists, but if \arg{overwrite} is false, the functions failsin this case.\membersection{::wxRmdir}\label{wxrmdir}\func{bool}{wxRmdir}{\param{const wxString\& }{dir}, \param{int}{ flags=0}}Removes the directory {\it dir}, returning true if successful. Does not work under VMS.The {\it flags} parameter is reserved for future use.\membersection{::wxSetWorkingDirectory}\label{wxsetworkingdirectory}\func{bool}{wxSetWorkingDirectory}{\param{const wxString\& }{dir}}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{::wxSplitPath}\label{wxsplitfunction}\func{void}{wxSplitPath}{\param{const char *}{ fullname}, \param{wxString *}{ path}, \param{wxString *}{ name}, \param{wxString *}{ ext}}{\bf NB:} This function is obsolete, please use\helpref{wxFileName::SplitPath}{wxfilenamesplitpath} instead.This function splits a full file name into components: the path (including possible disk/drivespecification under Windows), the base name and the extension. Any of the output parameters({\it path}, {\it name} or {\it ext}) may be NULL if you are not interested in the value ofa particular component.wxSplitPath() will correctly handle filenames with both DOS and Unix path separators underWindows, however it will not consider backslashes as path separators under Unix (where backslashis a valid character in a filename).On entry, {\it fullname} should be non-NULL (it may be empty though).On return, {\it path} contains the file path (without the trailing separator), {\it name}contains the file name and {\it ext} contains the file extension without leading dot. Allthree of them may be empty if the corresponding component is. The old contents of thestrings pointed to by these parameters will be overwritten in any case (if the pointersare not NULL).\membersection{::wxTransferFileToStream}\label{wxtransferfiletostream}\func{bool}{wxTransferFileToStream}{\param{const wxString\& }{filename}, \param{ostream\& }{stream}}Copies the given file to {\it stream}. Useful when converting an old application touse streams (within the document/view framework, for example).\wxheading{Include files}<wx/docview.h>\membersection{::wxTransferStreamToFile}\label{wxtransferstreamtofile}\func{bool}{wxTransferStreamToFile}{\param{istream\& }{stream} \param{const wxString\& }{filename}}Copies the given stream to the file {\it filename}. Useful when converting an old application touse streams (within the document/view framework, for example).\wxheading{Include files}<wx/docview.h>\section{Network, user and OS functions}\label{networkfunctions}The functions in this section are used to retrieve information about thecurrent computer and/or user characteristics.\membersection{::wxGetEmailAddress}\label{wxgetemailaddress}\func{wxString}{wxGetEmailAddress}{\void}\func{bool}{wxGetEmailAddress}{\param{char * }{buf}, \param{int }{sz}}Copies the user's email address into the supplied buffer, byconcatenating the values returned by \helpref{wxGetFullHostName}{wxgetfullhostname}\rtfspand \helpref{wxGetUserId}{wxgetuserid}.Returns true if successful, false otherwise.\wxheading{Include files}<wx/utils.h>\membersection{::wxGetFreeMemory}\label{wxgetfreememory}\func{wxMemorySize}{wxGetFreeMemory}{\void}Returns the amount of free memory in bytes under environments whichsupport it, and -1 if not supported or failed to perform measurement.\wxheading{Include files}<wx/utils.h>\membersection{::wxGetFullHostName}\label{wxgetfullhostname}\func{wxString}{wxGetFullHostName}{\void}Returns the FQDN (fully qualified domain host name) or an empty string onerror.\wxheading{See also}\helpref{wxGetHostName}{wxgethostname}\wxheading{Include files}<wx/utils.h>\membersection{::wxGetHomeDir}\label{wxgethomedir}\func{wxString}{wxGetHomeDir}{\void}Return the (current) user's home directory.\wxheading{See also}\helpref{wxGetUserHome}{wxgetuserhome}\\\helpref{wxStandardPaths}{wxstandardpaths}\wxheading{Include files}<wx/utils.h>\membersection{::wxGetHostName}\label{wxgethostname}\func{wxString}{wxGetHostName}{\void}\func{bool}{wxGetHostName}{\param{char * }{buf}, \param{int }{sz}}Copies the current host machine's name into the supplied buffer. Please notethat the returned name is {\it not} fully qualified, i.e. it does not includethe domain name.Under Windows or NT, this function first looks in the environmentvariable SYSTEM\_NAME; if this is not found, the entry {\bf HostName}\rtfspin the {\bf wxWidgets} section of the WIN.INI file is tried.The first variant of this function returns the hostname if successful or anempty string otherwise. The second (deprecated) function returns trueif successful, false otherwise.\wxheading{See also}\helpref{wxGetFullHostName}{wxgetfullhostname}\wxheading{Include files}<wx/utils.h>\membersection{::wxGetOsDescription}\label{wxgetosdescription}\func{wxString}{wxGetOsDescription}{\void}Returns the string containing the description of the current platform in auser-readable form. For example, this function may return strings like{\tt Windows NT Version 4.0} or {\tt Linux 2.2.2 i386}.\wxheading{See also}\helpref{::wxGetOsVersion}{wxgetosversion}\wxheading{Include files}<wx/utils.h>\membersection{::wxGetOsVersion}\label{wxgetosversion}\func{wxOperatingSystemId}{wxGetOsVersion}{\param{int *}{major = NULL}, \param{int *}{minor = NULL}}Gets the version and the operating system ID for currently running OS.See \helpref{wxPlatformInfo}{wxplatforminfo} for more details about wxOperatingSystemId.\wxheading{See also}\helpref{::wxGetOsDescription}{wxgetosdescription},\helpref{wxPlatformInfo}{wxplatforminfo}\wxheading{Include files}<wx/utils.h>\membersection{::wxIsPlatformLittleEndian}\label{wxisplatformlittleendian}\func{bool}{wxIsPlatformLittleEndian}{\void}Returns \true if the current platform is little endian (instead of big endian).The check is performed at run-time.\wxheading{See also}\helpref{Byte order macros}{byteordermacros}\wxheading{Include files}<wx/utils.h>\membersection{::wxIsPlatform64Bit}\label{wxisplatform64bit}\func{bool}{wxIsPlatform64Bit}{\void}Returns \true if the operating system the program is running under is 64 bit.The check is performed at run-time and may differ from the value available atcompile-time (at compile-time you can just check if {\tt sizeof(void*)==8})since the program could be running in emulation mode or in a mixed 32/64 bit system(bi-architecture operating system).Very important: this function is not 100\% reliable on some systems given the factthat there isn't always a standard way to do a reliable check on the OS architecture.\wxheading{Include files}<wx/utils.h>\membersection{::wxGetUserHome}\label{wxgetuserhome}\func{const wxChar *}{wxGetUserHome}{\param{const wxString\& }{user = ""}}Returns the home directory for the given user. If the username is empty(default value), this function behaves like\helpref{wxGetHomeDir}{wxgethomedir}.\wxheading{Include files}<wx/utils.h>\membersection{::wxGetUserId}\label{wxgetuserid}\func{wxString}{wxGetUserId}{\void}\func{bool}{wxGetUserId}{\param{char * }{buf}, \param{int }{sz}}This function returns the "user id" also known as "login name" under Unix i.e.something like "jsmith". It uniquely identifies the current user (on this system).Under Windows or NT, this function first looks in the environmentvariables USER and LOGNAME; if neither of these is found, the entry {\bf UserId}\rtfspin the {\bf wxWidgets} section of the WIN.INI file is tried.The first variant of this function returns the login name if successful or anempty string otherwise. The second (deprecated) function returns true

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -