]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/function.tex
implemented IsItemEnabled/Shown()
[wxWidgets.git] / docs / latex / wx / function.tex
index a60ff273fede339a632c8e4c14ac99a46c3e8b33..0c2607b30348f0c25a8e72ae5d9e0bc12bbd5dd7 100644 (file)
@@ -243,6 +243,7 @@ the corresponding topic.
 \helpref{wxStringTokenize}{wxstringtokenize}\\
 \helpref{wxStripMenuCodes}{wxstripmenucodes}\\
 \helpref{wxStrlen}{wxstrlen}\\
+\helpref{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}{wxsuppress\_gcc\_private\_dtor\_warning}\\
 \helpref{wxSysErrorCode}{wxsyserrorcode}\\
 \helpref{wxSysErrorMsg}{wxsyserrormsg}\\
 \helpref{wxT}{wxt}\\
@@ -601,7 +602,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
@@ -3177,6 +3178,36 @@ as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows).
 <wx/utils.h>
 
 
+\membersection{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}{wxsuppress\_gcc\_private\_dtor\_warning}\\
+
+\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}}