]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/process.tex
fall back on text value if no long/double value could be retrieved from the cell
[wxWidgets.git] / docs / latex / wx / process.tex
... / ...
CommitLineData
1\section{\class{wxProcess}}\label{wxprocess}
2
3The objects of this class are used in conjunction with
4\helpref{wxExecute}{wxexecute} function. When a wxProcess object is passed to
5wxExecute(), its \helpref{OnTerminate()}{wxprocessonterminate} virtual method
6is called when the process terminates. This allows the program to be
7(asynchronously) notified about the process termination and also retrieve its
8exit status which is unavailable from wxExecute() in the case of
9asynchronous execution.
10
11Please note that if the process termination notification is processed by the
12parent, it is responsible for deleting the wxProcess object which sent it.
13However, if it is not processed, the object will delete itself and so the
14library users should only delete those objects whose notifications have been
15processed (and call \helpref{Detach()}{wxprocessdetach} for others).
16
17\wxheading{Derived from}
18
19\helpref{wxEvtHandler}{wxevthandler}
20
21\wxheading{Include files}
22
23<wx/process.h>
24
25\latexignore{\rtfignore{\wxheading{Members}}}
26
27\membersection{wxProcess::wxProcess}\label{wxprocessconstr}
28
29\func{}{wxProcess}{\param{wxEvtHandler *}{ parent = NULL}, \param{int}{ id = -1}}
30
31Constructs a process object. {\it id} is only used in the case you want to
32use wxWindows events. It identifies this object, or another window that will
33receive the event.
34
35If the {\it parent} parameter is different from NULL, it will receive
36a wxEVT\_END\_PROCESS notification event (you should insert EVT\_END\_PROCESS
37macro in the event table of the parent to handle it) with the given {\it id}.
38
39\wxheading{Parameters}
40
41\docparam{parent}{The event handler parent.}
42
43\docparam{id}{id of an event.}
44
45\membersection{wxProcess::\destruct{wxProcess}}
46
47\func{}{\destruct{wxProcess}}{\void}
48
49Destroys the wxProcess object.
50
51\membersection{wxProcess::Detach}\label{wxprocessdetach}
52
53\func{void}{Detach}{\void}
54
55Normally, a wxProcess object is deleted by its parent when it receives the
56notification about the process termination. However, it might happen that the
57parent object is destroyed before the external process is terminated (e.g. a
58window from which this external process was launched is closed by the user)
59and in this case it {\bf should not delete} the wxProcess object, but
60{\bf should call Detach()} instead. After the wxProcess object is detached
61from its parent, no notification events will be sent to the parent and the
62object will delete itself upon reception of the process termination
63notification.
64
65\membersection{wxProcess::OnTerminate}\label{wxprocessonterminate}
66
67\constfunc{void}{OnTerminate}{\param{int}{ pid}, \param{int}{ status}}
68
69It is called when the process with the pid {\it pid} finishes.
70It raises a wxWindows event when it isn't overriden.
71
72\docparam{pid}{The pid of the process which has just terminated.}
73
74\docparam{status}{The exit code of the process.}
75