Split up wxStream doc files; added wxTCP... files; added wxBusyCursor;
added overloaded wxGetHostName etc. functions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
574c0bbfbd
commit
e2a6f23364
@ -278,6 +278,8 @@ If you used device context functions with wxPoint or wxIntPoint before, please n
|
||||
that wxPoint now contains integer members, and there is a new class wxRealPoint. wxIntPoint
|
||||
no longer exists.
|
||||
|
||||
wxMetaFile and wxMetaFileDC have been renamed to wxMetafile and wxMetafileDC.
|
||||
|
||||
\chapter{Miscellaneous}
|
||||
|
||||
\section{Strings}
|
||||
@ -327,14 +329,7 @@ Try to use the {\bf const} keyword in your own code where possible.
|
||||
Some wxWindows 1.xx functionality has been left to ease the transition to 2.0. This functionality
|
||||
(usually) only works if you compile with WXWIN\_COMPATIBILITY set to 1.
|
||||
|
||||
TODO
|
||||
|
||||
OnMenuCommand, OnSize, OnActivate, OnPaint, others?? can all be prefixed with Old (e.g. OldOnMenuCommand)
|
||||
and will work as before. You are encouraged to convert your code to the new forms, but
|
||||
this will allow you to get your applications up and running a little more quickly.
|
||||
|
||||
OnClose can be used as-is without an 'Old' prefix, but officially the OnCloseWindow event table handler should be
|
||||
used instead.
|
||||
Mostly this defines old names to be the new names (e.g. wxRectangle is defined to be wxRect).
|
||||
|
||||
\chapter{Quick reference}\label{quickreference}
|
||||
|
||||
|
@ -304,7 +304,7 @@ WX_DEFINE_OBJARRAY(wxArrayOfMyClass);
|
||||
|
||||
\membersection{WX\_CLEAR\_ARRAY}\label{wxcleararray}
|
||||
|
||||
\func{\void}{WX\_CLEAR\_ARRAY}{\param{wxArray\& }{array}}
|
||||
\func{void}{WX\_CLEAR\_ARRAY}{\param{wxArray\& }{array}}
|
||||
|
||||
This macro may be used to delete all elements of the array before emptying it.
|
||||
It can not be used with wxObjArrays - but they will delete their elements anyhow
|
||||
@ -312,9 +312,9 @@ when you call Empty().
|
||||
|
||||
\membersection{Default constructors}\label{wxarrayctordef}
|
||||
|
||||
\func{}{wxArray}{}
|
||||
\func{}{wxArray}{\void}
|
||||
|
||||
\func{}{wxObjArray}{}
|
||||
\func{}{wxObjArray}{\void}
|
||||
|
||||
Default constructor initializes an empty array object.
|
||||
|
||||
@ -359,17 +359,17 @@ done by wxArray and wxSortedArray versions - you may use
|
||||
|
||||
\membersection{wxArray::Add}\label{wxarrayadd}
|
||||
|
||||
\func{\void}{Add}{\param{T }{item}}
|
||||
\func{void}{Add}{\param{T }{item}}
|
||||
|
||||
\func{\void}{Add}{\param{T *}{item}}
|
||||
\func{void}{Add}{\param{T *}{item}}
|
||||
|
||||
\func{\void}{Add}{\param{T \&}{item}}
|
||||
\func{void}{Add}{\param{T \&}{item}}
|
||||
|
||||
Appends a new element to the array (where {\it T} is the type of the array
|
||||
elements.)
|
||||
|
||||
The first version is used with wxArray and wxSortedArray. The second and the
|
||||
third are used with wxObjArray. There is an {\bf important difference} between
|
||||
third are used with wxObjArray. There is an important difference between
|
||||
them: if you give a pointer to the array, it will take ownership of it, i.e.
|
||||
will delete it when the item is deleted from the array. If you give a reference
|
||||
to the array, however, the array will make a copy of the item and will not take
|
||||
@ -378,7 +378,7 @@ because the other array types never take ownership of their elements.
|
||||
|
||||
\membersection{wxArray::Alloc}\label{wxarrayalloc}
|
||||
|
||||
\func{\void}{Alloc}{\param{size\_t }{count}}
|
||||
\func{void}{Alloc}{\param{size\_t }{count}}
|
||||
|
||||
Preallocates memory for a given number of array elements. It is worth calling
|
||||
when the number of items which are going to be added to the array is known in
|
||||
@ -387,7 +387,7 @@ has enough memory for the given number of items, nothing happens.
|
||||
|
||||
\membersection{wxArray::Clear}\label{wxarrayclear}
|
||||
|
||||
\func{\void}{Clear}{\void}
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
This function does the same as \helpref{Empty()}{wxarrayempty} and additionally
|
||||
frees the memory allocated to the array.
|
||||
@ -410,11 +410,11 @@ pointer to the removed element.
|
||||
|
||||
\membersection{wxArray::Empty}\label{wxarrayempty}
|
||||
|
||||
\func{\void}{Empty}{\void}
|
||||
\func{void}{Empty}{\void}
|
||||
|
||||
Empties the array. For wxObjArray classes, this destroys all of the array
|
||||
elements. For wxArray and wxSortedArray this does nothing except marking the
|
||||
array of being empty - this function does not free the allocated memory, use
|
||||
array of being empty - this function does not free the allocated memory, use
|
||||
\helpref{Clear()}{wxarrayclear} for this.
|
||||
|
||||
\membersection{wxArray::GetCount}\label{wxarraygetcount}
|
||||
@ -443,14 +443,14 @@ parameter doesn't make sense for it).
|
||||
|
||||
\membersection{wxArray::Insert}\label{wxarrayinsert}
|
||||
|
||||
\func{\void}{Insert}{\param{T }{item}, \param{size\_t }{n}}
|
||||
\func{void}{Insert}{\param{T }{item}, \param{size\_t }{n}}
|
||||
|
||||
\func{\void}{Insert}{\param{T *}{item}, \param{size\_t }{n}}
|
||||
\func{void}{Insert}{\param{T *}{item}, \param{size\_t }{n}}
|
||||
|
||||
\func{\void}{Insert}{\param{T \&}{item}, \param{size\_t }{n}}
|
||||
\func{void}{Insert}{\param{T \&}{item}, \param{size\_t }{n}}
|
||||
|
||||
Insert a new item into the array before the item {\it n} - thus, {\it
|
||||
Insert(something, 0u}} will insert an item in such way that it will become the
|
||||
Insert a new item into the array before the item {\it n} - thus, {\it Insert(something, 0u)} will
|
||||
insert an item in such way that it will become the
|
||||
first array element.
|
||||
|
||||
Please see \helpref{Add()}{wxarrayadd} for explanation of the differences
|
||||
@ -458,7 +458,7 @@ between the overloaded versions of this function.
|
||||
|
||||
\membersection{wxArray::IsEmpty}\label{wxarrayisempty}
|
||||
|
||||
\constfunc{bool}{IsEmpty}{}
|
||||
\constfunc{bool}{IsEmpty}{\void}
|
||||
|
||||
Returns TRUE if the array is empty, FALSE otherwise.
|
||||
|
||||
@ -506,7 +506,7 @@ elements of a wxArray (supposed to contain pointers).
|
||||
|
||||
\membersection{wxArray::Shrink}\label{wxarrayshrink}
|
||||
|
||||
\func{\void}{Shrink}{\void}
|
||||
\func{void}{Shrink}{\void}
|
||||
|
||||
Frees all memory unused by the array. If the program knows that no new items
|
||||
will be added to the array it may call Shrink() to reduce its memory usage.
|
||||
@ -515,7 +515,7 @@ allocated again.
|
||||
|
||||
\membersection{wxArray::Sort}\label{wxarraysort}
|
||||
|
||||
\func{\void}{Sort}{\param{CMPFUNC<T> }{compareFunction}}
|
||||
\func{void}{Sort}{\param{CMPFUNC<T> }{compareFunction}}
|
||||
|
||||
The notation CMPFUNC<T> should be read as if we had the following declaration:
|
||||
|
||||
@ -523,7 +523,7 @@ The notation CMPFUNC<T> should be read as if we had the following declaration:
|
||||
template int CMPFUNC(T *first, T *second);
|
||||
\end{verbatim}
|
||||
|
||||
where {\it T} is the type of the array elements. I.e. it is a function returning
|
||||
where {\it T} is the type of the array elements. I.e. it is a function returning
|
||||
{\it int} which is passed two arguments of type {\it T *}.
|
||||
|
||||
Sorts the array using the specified compare function: this function should
|
||||
|
40
docs/latex/wx/busycurs.tex
Normal file
40
docs/latex/wx/busycurs.tex
Normal file
@ -0,0 +1,40 @@
|
||||
\section{\class{wxBusyCursor}}\label{wxbusycursor}
|
||||
|
||||
This class makes it easy to tell your user that the program is temporarily busy.
|
||||
Just create a wxBusyCursor object on the stack, and within the current scope,
|
||||
the hourglass will be shown.
|
||||
|
||||
For example:
|
||||
|
||||
\begin{verbatim}
|
||||
wxBusyCursor wait;
|
||||
|
||||
for (int i = 0; i < 100000; i++)
|
||||
DoACalculation();
|
||||
\end{verbatim}
|
||||
|
||||
It works by calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor} in the constructor,
|
||||
and \helpref{wxEndBusyCursor}{wxendbusycursor} in the destructor.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
None
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBeginBusyCursor}{wxbeginbusycursor}, \helpref{wxEndBusyCursor}{wxendbusycursor}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxBusyCursor::wxBusyCursor}
|
||||
|
||||
\func{}{wxBusyCursor}{\param{wxCursor*}{ cursor = wxHOURGLASS\_CURSOR}}
|
||||
|
||||
Constructs a busy cursor object, calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor}.
|
||||
|
||||
\membersection{wxBusyCursor::\destruct{wxBusyCursor}}
|
||||
|
||||
\func{}{\destruct{wxBusyCursor}}{\void}
|
||||
|
||||
Destroys the busy cursor object, calling \helpref{wxEndBusyCursor}{wxendbusycursor}.
|
||||
|
@ -123,7 +123,7 @@ by passing different device contexts.
|
||||
\twocolitem{\helpref{wxScreenDC}{wxscreendc}}{A device context to access the entire screen}
|
||||
\twocolitem{\helpref{wxDC}{wxdc}}{The device context base class}
|
||||
\twocolitem{\helpref{wxMemoryDC}{wxmemorydc}}{A device context for drawing into bitmaps}
|
||||
\twocolitem{\helpref{wxMetaFileDC}{wxmetafiledc}}{A device context for drawing into metafiles}
|
||||
\twocolitem{\helpref{wxMetafileDC}{wxmetafiledc}}{A device context for drawing into metafiles}
|
||||
\twocolitem{\helpref{wxPostScriptDC}{wxpostscriptdc}}{A device context for drawing into PostScript files}
|
||||
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{A device context for drawing to printers}
|
||||
\end{twocollist}
|
||||
@ -269,6 +269,9 @@ based on DDE.
|
||||
\twocolitem{\helpref{wxDDEClient}{wxddeclient}}{Represents a client}
|
||||
\twocolitem{\helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server}
|
||||
\twocolitem{\helpref{wxDDEServer}{wxddeserver}}{Represents a server}
|
||||
\twocolitem{\helpref{wxTCPClient}{wxtcpclient}}{Represents a client}
|
||||
\twocolitem{\helpref{wxTCPConnection}{wxtcpconnection}}{Represents the connection between a client and a server}
|
||||
\twocolitem{\helpref{wxTCPServer}{wxtcpserver}}{Represents a server}
|
||||
\twocolitem{\helpref{wxSocketClient}{wxsocketclient}}{Represents a socket client}
|
||||
\twocolitem{\helpref{wxSocketHandler}{wxsockethandler}}{Represents a socket handler}
|
||||
\twocolitem{\helpref{wxSocketServer}{wxsocketserver}}{Represents a socket server}
|
||||
|
@ -32,6 +32,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input app.tex
|
||||
\input array.tex
|
||||
\input autoobj.tex
|
||||
\input busycurs.tex
|
||||
\input button.tex
|
||||
\input bitmap.tex
|
||||
\input bbutton.tex
|
||||
@ -88,6 +89,8 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input fildrptg.tex
|
||||
\input filehist.tex
|
||||
\input filetype.tex
|
||||
\input fltinstr.tex
|
||||
\input fltoutst.tex
|
||||
\input focusevt.tex
|
||||
\input font.tex
|
||||
\input fontdlg.tex
|
||||
@ -105,6 +108,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input imaglist.tex
|
||||
\input ilayout.tex
|
||||
\input indlgevt.tex
|
||||
\input inputstr.tex
|
||||
\input joystick.tex
|
||||
\input joyevent.tex
|
||||
\input keyevent.tex
|
||||
@ -135,6 +139,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input notebook.tex
|
||||
\input noteevt.tex
|
||||
\input object.tex
|
||||
\input outptstr.tex
|
||||
\input pagedlg.tex
|
||||
\input paintdc.tex
|
||||
\input paintevt.tex
|
||||
@ -182,6 +187,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input wxstring.tex
|
||||
\input strlist.tex
|
||||
\input stream.tex
|
||||
\input strmbase.tex
|
||||
\input sysclevt.tex
|
||||
\input settings.tex
|
||||
\input tab.tex
|
||||
@ -193,6 +199,9 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input txtdrptg.tex
|
||||
\input valtext.tex
|
||||
\input tempfile.tex
|
||||
\input tcpclint.tex
|
||||
\input tcpconn.tex
|
||||
\input tcpservr.tex
|
||||
\input txtdatob.tex
|
||||
\input textfile.tex
|
||||
\input thread.tex
|
||||
|
@ -400,7 +400,7 @@ Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}).
|
||||
\func{bool}{GetPixel}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}}
|
||||
|
||||
Sets {\it colour} to the colour at the specified location. Windows only; an X implementation
|
||||
is being worked on. Not available for wxPostScriptDC or wxMetaFileDC.
|
||||
is being worked on. Not available for wxPostScriptDC or wxMetafileDC.
|
||||
|
||||
\membersection{wxDC::GetSize}\label{wxdcgetsize}
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
\section{\class{wxDDEClient}}\label{wxddeclient}
|
||||
|
||||
\overview{Interprocess communications overview}{ipcoverview}
|
||||
|
||||
A wxDDEClient object represents the client part of a client-server DDE
|
||||
(Dynamic Data Exchange) conversation (available in {\it both}\/
|
||||
Windows and UNIX).
|
||||
(Dynamic Data Exchange) conversation.
|
||||
|
||||
To create a client which can communicate with a suitable server,
|
||||
you need to derive a class from wxDDEConnection and another from wxDDEClient.
|
||||
@ -13,15 +10,19 @@ a `conversation' with a server, and the custom wxDDEServer is required
|
||||
so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return
|
||||
a wxDDEConnection of the required class, when a connection is made.
|
||||
|
||||
This DDE-based implementation is
|
||||
available on Windows only, but a platform-independent, socket-based version
|
||||
of this API is available using \helpref{wxTCPClient}{wxtcpclient}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxDDEObject
|
||||
wxClientBase\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
|
||||
the chapter on interprocess communication in the user manual, and
|
||||
the programs in {\tt samples/ipc}.
|
||||
\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
|
||||
\helpref{Interprocess communications overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
@ -33,7 +34,7 @@ Constructs a client object.
|
||||
|
||||
\membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection}
|
||||
|
||||
\func{wxDDEConnection *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
|
||||
\func{wxConnectionBase *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
|
||||
|
||||
Tries to make a connection with a server specified by the host
|
||||
(machine name under UNIX, ignored under Windows), service name (must
|
||||
@ -45,11 +46,11 @@ derived connection object.
|
||||
|
||||
\membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection}
|
||||
|
||||
\func{wxDDEConnection *}{OnMakeConnection}{\void}
|
||||
\func{wxConnectionBase *}{OnMakeConnection}{\void}
|
||||
|
||||
The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can
|
||||
be altered by deriving the {\bf OnMakeConnection} member to return your
|
||||
own derived connection object. By default, an ordinary wxDDEConnection
|
||||
own derived connection object. By default, a wxDDEConnection
|
||||
object is returned.
|
||||
|
||||
The advantage of deriving your own connection class is that it will
|
||||
|
@ -4,7 +4,7 @@ A wxDDEConnection object represents the connection between a client and a
|
||||
server. It can be created by making a connection using a\rtfsp
|
||||
\helpref{wxDDEClient}{wxddeclient} object, or by the acceptance of a connection by a\rtfsp
|
||||
\helpref{wxDDEServer}{wxddeserver} object. The bulk of a DDE (Dynamic Data Exchange)
|
||||
conversation (available in both Windows and UNIX) is controlled by
|
||||
conversation is controlled by
|
||||
calling members in a {\bf wxDDEConnection} object or by overriding its
|
||||
members.
|
||||
|
||||
@ -12,10 +12,43 @@ An application should normally derive a new connection class from
|
||||
wxDDEConnection, in order to override the communication event handlers
|
||||
to do something interesting.
|
||||
|
||||
This DDE-based implementation is available on Windows only,
|
||||
but a platform-independent, socket-based version
|
||||
of this API is available using \helpref{wxTCPConnection}{wxtcpconnection}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxConnectionBase\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Types}
|
||||
|
||||
\index{wxIPCFormat}wxIPCFormat is defined as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
enum wxIPCFormat
|
||||
{
|
||||
wxIPC_INVALID = 0,
|
||||
wxIPC_TEXT = 1, /* CF_TEXT */
|
||||
wxIPC_BITMAP = 2, /* CF_BITMAP */
|
||||
wxIPC_METAFILE = 3, /* CF_METAFILEPICT */
|
||||
wxIPC_SYLK = 4,
|
||||
wxIPC_DIF = 5,
|
||||
wxIPC_TIFF = 6,
|
||||
wxIPC_OEMTEXT = 7, /* CF_OEMTEXT */
|
||||
wxIPC_DIB = 8, /* CF_DIB */
|
||||
wxIPC_PALETTE = 9,
|
||||
wxIPC_PENDATA = 10,
|
||||
wxIPC_RIFF = 11,
|
||||
wxIPC_WAVE = 12,
|
||||
wxIPC_UNICODETEXT = 13,
|
||||
wxIPC_ENHMETAFILE = 14,
|
||||
wxIPC_FILENAME = 15, /* CF_HDROP */
|
||||
wxIPC_LOCALE = 16,
|
||||
wxIPC_PRIVATE = 20
|
||||
};
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEServer}{wxddeserver}, \helpref{Interprocess communications overview}{ipcoverview}
|
||||
@ -42,7 +75,7 @@ transactions.
|
||||
|
||||
\membersection{wxDDEConnection::Advise}
|
||||
|
||||
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}}
|
||||
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the server application to advise the client of a change in
|
||||
the data associated with the given item. Causes the client
|
||||
@ -51,8 +84,7 @@ member to be called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxDDEConnection::Execute}
|
||||
|
||||
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1},
|
||||
\param{int}{ format = wxCF\_TEXT}}
|
||||
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to execute a command on the server. Can
|
||||
also be used to transfer arbitrary data to the server (similar
|
||||
@ -74,14 +106,14 @@ successful.
|
||||
|
||||
\membersection{wxDDEConnection::OnAdvise}\label{wxddeconnectiononadvise}
|
||||
|
||||
\func{bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
|
||||
\func{virtual bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the client application when the server notifies it of a
|
||||
change in the data associated with the given item.
|
||||
|
||||
\membersection{wxDDEConnection::OnDisconnect}\label{wxddeconnectionondisconnect}
|
||||
|
||||
\func{bool}{OnDisconnect}{\void}
|
||||
\func{virtual bool}{OnDisconnect}{\void}
|
||||
|
||||
Message sent to the client or server application when the other
|
||||
application notifies it to delete the connection. Default behaviour is
|
||||
@ -89,7 +121,7 @@ to delete the connection object.
|
||||
|
||||
\membersection{wxDDEConnection::OnExecute}\label{wxddeconnectiononexecute}
|
||||
|
||||
\func{bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
|
||||
\func{virtual bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the server application when the client notifies it to
|
||||
execute the given data. Note that there is no item associated with
|
||||
@ -97,14 +129,14 @@ this message.
|
||||
|
||||
\membersection{wxDDEConnection::OnPoke}\label{wxddeconnectiononpoke}
|
||||
|
||||
\func{bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
|
||||
\func{virtual bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the server application when the client notifies it to
|
||||
accept the given data.
|
||||
|
||||
\membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest}
|
||||
|
||||
\func{char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format}}
|
||||
\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the server application when the client
|
||||
calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server
|
||||
@ -113,7 +145,7 @@ or NULL to indicate no data.
|
||||
|
||||
\membersection{wxDDEConnection::OnStartAdvise}\label{wxddeconnectiononstartadvise}
|
||||
|
||||
\func{bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
\func{virtual bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
|
||||
Message sent to the server application by the client, when the client
|
||||
wishes to start an `advise loop' for the given topic and item. The
|
||||
@ -121,7 +153,7 @@ server can refuse to participate by returning FALSE.
|
||||
|
||||
\membersection{wxDDEConnection::OnStopAdvise}\label{wxddeconnectiononstopadvise}
|
||||
|
||||
\func{bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
\func{virtual bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
|
||||
Message sent to the server application by the client, when the client
|
||||
wishes to stop an `advise loop' for the given topic and item. The
|
||||
@ -130,7 +162,7 @@ this doesn't have much meaning in practice.
|
||||
|
||||
\membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke}
|
||||
|
||||
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}}
|
||||
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to poke data into the server. Can be
|
||||
used to transfer arbitrary data to the server. Causes the server
|
||||
@ -139,7 +171,7 @@ to be called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxDDEConnection::Request}\label{wxddeconnectionrequest}
|
||||
|
||||
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format = wxCF\_TEXT}}
|
||||
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format = wxIPC\_TEXT}}
|
||||
|
||||
Called by the client application to request data from the server. Causes
|
||||
the server connection's \helpref{wxDDEConnection::OnRequest}{wxddeconnectiononrequest} member to be called. Returns a
|
||||
|
@ -1,16 +1,19 @@
|
||||
\section{\class{wxDDEServer}}\label{wxddeserver}
|
||||
|
||||
A wxDDEServer object represents the server part of a client-server DDE
|
||||
(Dynamic Data Exchange) conversation (available under both Windows
|
||||
and UNIX).
|
||||
(Dynamic Data Exchange) conversation.
|
||||
|
||||
This DDE-based implementation is
|
||||
available on Windows only, but a platform-independent, socket-based version
|
||||
of this API is available using \helpref{wxTCPServer}{wxtcpserver}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxDDEObject
|
||||
wxServerBase
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{IPC overview}{ipcoverview}
|
||||
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEConnection}{wxddeconnection}, \helpref{IPC overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
@ -31,7 +34,7 @@ number is already in use).
|
||||
|
||||
\membersection{wxDDEServer::OnAcceptConnection}\label{wxddeserveronacceptconnection}
|
||||
|
||||
\func{wxDDEConnection *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
|
||||
\func{virtual wxConnectionBase *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
|
||||
|
||||
When a client calls {\bf MakeConnection}, the server receives the
|
||||
message and this member is called. The application should derive a
|
||||
|
21
docs/latex/wx/fltinstr.tex
Normal file
21
docs/latex/wx/fltinstr.tex
Normal file
@ -0,0 +1,21 @@
|
||||
% -----------------------------------------------------------------------------
|
||||
% wxFilterInputStream
|
||||
% -----------------------------------------------------------------------------
|
||||
\section{\class{wxFilterInputStream}}\label{wxfilterinputstream}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxInputStream}{wxinputstream}
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
The use of this class is exactly the same as of wxInputStream. Only a constructor
|
||||
differs and it is documented below.
|
||||
|
||||
% -----------
|
||||
% ctor & dtor
|
||||
% -----------
|
||||
\membersection{wxFilterInputStream::wxFilterInputStream}
|
||||
|
||||
\func{}{wxFilterInputStream}{\param{wxInputStream\&}{ stream}}
|
||||
|
21
docs/latex/wx/fltoutst.tex
Normal file
21
docs/latex/wx/fltoutst.tex
Normal file
@ -0,0 +1,21 @@
|
||||
% -----------------------------------------------------------------------------
|
||||
% wxFilterOutputStream
|
||||
% -----------------------------------------------------------------------------
|
||||
\section{\class{wxFilterOutputStream}}\label{wxfilteroutputstream}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxOutputStream}{wxoutputstream}
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
The use of this class is exactly the same as of wxOutputStream. Only a constructor
|
||||
differs and it is documented below.
|
||||
|
||||
% -----------
|
||||
% ctor & dtor
|
||||
% -----------
|
||||
\membersection{wxFilterOutputStream::wxFilterOutputStream}
|
||||
|
||||
\func{}{wxFilterOutputStream}{\param{wxOutputStream\&}{ stream}}
|
||||
|
@ -18,7 +18,7 @@ Returns TRUE if the directory exists.
|
||||
|
||||
\func{void}{Dos2UnixFilename}{\param{const wxString\& }{s}}
|
||||
|
||||
Converts a DOS to a UNIX filename by replacing backslashes with forward
|
||||
Converts a DOS to a Unix filename by replacing backslashes with forward
|
||||
slashes.
|
||||
|
||||
\membersection{::wxFileExists}
|
||||
@ -84,7 +84,7 @@ pointer for long-term use.
|
||||
|
||||
\func{void}{wxUnix2DosFilename}{\param{const wxString\& }{s}}
|
||||
|
||||
Converts a UNIX to a DOS filename by replacing forward
|
||||
Converts a Unix to a DOS filename by replacing forward
|
||||
slashes with backslashes.
|
||||
|
||||
\membersection{::wxConcatFiles}
|
||||
@ -168,7 +168,7 @@ 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.
|
||||
TEMP variable). Under Unix, the {\tt /tmp} directory is used.
|
||||
|
||||
It is the application's responsibility to create and delete the file.
|
||||
|
||||
@ -444,12 +444,12 @@ Returns TRUE if the display is colour, FALSE otherwise.
|
||||
|
||||
Returns the depth of the display (a value of 1 denotes a monochrome display).
|
||||
|
||||
\membersection{::wxMakeMetaFilePlaceable}\label{wxmakemetafileplaceable}
|
||||
\membersection{::wxMakeMetafilePlaceable}\label{wxmakemetafileplaceable}
|
||||
|
||||
\func{bool}{wxMakeMetaFilePlaceable}{\param{const wxString\& }{filename}, \param{int }{minX}, \param{int }{minY},
|
||||
\func{bool}{wxMakeMetafilePlaceable}{\param{const wxString\& }{filename}, \param{int }{minX}, \param{int }{minY},
|
||||
\param{int }{maxX}, \param{int }{maxY}, \param{float }{scale=1.0}}
|
||||
|
||||
Given a filename for an existing, valid metafile (as constructed using \helpref{wxMetaFileDC}{wxmetafiledc})
|
||||
Given a filename for an existing, valid metafile (as constructed using \helpref{wxMetafileDC}{wxmetafiledc})
|
||||
makes it into a placeable metafile by prepending a header containing the given
|
||||
bounding box. The bounding box may be obtained from a device context after drawing
|
||||
into it, using the functions wxDC::MinX, wxDC::MinY, wxDC::MaxX and wxDC::MaxY.
|
||||
@ -676,7 +676,7 @@ Passes data to the clipboard.
|
||||
\item wxCF\_TEXT or wxCF\_OEMTEXT: {\it data} is a null-terminated text string.
|
||||
\item wxCF\_BITMAP: {\it data} is a wxBitmap.
|
||||
\item wxCF\_DIB: {\it data} is a wxBitmap. The bitmap is converted to a DIB (device independent bitmap).
|
||||
\item wxCF\_METAFILE: {\it data} is a wxMetaFile. {\it width} and {\it height} are used to give recommended dimensions.
|
||||
\item wxCF\_METAFILE: {\it data} is a wxMetafile. {\it width} and {\it height} are used to give recommended dimensions.
|
||||
\end{itemize}
|
||||
|
||||
The clipboard must have previously been opened for this call to succeed.
|
||||
@ -705,7 +705,7 @@ Use \helpref{wxEndBusyCursor}{wxendbusycursor} to revert the cursor back
|
||||
to its previous state. These two calls can be nested, and a counter
|
||||
ensures that only the outer calls take effect.
|
||||
|
||||
See also \helpref{wxIsBusy}{wxisbusy}.
|
||||
See also \helpref{wxIsBusy}{wxisbusy}, \helpref{wxBusyCursor}{wxbusycursor}.
|
||||
|
||||
\membersection{::wxBell}
|
||||
|
||||
@ -729,12 +729,33 @@ if wxWindows does not get a chance to do it.
|
||||
Creates and returns an object of the given class, if the class has been
|
||||
registered with the dynamic class system using DECLARE... and IMPLEMENT... macros.
|
||||
|
||||
\membersection{::wxDebugMsg}
|
||||
\membersection{::wxDDECleanUp}\label{wxddecleanup}
|
||||
|
||||
\func{void}{wxDDECleanUp}{\void}
|
||||
|
||||
Called when wxWindows exits, to clean up the DDE system. This no longer needs to be
|
||||
called by the application.
|
||||
|
||||
See also helpref{wxDDEInitialize}{wxddeinitialize}.
|
||||
|
||||
\membersection{::wxDDEInitialize}\label{wxddeinitialize}
|
||||
|
||||
\func{void}{wxDDEInitialize}{\void}
|
||||
|
||||
Initializes the DDE system. May be called multiple times without harm.
|
||||
|
||||
This no longer needs to be called by the application: it will be called
|
||||
by wxWindows if necessary.
|
||||
|
||||
See also \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEConnection}{wxddeconnection},
|
||||
\helpref{wxDDECleanUp}{wxddecleanup}.
|
||||
|
||||
\membersection{::wxDebugMsg}\label{wxdebugmsg}
|
||||
|
||||
\func{void}{wxDebugMsg}{\param{const wxString\& }{fmt}, \param{...}{}}
|
||||
|
||||
Display a debugging message; under Windows, this will appear on the
|
||||
debugger command window, and under UNIX, it will be written to standard
|
||||
debugger command window, and under Unix, it will be written to standard
|
||||
error.
|
||||
|
||||
The syntax is identical to {\bf printf}: pass a format string and a
|
||||
@ -779,14 +800,14 @@ wxWindows initialization under Windows (for applications constructed as a DLL).
|
||||
|
||||
\func{int}{wxEntry}{\param{int}{ argc}, \param{const wxString\& *}{argv}}
|
||||
|
||||
wxWindows initialization under UNIX.
|
||||
wxWindows initialization under Unix.
|
||||
|
||||
\membersection{::wxError}\label{wxerror}
|
||||
|
||||
\func{void}{wxError}{\param{const wxString\& }{msg}, \param{const wxString\& }{title = "wxWindows Internal Error"}}
|
||||
|
||||
Displays {\it msg} and continues. This writes to standard error under
|
||||
UNIX, and pops up a message box under Windows. Used for internal
|
||||
Unix, and pops up a message box under Windows. Used for internal
|
||||
wxWindows errors. See also \helpref{wxFatalError}{wxfatalerror}.
|
||||
|
||||
\membersection{::wxEndBusyCursor}\label{wxendbusycursor}
|
||||
@ -796,15 +817,15 @@ wxWindows errors. See also \helpref{wxFatalError}{wxfatalerror}.
|
||||
Changes the cursor back to the original cursor, for all windows in the application.
|
||||
Use with \helpref{wxBeginBusyCursor}{wxbeginbusycursor}.
|
||||
|
||||
See also \helpref{wxIsBusy}{wxisbusy}.
|
||||
See also \helpref{wxIsBusy}{wxisbusy}, \helpref{wxBusyCursor}{wxbusycursor}.
|
||||
|
||||
\membersection{::wxExecute}\label{wxexecute}
|
||||
|
||||
\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{bool }{sync = FALSE}, \param{wxProcess *}{callback = NULL}}
|
||||
|
||||
\func{long}{wxExecute}{\param{const wxString\& *}{argv}, \param{bool }{sync = FALSE}, \param{wxProcess *}{callback = NULL}}
|
||||
\func{long}{wxExecute}{\param{char **}{argv}, \param{bool }{sync = FALSE}, \param{wxProcess *}{callback = NULL}}
|
||||
|
||||
Executes another program in UNIX or Windows.
|
||||
Executes another program in Unix or Windows.
|
||||
|
||||
The first form takes a command string, such as {\tt "emacs file.txt"}.
|
||||
|
||||
@ -837,7 +858,7 @@ application. See \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow} and \h
|
||||
|
||||
\func{void}{wxFatalError}{\param{const wxString\& }{msg}, \param{const wxString\& }{title = "wxWindows Fatal Error"}}
|
||||
|
||||
Displays {\it msg} and exits. This writes to standard error under UNIX,
|
||||
Displays {\it msg} and exits. This writes to standard error under Unix,
|
||||
and pops up a message box under Windows. Used for fatal internal
|
||||
wxWindows errors. See also \helpref{wxError}{wxerror}.
|
||||
|
||||
@ -883,7 +904,7 @@ Under X only, returns the current display name. See also \helpref{wxSetDisplayNa
|
||||
|
||||
\func{wxString}{wxGetHomeDir}{\param{const wxString\& }{buf}}
|
||||
|
||||
Fills the buffer with a string representing the user's home directory (UNIX only).
|
||||
Fills the buffer with a string representing the user's home directory (Unix only).
|
||||
|
||||
\membersection{::wxGetHostName}
|
||||
|
||||
@ -891,7 +912,7 @@ Fills the buffer with a string representing the user's home directory (UNIX only
|
||||
|
||||
Copies the host name of the machine the program is running on into the
|
||||
buffer {\it buf}, of maximum size {\it bufSize}, returning TRUE if
|
||||
successful. Under UNIX, this will return a machine name. Under Windows,
|
||||
successful. Under Unix, this will return a machine name. Under Windows,
|
||||
this returns ``windows''.
|
||||
|
||||
\membersection{::wxGetElapsedTime}\label{wxgetelapsedtime}
|
||||
@ -905,13 +926,13 @@ by this call.
|
||||
|
||||
See also \helpref{wxTimer}{wxtimer}.
|
||||
|
||||
\membersection{::wxGetFreeMemory}
|
||||
\membersection{::wxGetFreeMemory}\label{wxgetfreememory}
|
||||
|
||||
\func{long}{wxGetFreeMemory}{\void}
|
||||
|
||||
Returns the amount of free memory in Kbytes under environments which
|
||||
support it, and -1 if not supported. Currently, returns a positive value
|
||||
under Windows, and -1 under UNIX.
|
||||
under Windows, and -1 under Unix.
|
||||
|
||||
\membersection{::wxGetMousePosition}
|
||||
|
||||
@ -956,7 +977,7 @@ Gets a resource value from the resource database (for example, WIN.INI, or
|
||||
.Xdefaults). If {\it file} is NULL, WIN.INI or .Xdefaults is used,
|
||||
otherwise the specified file is used.
|
||||
|
||||
Under X, if an application class (wxApp::wx\_class) has been defined,
|
||||
Under X, if an application class (wxApp::GetClassName) has been defined,
|
||||
it is appended to the string /usr/lib/X11/app-defaults/ to try to find
|
||||
an applications default file when merging all resource databases.
|
||||
|
||||
@ -966,7 +987,7 @@ if the value exists in the resource file. It saves a separate
|
||||
test for that resource's existence, and it also allows
|
||||
the overloading of the function for different types.
|
||||
|
||||
See also \helpref{wxWriteResource}{wxwriteresource}.
|
||||
See also \helpref{wxWriteResource}{wxwriteresource}, \helpref{wxConfigBase}{wxconfigbase}.
|
||||
|
||||
\membersection{::wxGetUserId}
|
||||
|
||||
@ -988,7 +1009,7 @@ Under Windows, this returns ``unknown''.
|
||||
|
||||
\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig}}
|
||||
|
||||
Under UNIX (the only supported platform), equivalent to the UNIX kill function.
|
||||
Under Unix (the only supported platform), equivalent to the Unix kill function.
|
||||
Returns 0 on success, -1 on failure.
|
||||
|
||||
Tip: sending a signal of 0 to a process returns -1 if the process does not exist.
|
||||
@ -1001,23 +1022,6 @@ It does not raise a signal in the receiving process.
|
||||
Initializes the generic clipboard system by creating an instance of
|
||||
the class \helpref{wxClipboard}{wxclipboard}.
|
||||
|
||||
\membersection{::wxIPCCleanUp}\label{wxipccleanup}
|
||||
|
||||
\func{void}{wxIPCCleanUp}{\void}
|
||||
|
||||
Call this when your application is terminating, if you have
|
||||
called \helpref{wxIPCInitialize}{wxipcinitialize}.
|
||||
|
||||
\membersection{::wxIPCInitialize}\label{wxipcinitialize}
|
||||
|
||||
\func{void}{wxIPCInitialize}{\void}
|
||||
|
||||
Initializes for interprocess communication operation. May
|
||||
be called multiple times without harm.
|
||||
|
||||
See also \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEConnection}{wxddeconnection}
|
||||
and the relevant section of the user manual.
|
||||
|
||||
\membersection{::wxIsBusy}\label{wxisbusy}
|
||||
|
||||
\func{bool}{wxIsBusy}{\void}
|
||||
@ -1025,6 +1029,8 @@ and the relevant section of the user manual.
|
||||
Returns TRUE if between two \helpref{wxBeginBusyCursor}{wxbeginbusycursor} and\rtfsp
|
||||
\helpref{wxEndBusyCursor}{wxendbusycursor} calls.
|
||||
|
||||
See also \helpref{wxBusyCursor}{wxbusycursor}.
|
||||
|
||||
\membersection{::wxLoadUserResource}\label{wxloaduserresource}
|
||||
|
||||
\func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}}
|
||||
@ -1083,11 +1089,11 @@ specified, then just the shell is spawned.
|
||||
|
||||
See also \helpref{wxExecute}{wxexecute}.
|
||||
|
||||
\membersection{::wxSleep}
|
||||
\membersection{::wxSleep}\label{wxsleep}
|
||||
|
||||
\func{void}{wxSleep}{\param{int}{ secs}}
|
||||
|
||||
Under X, sleeps for the specified number of seconds.
|
||||
Sleeps for the specified number of seconds.
|
||||
|
||||
\membersection{::wxStripMenuCodes}
|
||||
|
||||
@ -1165,9 +1171,9 @@ Under X, the resource databases are cached until the internal function
|
||||
all updated resource databases are written to their files.
|
||||
|
||||
Note that it is considered bad manners to write to the .Xdefaults
|
||||
file under UNIX, although the WIN.INI file is fair game under Windows.
|
||||
file under Unix, although the WIN.INI file is fair game under Windows.
|
||||
|
||||
See also \helpref{wxGetResource}{wxgetresource}.
|
||||
See also \helpref{wxGetResource}{wxgetresource}, \helpref{wxConfigBase}{wxconfigbase}.
|
||||
|
||||
\membersection{::wxYield}
|
||||
|
||||
|
94
docs/latex/wx/inputstr.tex
Normal file
94
docs/latex/wx/inputstr.tex
Normal file
@ -0,0 +1,94 @@
|
||||
% -----------------------------------------------------------------------------
|
||||
% wxInputStream
|
||||
% -----------------------------------------------------------------------------
|
||||
\section{\class{wxInputStream}}\label{wxinputstream}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxStreamBase}{wxstreambase}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxStreamBuffer}{wxstreambuffer}
|
||||
|
||||
% -----------
|
||||
% ctor & dtor
|
||||
% -----------
|
||||
\membersection{wxInputStream::wxInputStream}
|
||||
|
||||
\func{}{wxInputStream}{\void}
|
||||
|
||||
Creates a dummy input stream.
|
||||
|
||||
\func{}{wxInputStream}{\param{wxStreamBuffer *}{sbuf}}
|
||||
|
||||
Creates an input stream using the specified stream buffer \it{sbuf}. This
|
||||
stream buffer can point to another stream.
|
||||
|
||||
\membersection{wxInputStream::\destruct{wxInputStream}}
|
||||
|
||||
\func{}{\destruct{wxInputStream}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
% -----------
|
||||
% IO function
|
||||
% -----------
|
||||
\membersection{wxInputStream::Peek}
|
||||
|
||||
\func{char}{Peek}{\void}
|
||||
|
||||
Returns the first character in the input queue without removing it.
|
||||
|
||||
\membersection{wxInputStream::GetC}
|
||||
|
||||
\func{char}{GetC}{\void}
|
||||
|
||||
Returns the first character in the input queue and removes it.
|
||||
|
||||
\membersection{wxInputStream::Read}
|
||||
|
||||
\func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size_t}{ size}}
|
||||
|
||||
Reads the specified amount of bytes and stores the data in \it{buffer}.
|
||||
|
||||
\it{WARNING!} The buffer absolutely needs to have at least the specified size.
|
||||
|
||||
This function returns a reference on the current object, so the user can test
|
||||
any states of the stream right away.
|
||||
|
||||
\func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream_out}}
|
||||
|
||||
Reads data from the input queue and stores it in the specified output stream.
|
||||
The data is read until an error is raised by one of the two streams.
|
||||
|
||||
% ------------------
|
||||
% Position functions
|
||||
% ------------------
|
||||
\membersection{wxInputStream::SeekI}
|
||||
|
||||
\func{off_t}{SeekI}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
|
||||
|
||||
Changes the stream current position.
|
||||
|
||||
\membersection{wxInputStream::TellI}
|
||||
|
||||
\constfunc{off_t}{TellI}{\void}
|
||||
|
||||
Returns the current stream position.
|
||||
|
||||
% ---------------
|
||||
% State functions
|
||||
% ---------------
|
||||
\membersection{wxInputStream::InputStreamBuffer}
|
||||
|
||||
\func{wxStreamBuffer*}{InputStreamBuffer}{\void}
|
||||
|
||||
Returns the stream buffer associated with the input stream.
|
||||
|
||||
\membersection{wxInputStream::LastRead}
|
||||
|
||||
\constfunc{size_t}{LastRead}{\void}
|
||||
|
||||
Returns the last number of bytes read.
|
||||
|
@ -1,7 +1,6 @@
|
||||
\section{\class{wxMetafile}}\label{wxmetafile}
|
||||
|
||||
\section{\class{wxMetaFile}}\label{wxmetafile}
|
||||
|
||||
A {\bf wxMetaFile} represents the MS Windows metafile object, so metafile
|
||||
A {\bf wxMetafile} represents the MS Windows metafile object, so metafile
|
||||
operations have no effect in X. In wxWindows, only sufficient functionality
|
||||
has been provided for copying a graphic to the clipboard; this may be extended
|
||||
in a future version. Presently, the only way of creating a metafile
|
||||
@ -13,43 +12,43 @@ is to use a wxMetafileDC.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMetaFileDC}{wxmetafiledc}
|
||||
\helpref{wxMetafileDC}{wxmetafiledc}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMetaFile::wxMetaFile}
|
||||
\membersection{wxMetafile::wxMetafile}
|
||||
|
||||
\func{}{wxMetaFile}{\param{const wxString\& }{filename = ""}}
|
||||
\func{}{wxMetafile}{\param{const wxString\& }{filename = ""}}
|
||||
|
||||
Constructor. If a filename is given, the Windows disk metafile is
|
||||
read in. Check whether this was performed successfully by
|
||||
using the \helpref{wxMetaFile::Ok}{wxmetafileok} member.
|
||||
using the \helpref{wxMetafile::Ok}{wxmetafileok} member.
|
||||
|
||||
\membersection{wxMetaFile::\destruct{wxMetaFile}}
|
||||
\membersection{wxMetafile::\destruct{wxMetafile}}
|
||||
|
||||
\func{}{\destruct{wxMetaFile}}{\void}
|
||||
\func{}{\destruct{wxMetafile}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxMetaFile::Ok}\label{wxmetafileok}
|
||||
\membersection{wxMetafile::Ok}\label{wxmetafileok}
|
||||
|
||||
\func{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if the metafile is valid.
|
||||
|
||||
\membersection{wxMetaFile::Play}\label{wxmetafileplay}
|
||||
\membersection{wxMetafile::Play}\label{wxmetafileplay}
|
||||
|
||||
\func{bool}{Play}{\param{wxDC *}{dc}}
|
||||
|
||||
Plays the metafile into the given device context, returning
|
||||
TRUE if successful.
|
||||
|
||||
\membersection{wxMetaFile::SetClipboard}
|
||||
\membersection{wxMetafile::SetClipboard}
|
||||
|
||||
\func{bool}{SetClipboard}{\param{int}{ width = 0}, \param{int}{ height = 0}}
|
||||
|
||||
Passes the metafile data to the clipboard. The metafile can no longer be
|
||||
used for anything, but the wxMetaFile object must still be destroyed by
|
||||
used for anything, but the wxMetafile object must still be destroyed by
|
||||
the application.
|
||||
|
||||
Below is a example of metafle, metafile device context and clipboard use
|
||||
@ -58,11 +57,11 @@ are passed to the clipboard, making use of the device context's ability
|
||||
to keep track of the maximum extent of drawing commands.
|
||||
|
||||
\begin{verbatim}
|
||||
wxMetaFileDC dc;
|
||||
wxMetafileDC dc;
|
||||
if (dc.Ok())
|
||||
{
|
||||
Draw(dc, FALSE);
|
||||
wxMetaFile *mf = dc.Close();
|
||||
wxMetafile *mf = dc.Close();
|
||||
if (mf)
|
||||
{
|
||||
bool success = mf->SetClipboard((int)(dc.MaxX() + 10), (int)(dc.MaxY() + 10));
|
||||
@ -71,23 +70,23 @@ to keep track of the maximum extent of drawing commands.
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
\section{\class{wxMetaFileDC}}\label{wxmetafiledc}
|
||||
\section{\class{wxMetafileDC}}\label{wxmetafiledc}
|
||||
|
||||
This is a type of device context that allows a metafile object to be
|
||||
created (Windows only), and has most of the characteristics of a normal
|
||||
\rtfsp{\bf wxDC}. The \helpref{wxMetaFileDC::Close}{wxmetafiledcclose} member must be called after drawing into the
|
||||
\rtfsp{\bf wxDC}. The \helpref{wxMetafileDC::Close}{wxmetafiledcclose} member must be called after drawing into the
|
||||
device context, to return a metafile. The only purpose for this at
|
||||
present is to allow the metafile to be copied to the clipboard (see \helpref{wxMetaFile}{wxmetafile}).
|
||||
present is to allow the metafile to be copied to the clipboard (see \helpref{wxMetafile}{wxmetafile}).
|
||||
|
||||
Adding metafile capability to an application should be easy if you
|
||||
already write to a wxDC; simply pass the wxMetaFileDC to your drawing
|
||||
already write to a wxDC; simply pass the wxMetafileDC to your drawing
|
||||
function instead. You may wish to conditionally compile this code so it
|
||||
is not compiled under X (although no harm will result if you leave it
|
||||
in).
|
||||
|
||||
Note that a metafile saved to disk is in standard Windows metafile format,
|
||||
and cannot be imported into most applications. To make it importable,
|
||||
call the function \helpref{::wxMakeMetaFilePlaceable}{wxmakemetafileplaceable} after
|
||||
call the function \helpref{::wxMakeMetafilePlaceable}{wxmakemetafileplaceable} after
|
||||
closing your disk-based metafile device context.
|
||||
|
||||
\wxheading{Derived from}
|
||||
@ -97,29 +96,28 @@ closing your disk-based metafile device context.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMetaFile}{wxmetafile}, \helpref{wxDC}{wxdc}
|
||||
\helpref{wxMetafile}{wxmetafile}, \helpref{wxDC}{wxdc}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMetaFileDC::wxMetaFileDC}
|
||||
\membersection{wxMetafileDC::wxMetafileDC}
|
||||
|
||||
\func{}{wxMetaFileDC}{\param{const wxString\& }{filename = ""}}
|
||||
\func{}{wxMetafileDC}{\param{const wxString\& }{filename = ""}}
|
||||
|
||||
Constructor. If no filename is passed, the metafile is created
|
||||
in memory.
|
||||
|
||||
\membersection{wxMetaFileDC::\destruct{wxMetaFileDC}}
|
||||
\membersection{wxMetafileDC::\destruct{wxMetafileDC}}
|
||||
|
||||
\func{}{\destruct{wxMetaFileDC}}{\void}
|
||||
\func{}{\destruct{wxMetafileDC}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxMetaFileDC::Close}\label{wxmetafiledcclose}
|
||||
\membersection{wxMetafileDC::Close}\label{wxmetafiledcclose}
|
||||
|
||||
\func{wxMetaFile *}{Close}{\void}
|
||||
\func{wxMetafile *}{Close}{\void}
|
||||
|
||||
This must be called after the device context is finished with. A
|
||||
metafile is returned, and ownership of it passes to the calling
|
||||
application (so it should be destroyed explicitly).
|
||||
|
||||
|
||||
|
@ -10,6 +10,27 @@ and add the DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS to header and
|
||||
create an instance of each, and call each OnInit function. On exit, wxWindows will call the OnExit
|
||||
function for each module instance.
|
||||
|
||||
Note that your module class does not have to be in a header file.
|
||||
|
||||
For example:
|
||||
|
||||
\begin{verbatim}
|
||||
// A module to allow DDE initialization/cleanup
|
||||
// without calling these functions from app.cpp or from
|
||||
// the user's application.
|
||||
|
||||
class wxDDEModule: public wxModule
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDDEModule)
|
||||
public:
|
||||
wxDDEModule() {}
|
||||
bool OnInit() { wxDDEInitialize(); return TRUE; };
|
||||
void OnExit() { wxDDECleanUp(); };
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxDDEModule, wxModule)
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
87
docs/latex/wx/outptstr.tex
Normal file
87
docs/latex/wx/outptstr.tex
Normal file
@ -0,0 +1,87 @@
|
||||
% -----------------------------------------------------------------------------
|
||||
% wxOutputStream
|
||||
% -----------------------------------------------------------------------------
|
||||
\section{\class{wxOutputStream}}\label{wxoutputstream}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxStreamBase}{wxstreambase}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxStreamBuffer}{wxstreambuffer}
|
||||
|
||||
% -----------
|
||||
% ctor & dtor
|
||||
% -----------
|
||||
\membersection{wxOutputStream::wxOutputStream}
|
||||
|
||||
\func{}{wxOutputStream}{\void}
|
||||
|
||||
Creates a dummy wxOutputStream object.
|
||||
|
||||
\func{}{wxOutputStream}{\param{wxStreamBuffer*}{ sbuf}}
|
||||
|
||||
Creates an input stream using the specified stream buffer \it{sbuf}. This
|
||||
stream buffer can point to another stream.
|
||||
|
||||
\membersection{wxOutputStream::\destruct{wxOutputStream}}
|
||||
|
||||
\func{}{\destruct{wxOutputStream}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
% -----------
|
||||
% IO function
|
||||
% -----------
|
||||
\membersection{wxOutputStream::PutC}
|
||||
|
||||
\func{void}{PutC}{\param{char}{ c}}
|
||||
|
||||
Puts the specified character in the output queue and increments the
|
||||
stream position.
|
||||
|
||||
\membersection{wxOutputStream::Write}
|
||||
|
||||
\func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size_t}{ size}}
|
||||
|
||||
Writes the specified amount of bytes using the data of \it{buffer}.
|
||||
\it{WARNING!} The buffer absolutely needs to have at least the specified size.
|
||||
|
||||
This function returns a reference on the current object, so the user can test
|
||||
any states of the stream right away.
|
||||
|
||||
\func{wxOutputStream\&}{Write}{\param{wxInputStream\&}{ stream_in}}
|
||||
|
||||
Reads data from the specified input stream and stores them
|
||||
in the current stream. The data is read until an error is raised
|
||||
by one of the two streams.
|
||||
|
||||
% ------------------
|
||||
% Position functions
|
||||
% ------------------
|
||||
\membersection{wxOutputStream::SeekO}
|
||||
|
||||
\func{off_t}{SeekO}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}}
|
||||
|
||||
Changes the stream current position.
|
||||
|
||||
\membersection{wxOutputStream::TellO}
|
||||
|
||||
\constfunc{off_t}{TellO}{\void}
|
||||
|
||||
Returns the current stream position.
|
||||
|
||||
% ---------------
|
||||
% State functions
|
||||
% ---------------
|
||||
\membersection{wxOutputStream::OutputStreamBuffer}
|
||||
|
||||
\func{wxStreamBuffer *}{OutputStreamBuffer}{\void}
|
||||
|
||||
Returns the stream buffer associated with the output stream.
|
||||
|
||||
\membersection{wxOutputStream::LastWrite}
|
||||
|
||||
\constfunc{size_t}{LastWrite}{\void}
|
||||
|
@ -1,4 +1,4 @@
|
||||
\section{\class{wxStreamBuffer}}\label{wxstreambuf}
|
||||
\section{\class{wxStreamBuffer}}\label{wxstreambuffer}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
@ -28,7 +28,7 @@ wxStreamBuffer::write, wxStreamBuffer::read\_write.
|
||||
|
||||
\func{}{wxStreamBuffer}{\param{BufMode}{ mode}}
|
||||
|
||||
Constructor, creates a new empty stream buffer which won't flush any datas
|
||||
Constructor, creates a new empty stream buffer which won't flush any data
|
||||
to a stream. \it{mode} specifies the type of the buffer (read, write, read\_write).
|
||||
|
||||
\membersection{wxStreamBuffer::wxStreamBuffer}
|
||||
@ -39,7 +39,7 @@ Constructor, creates a new stream buffer from the specified stream \it{buffer}.
|
||||
|
||||
\membersection{wxStreamBuffer::\destruct{wxStreamBuffer}}
|
||||
|
||||
\func{}{\destruct{wxStreamBuffer}}
|
||||
\func{}{wxStreamBuffer}{\destruct{wxStreamBuffer}}
|
||||
|
||||
Destructor, destroys the stream buffer.
|
||||
|
||||
@ -56,7 +56,7 @@ Reads a block of the specified \it{size} and stores datas in \it{buffer}.
|
||||
|
||||
It returns the real read size. If returned size is different of the specified
|
||||
\it{size}, an error occured and should be tested using
|
||||
\helpref{GetError}{wxstreambasegeterror}.
|
||||
\helpref{LastError}{wxstreambaselasterror}.
|
||||
|
||||
\membersection{wxStreamBuffer::Read}\label{wxstreambufreadbuf}
|
||||
|
||||
@ -110,7 +110,7 @@ Puts a single char to the stream buffer.
|
||||
|
||||
Gets the current position in the \it{stream}.
|
||||
|
||||
\membersection{wxStreamBuffer::Seek}
|
||||
\membersection{wxStreamBuffer::Seek}\label{wxstreambufferseek}
|
||||
|
||||
\func{off\_t}{Seek}{\param{off\_t }{pos}, \param{wxSeekMode }{mode}}
|
||||
|
||||
|
75
docs/latex/wx/strmbase.tex
Normal file
75
docs/latex/wx/strmbase.tex
Normal file
@ -0,0 +1,75 @@
|
||||
% -----------------------------------------------------------------------------
|
||||
% wxStreamBase
|
||||
% -----------------------------------------------------------------------------
|
||||
\section{\class{wxStreamBase}}\label{wxstreambase}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
None
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxStreamBuffer}{wxstreambuffer}
|
||||
|
||||
% -----------------------------------------------------------------------------
|
||||
% Members
|
||||
% -----------------------------------------------------------------------------
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
% -----------
|
||||
% ctor & dtor
|
||||
% -----------
|
||||
|
||||
\membersection{wxStreamBase::wxStreamBase}
|
||||
|
||||
\func{}{wxStreamBase}{\void}
|
||||
|
||||
Creates a dummy stream object.
|
||||
|
||||
\membersection{wxStreamBase::\destruct{wxStreamBase}}
|
||||
|
||||
\func{}{\destruct{wxStreamBase}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxStreamBase::LastError}\label{wxstreambaselasterror}
|
||||
|
||||
\constfunc{wxStreamError}{LastError}{\void}
|
||||
|
||||
This function returns the last error.
|
||||
% It is of the form:
|
||||
% TODO
|
||||
|
||||
\membersection{wxStreamBase::StreamSize}
|
||||
\constfunc{size_t}{StreamSize}{\void}
|
||||
|
||||
This function returns the size of the stream. For example, for a file it is the size of
|
||||
the file). Warning! There are streams which do not have size by definition, such as a socket.
|
||||
|
||||
\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
|
||||
|
||||
\func{size_t}{OnSysRead}{\param{void*}{ buffer}, \param{size_t}{ bufsize}}
|
||||
|
||||
Internal function. It is called when the stream buffer needs a buffer of the
|
||||
specified size. It should return the size that was actually read.
|
||||
|
||||
\membersection{wxStreamBase::OnSysWrite}
|
||||
|
||||
\func{size_t}{OnSysWrite}{\param{void *}{buffer}, \param{size_t}{ bufsize}}
|
||||
|
||||
See \helpref{OnSysRead}{wxstreambaseonsysread}.
|
||||
|
||||
\membersection{wxStreamBase::OnSysSeek}
|
||||
|
||||
\func{off_t}{OnSysSeek}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}}
|
||||
|
||||
Internal function. It is called when the stream buffer needs to change the
|
||||
current position in the stream. See \helpref{wxStreamBuffer::Seek}{wxstreambufferseek}
|
||||
|
||||
\membersection{wxStreamBase::OnSysTell}
|
||||
|
||||
\constfunc{off_t}{OnSysTell}{\void}
|
||||
|
||||
Internal function. Is is called when the stream buffer needs to know the
|
||||
current position in the stream.
|
||||
|
64
docs/latex/wx/tcpclint.tex
Normal file
64
docs/latex/wx/tcpclint.tex
Normal file
@ -0,0 +1,64 @@
|
||||
\section{\class{wxTCPClient}}\label{wxtcpclient}
|
||||
|
||||
A wxTCPClient object represents the client part of a client-server conversation.
|
||||
It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms.
|
||||
|
||||
A DDE-based implementation for Windows is available using \helpref{wxDDEClient}{wxddeclient}.
|
||||
|
||||
To create a client which can communicate with a suitable server,
|
||||
you need to derive a class from wxTCPConnection and another from wxTCPClient.
|
||||
The custom wxTCPConnection class will intercept communications in
|
||||
a `conversation' with a server, and the custom wxTCPServer is required
|
||||
so that a user-overriden \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} member can return
|
||||
a wxTCPConnection of the required class, when a connection is made.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxClientBase\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTCPServer}{wxtcpserver}, \helpref{wxTCPConnection}{wxtcpconnection},
|
||||
\helpref{Interprocess communications overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxTCPClient::wxTCPClient}
|
||||
|
||||
\func{}{wxTCPClient}{\void}
|
||||
|
||||
Constructs a client object.
|
||||
|
||||
\membersection{wxTCPClient::MakeConnection}\label{wxtcpclientmakeconnection}
|
||||
|
||||
\func{wxConnectionBase *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
|
||||
|
||||
Tries to make a connection with a server specified by the host
|
||||
(a machine name under Unix), service name (must
|
||||
contain an integer port number under Unix), and a topic string. If the
|
||||
server allows a connection, a wxTCPConnection object will be returned.
|
||||
The type of wxTCPConnection returned can be altered by overriding
|
||||
the \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} member to return your own
|
||||
derived connection object.
|
||||
|
||||
\membersection{wxTCPClient::OnMakeConnection}\label{wxtcpclientonmakeconnection}
|
||||
|
||||
\func{wxConnectionBase *}{OnMakeConnection}{\void}
|
||||
|
||||
The type of \helpref{wxTCPConnection}{wxtcpconnection} returned from a \helpref{wxTCPClient::MakeConnection}{wxtcpclientmakeconnection} call can
|
||||
be altered by deriving the {\bf OnMakeConnection} member to return your
|
||||
own derived connection object. By default, a wxTCPConnection
|
||||
object is returned.
|
||||
|
||||
The advantage of deriving your own connection class is that it will
|
||||
enable you to intercept messages initiated by the server, such
|
||||
as \helpref{wxTCPConnection::OnAdvise}{wxtcpconnectiononadvise}. You may also want to
|
||||
store application-specific data in instances of the new class.
|
||||
|
||||
\membersection{wxTCPClient::ValidHost}
|
||||
|
||||
\func{bool}{ValidHost}{\param{const wxString\& }{host}}
|
||||
|
||||
Returns TRUE if this is a valid host name, FALSE otherwise.
|
||||
|
196
docs/latex/wx/tcpconn.tex
Normal file
196
docs/latex/wx/tcpconn.tex
Normal file
@ -0,0 +1,196 @@
|
||||
\section{\class{wxTCPConnection}}\label{wxtcpconnection}
|
||||
|
||||
A wxTCPClient object represents the connection between a client and a server.
|
||||
It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms.
|
||||
|
||||
A DDE-based implementation for Windows is available using \helpref{wxDDEConnection}{wxddeconnection}.
|
||||
|
||||
A wxTCPConnection object can be created by making a connection using a\rtfsp
|
||||
\helpref{wxTCPClient}{wxtcpclient} object, or by the acceptance of a connection by a\rtfsp
|
||||
\helpref{wxTCPServer}{wxtcpserver} object. The bulk of a conversation is controlled by
|
||||
calling members in a {\bf wxTCPConnection} object or by overriding its
|
||||
members.
|
||||
|
||||
An application should normally derive a new connection class from
|
||||
wxTCPConnection, in order to override the communication event handlers
|
||||
to do something interesting.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxConnectionBase\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Types}
|
||||
|
||||
\index{wxIPCFormat}wxIPCFormat is defined as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
enum wxIPCFormat
|
||||
{
|
||||
wxIPC_INVALID = 0,
|
||||
wxIPC_TEXT = 1, /* CF_TEXT */
|
||||
wxIPC_BITMAP = 2, /* CF_BITMAP */
|
||||
wxIPC_METAFILE = 3, /* CF_METAFILEPICT */
|
||||
wxIPC_SYLK = 4,
|
||||
wxIPC_DIF = 5,
|
||||
wxIPC_TIFF = 6,
|
||||
wxIPC_OEMTEXT = 7, /* CF_OEMTEXT */
|
||||
wxIPC_DIB = 8, /* CF_DIB */
|
||||
wxIPC_PALETTE = 9,
|
||||
wxIPC_PENDATA = 10,
|
||||
wxIPC_RIFF = 11,
|
||||
wxIPC_WAVE = 12,
|
||||
wxIPC_UNICODETEXT = 13,
|
||||
wxIPC_ENHMETAFILE = 14,
|
||||
wxIPC_FILENAME = 15, /* CF_HDROP */
|
||||
wxIPC_LOCALE = 16,
|
||||
wxIPC_PRIVATE = 20
|
||||
};
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTCPClient}{wxtcpclient}, \helpref{wxTCPServer}{wxtcpserver}, \helpref{Interprocess communications overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxTCPConnection::wxTCPConnection}
|
||||
|
||||
\func{}{wxTCPConnection}{\void}
|
||||
|
||||
\func{}{wxTCPConnection}{\param{char* }{buffer}, \param{int}{ size}}
|
||||
|
||||
Constructs a connection object. If no user-defined connection object is
|
||||
to be derived from wxTCPConnection, then the constructor should not be
|
||||
called directly, since the default connection object will be provided on
|
||||
requesting (or accepting) a connection. However, if the user defines his
|
||||
or her own derived connection object, the \helpref{wxTCPServer::OnAcceptConnection}{wxtcpserveronacceptconnection}\rtfsp
|
||||
and/or \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} members should be replaced by
|
||||
functions which construct the new connection object. If the arguments of
|
||||
the wxTCPConnection constructor are void, then a default buffer is
|
||||
associated with the connection. Otherwise, the programmer must provide a
|
||||
a buffer and size of the buffer for the connection object to use in
|
||||
transactions.
|
||||
|
||||
\membersection{wxTCPConnection::Advise}
|
||||
|
||||
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the server application to advise the client of a change in
|
||||
the data associated with the given item. Causes the client
|
||||
connection's \helpref{wxTCPConnection::OnAdvise}{wxtcpconnectiononadvise}
|
||||
member to be called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxTCPConnection::Execute}
|
||||
|
||||
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to execute a command on the server. Can
|
||||
also be used to transfer arbitrary data to the server (similar
|
||||
to \helpref{wxTCPConnection::Poke}{wxtcpconnectionpoke} in that respect). Causes the
|
||||
server connection's \helpref{wxTCPConnection::OnExecute}{wxtcpconnectiononexecute} member to be
|
||||
called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxTCPConnection::Disconnect}
|
||||
|
||||
\func{bool}{Disconnect}{\void}
|
||||
|
||||
Called by the client or server application to disconnect from the other
|
||||
program; it causes the \helpref{wxTCPConnection::OnDisconnect}{wxtcpconnectionondisconnect} message
|
||||
to be sent to the corresponding connection object in the other
|
||||
program. The default behaviour of {\bf OnDisconnect} is to delete the
|
||||
connection, but the calling application must explicitly delete its
|
||||
side of the connection having called {\bf Disconnect}. Returns TRUE if
|
||||
successful.
|
||||
|
||||
\membersection{wxTCPConnection::OnAdvise}\label{wxtcpconnectiononadvise}
|
||||
|
||||
\func{virtual bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the client application when the server notifies it of a
|
||||
change in the data associated with the given item.
|
||||
|
||||
\membersection{wxTCPConnection::OnDisconnect}\label{wxtcpconnectionondisconnect}
|
||||
|
||||
\func{virtual bool}{OnDisconnect}{\void}
|
||||
|
||||
Message sent to the client or server application when the other
|
||||
application notifies it to delete the connection. Default behaviour is
|
||||
to delete the connection object.
|
||||
|
||||
\membersection{wxTCPConnection::OnExecute}\label{wxtcpconnectiononexecute}
|
||||
|
||||
\func{virtual bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the server application when the client notifies it to
|
||||
execute the given data. Note that there is no item associated with
|
||||
this message.
|
||||
|
||||
\membersection{wxTCPConnection::OnPoke}\label{wxtcpconnectiononpoke}
|
||||
|
||||
\func{virtual bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the server application when the client notifies it to
|
||||
accept the given data.
|
||||
|
||||
\membersection{wxTCPConnection::OnRequest}\label{wxtcpconnectiononrequest}
|
||||
|
||||
\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
|
||||
|
||||
Message sent to the server application when the client
|
||||
calls \helpref{wxTCPConnection::Request}{wxtcpconnectionrequest}. The server
|
||||
should respond by returning a character string from {\bf OnRequest},
|
||||
or NULL to indicate no data.
|
||||
|
||||
\membersection{wxTCPConnection::OnStartAdvise}\label{wxtcpconnectiononstartadvise}
|
||||
|
||||
\func{virtual bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
|
||||
Message sent to the server application by the client, when the client
|
||||
wishes to start an `advise loop' for the given topic and item. The
|
||||
server can refuse to participate by returning FALSE.
|
||||
|
||||
\membersection{wxTCPConnection::OnStopAdvise}\label{wxtcpconnectiononstopadvise}
|
||||
|
||||
\func{virtual bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
|
||||
Message sent to the server application by the client, when the client
|
||||
wishes to stop an `advise loop' for the given topic and item. The
|
||||
server can refuse to stop the advise loop by returning FALSE, although
|
||||
this doesn't have much meaning in practice.
|
||||
|
||||
\membersection{wxTCPConnection::Poke}\label{wxtcpconnectionpoke}
|
||||
|
||||
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to poke data into the server. Can be
|
||||
used to transfer arbitrary data to the server. Causes the server
|
||||
connection's \helpref{wxTCPConnection::OnPoke}{wxtcpconnectiononpoke} member
|
||||
to be called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxTCPConnection::Request}\label{wxtcpconnectionrequest}
|
||||
|
||||
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format = wxIPC\_TEXT}}
|
||||
|
||||
Called by the client application to request data from the server. Causes
|
||||
the server connection's \helpref{wxTCPConnection::OnRequest}{wxtcpconnectiononrequest} member to be called. Returns a
|
||||
character string (actually a pointer to the connection's buffer) if
|
||||
successful, NULL otherwise.
|
||||
|
||||
\membersection{wxTCPConnection::StartAdvise}\label{wxtcpconnectionstartadvise}
|
||||
|
||||
\func{bool}{StartAdvise}{\param{const wxString\& }{item}}
|
||||
|
||||
Called by the client application to ask if an advise loop can be started
|
||||
with the server. Causes the server connection's \helpref{wxTCPConnection::OnStartAdvise}{wxtcpconnectiononstartadvise}\rtfsp
|
||||
member to be called. Returns TRUE if the server okays it, FALSE
|
||||
otherwise.
|
||||
|
||||
\membersection{wxTCPConnection::StopAdvise}\label{wxtcpconnectionstopadvise}
|
||||
|
||||
\func{bool}{StopAdvise}{\param{const wxString\& }{item}}
|
||||
|
||||
Called by the client application to ask if an advise loop can be
|
||||
stopped. Causes the server connection's \helpref{wxTCPConnection::OnStopAdvise}{wxtcpconnectiononstopadvise} member
|
||||
to be called. Returns TRUE if the server okays it, FALSE otherwise.
|
||||
|
45
docs/latex/wx/tcpservr.tex
Normal file
45
docs/latex/wx/tcpservr.tex
Normal file
@ -0,0 +1,45 @@
|
||||
\section{\class{wxTCPServer}}\label{wxtcpserver}
|
||||
|
||||
A wxTCPServer object represents the server part of a client-server conversation.
|
||||
It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms.
|
||||
|
||||
A DDE-based implementation for Windows is available using \helpref{wxDDEServer}{wxddeserver}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxServerBase\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTCPClient}{wxtcpclient}, \helpref{wxTCPConnection}{wxtcpconnection}, \helpref{IPC overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxTCPServer::wxTCPServer}
|
||||
|
||||
\func{}{wxTCPServer}{\void}
|
||||
|
||||
Constructs a server object.
|
||||
|
||||
\membersection{wxTCPServer::Create}
|
||||
|
||||
\func{bool}{Create}{\param{const wxString\& }{service}}
|
||||
|
||||
Registers the server using the given service name. Under Unix, the
|
||||
string must contain an integer id which is used as an Internet port
|
||||
number. FALSE is returned if the call failed (for example, the port
|
||||
number is already in use).
|
||||
|
||||
\membersection{wxTCPServer::OnAcceptConnection}\label{wxtcpserveronacceptconnection}
|
||||
|
||||
\func{virtual wxConnectionBase *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
|
||||
|
||||
When a client calls {\bf MakeConnection}, the server receives the
|
||||
message and this member is called. The application should derive a
|
||||
member to intercept this message and return a connection object of
|
||||
either the standard wxTCPConnection type, or of a user-derived type. If the
|
||||
topic is ``STDIO'', the application may wish to refuse the connection.
|
||||
Under Unix, when a server is created the OnAcceptConnection message is
|
||||
always sent for standard input and output.
|
||||
|
@ -1,7 +1,7 @@
|
||||
\section{Device context overview}\label{dcoverview}
|
||||
|
||||
Classes: \helpref{wxDC}{wxdc}, \helpref{wxPostScriptDC}{wxpostscriptdc},\rtfsp
|
||||
\rtfsp\helpref{wxMetaFileDC}{wxmetafiledc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPrinterDC}{wxprinterdc},\rtfsp
|
||||
\rtfsp\helpref{wxMetafileDC}{wxmetafiledc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPrinterDC}{wxprinterdc},\rtfsp
|
||||
\helpref{wxScreenDC}{wxscreendc}, \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp
|
||||
\helpref{wxWindowDC}{wxwindowdc}.
|
||||
|
||||
|
@ -24,7 +24,7 @@ and \helpref{wxFileDialog}{wxfiledialog}.
|
||||
|
||||
You never draw directly onto a window --- you use a {\it device context} (DC). \helpref{wxDC}{wxdc} is
|
||||
the base for \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPostScriptDC}{wxpostscriptdc},
|
||||
\rtfsp\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxMetaFileDC}{wxmetafiledc} and \helpref{wxPrinterDC}{wxprinterdc}.
|
||||
\rtfsp\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxMetafileDC}{wxmetafiledc} and \helpref{wxPrinterDC}{wxprinterdc}.
|
||||
If your drawing functions have {\bf wxDC} as a parameter, you can pass any of these DCs
|
||||
to the function, and thus use the same code to draw to several different devices.
|
||||
You can draw using the member functions of {\bf wxDC}, such as \helpref{wxDC::DrawLine}{wxdcdrawline}\rtfsp
|
||||
|
@ -14,7 +14,7 @@ None.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition}, \helpref{wxCriticalSection}{wxarraywxcriticalsection}
|
||||
\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition}, \helpref{wxCriticalSection}{wxcriticalsection}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
@ -128,6 +128,12 @@ may become inconsistent. Use \helpref{Delete()}{wxthreaddelete} instead.
|
||||
Called when the thread exits. This function is called in the context of the thread
|
||||
associated with the wxThread object, not in the context of the main thread.
|
||||
|
||||
\membersection{wxThread::Run}\label{wxthreadrun}
|
||||
|
||||
\func{wxThreadError}{Run}{\void}
|
||||
|
||||
Runs the thread.
|
||||
|
||||
\membersection{wxThread::SetPriority}\label{wxthreadsetpriority}
|
||||
|
||||
\func{void}{SetPriority}{\param{int}{ priority}}
|
||||
@ -168,3 +174,4 @@ is undefined.
|
||||
|
||||
Give the rest of the thread time slice to the system allowing the other threads to run.
|
||||
See also \helpref{Sleep()}{wxthreadsleep}.
|
||||
|
||||
|
@ -56,8 +56,6 @@ Copy constructor.
|
||||
|
||||
Initialize using hours, minutes, seconds, and whether DST time.
|
||||
|
||||
\membersection{wxTime::wxTime}\label{wxtimewxtime}
|
||||
|
||||
\func{}{wxTime}{\param{const wxDate\&}{ date}, \param{hourTy }{h = 0}, \param{minuteTy }{m = 0}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
|
||||
|
||||
Initialize using a \helpref{wxDate}{wxdate} object, hours, minutes, seconds, and whether DST time.
|
||||
|
@ -1,12 +1,35 @@
|
||||
\section{Interprocess communication overview}\label{ipcoverview}
|
||||
|
||||
Classes: \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
|
||||
\rtfsp\helpref{wxDDEClient}{wxddeclient}.
|
||||
Classes: \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
|
||||
\helpref{wxDDEClient}{wxddeclient},
|
||||
\helpref{wxTCPServer}{wxtcpserver}, \helpref{wxTCPConnection}{wxtcpconnection},
|
||||
\helpref{wxTCPClient}{wxtcpclient}
|
||||
|
||||
TODO: rewrite.
|
||||
wxWindows has a number of different classes to help with interprocess communication
|
||||
and network programming. This section only discusses one family of classes - the DDE-like
|
||||
protocol - but here's a list of other useful classes:
|
||||
|
||||
The following describes how wxWindows implements DDE. The following
|
||||
three classes are central.
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item \helpref{wxSocketEvent}{wxsocketevent},
|
||||
\helpref{wxSocketBase}{wxsocketbase},
|
||||
\helpref{wxSocketClient}{wxsocketclient},
|
||||
\helpref{wxSocketServer}{wxsocketserver}: classes for the low-level TCP/IP API.
|
||||
\item \helpref{wxProtocol}{wxprotocol}, \helpref{wxURL}{wxurl}, \helpref{wxFTP}{wxftp}, wxHTTP: classes
|
||||
for programming popular Internet protocols.
|
||||
\end{itemize}
|
||||
|
||||
Further information on these classes will be available in due course.
|
||||
|
||||
wxWindows has a high-level protocol based on Windows DDE.
|
||||
There are two implementations of this DDE-like protocol:
|
||||
one using real DDE running on Windows only, and another using TCP/IP (sockets) that runs
|
||||
on most platforms. Since the API is the same apart from the names of the classes, you
|
||||
should find it easy to switch between the two implementations.
|
||||
|
||||
The following description refers to 'DDE' but remember that the equivalent wxTCP... classes
|
||||
can be used in much the same way.
|
||||
|
||||
Three classes are central to the DDE API:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item wxDDEClient. This represents the client application, and is used
|
||||
@ -25,7 +48,7 @@ element of some messages. To create a connection (a conversation in
|
||||
Windows parlance), the client application sends the message
|
||||
MakeConnection to the client object, with a string service name to
|
||||
identify the server and a topic name to identify the topic for the
|
||||
duration of the connection. Under UNIX, the service name must contain an
|
||||
duration of the connection. Under Unix, the service name must contain an
|
||||
integer port identifier.
|
||||
|
||||
The server then responds and either vetos the connection or allows it.
|
||||
@ -58,7 +81,7 @@ an appropriate connection object.
|
||||
\item Provide handlers for various messages that are sent to the client
|
||||
side of a wxDDEConnection.
|
||||
\item When appropriate, create a new connection by sending a MakeConnection
|
||||
message to the client object, with arguments host name (processed in UNIX only),
|
||||
message to the client object, with arguments host name (processed in Unix only),
|
||||
service name, and topic name for this connection. The client object will call OnMakeConnection
|
||||
to create a connection object of the desired type.
|
||||
\item Use the wxDDEConnection member functions to send messages to the server.
|
||||
@ -99,15 +122,11 @@ using the Execute, Request, and Poke commands from the client, together
|
||||
with an Advise loop: selecting an item in the server list box causes
|
||||
that item to be highlighted in the client list box.
|
||||
|
||||
See also the source for wxHelp, which is a DDE server, and the files
|
||||
wx\_help.h and wx\_help.cc which implement the client interface to
|
||||
wxHelp.
|
||||
|
||||
\subsection{More DDE details}
|
||||
|
||||
A wxDDEClient object represents the client part of a client-server DDE
|
||||
(Dynamic Data Exchange) conversation (available in both
|
||||
Windows and UNIX).
|
||||
Windows and Unix).
|
||||
|
||||
To create a client which can communicate with a suitable server,
|
||||
you need to derive a class from wxDDEConnection and another from wxDDEClient.
|
||||
@ -124,7 +143,7 @@ class MyConnection: public wxDDEConnection
|
||||
public:
|
||||
MyConnection(void)::wxDDEConnection(ipc_buffer, 3999) {}
|
||||
~MyConnection(void) { }
|
||||
Bool OnAdvise(char *topic, char *item, char *data, int size, int format)
|
||||
bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format)
|
||||
{ wxMessageBox(topic, data); }
|
||||
};
|
||||
|
||||
@ -132,7 +151,7 @@ class MyClient: public wxDDEClient
|
||||
{
|
||||
public:
|
||||
MyClient(void) {}
|
||||
wxDDEConnection *OnMakeConnection(void) { return new MyConnection; }
|
||||
wxConnectionBase *OnMakeConnection(void) { return new MyConnection; }
|
||||
};
|
||||
|
||||
\end{verbatim}
|
||||
@ -140,8 +159,7 @@ class MyClient: public wxDDEClient
|
||||
Here, {\bf MyConnection} will respond to \helpref{OnAdvise}{wxddeconnectiononadvise} messages sent
|
||||
by the server.
|
||||
|
||||
When the client application starts, it must first call \helpref{wxIPCInitialize}{wxipcinitialize}\rtfsp
|
||||
before creating an instance of the derived wxDDEClient. In the following, command line
|
||||
When the client application starts, it must create an instance of the derived wxDDEClient. In the following, command line
|
||||
arguments are used to pass the host name (the name of the machine the server is running
|
||||
on) and the server name (identifying the server process). Calling \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection}\rtfsp
|
||||
implicitly creates an instance of {\bf MyConnection} if the request for a
|
||||
@ -149,29 +167,22 @@ connection is accepted, and the client then requests an {\it Advise} loop
|
||||
from the server, where the server calls the client when data has changed.
|
||||
|
||||
\begin{verbatim}
|
||||
wxIPCInitialize();
|
||||
|
||||
char *server = "4242";
|
||||
char hostName[256];
|
||||
wxGetHostName(hostName, sizeof(hostName));
|
||||
|
||||
char *host = hostName;
|
||||
|
||||
if (argc > 1)
|
||||
server = argv[1];
|
||||
if (argc > 2)
|
||||
host = argv[2];
|
||||
wxString server = "4242";
|
||||
wxString hostName;
|
||||
wxGetHostName(hostName);
|
||||
|
||||
// Create a new client
|
||||
MyClient *client = new MyClient;
|
||||
the_connection = (MyConnection *)client->MakeConnection(host, server, "IPC TEST");
|
||||
connection = (MyConnection *)client->MakeConnection(hostName, server, "IPC TEST");
|
||||
|
||||
if (!the_connection)
|
||||
if (!connection)
|
||||
{
|
||||
wxMessageBox("Failed to make connection to server", "Client Demo Error");
|
||||
return NULL;
|
||||
}
|
||||
the_connection->StartAdvise("Item");
|
||||
connection->StartAdvise("Item");
|
||||
\end{verbatim}
|
||||
|
||||
Note that it is no longer necessary to call wxDDEInitialize or wxDDECleanUp, since
|
||||
wxWindows will do this itself if necessary.
|
||||
|
||||
|
@ -10,7 +10,7 @@ wxStringTokenizer helps you to break a string up into a number of tokens.
|
||||
|
||||
\membersection{wxStringTokenizer::wxStringTokenizer}\label{wxstringtokenizerwxstringtokenizer}
|
||||
|
||||
\func{}{wxStringTokenizer}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " \t\r\n"}, \param{bool }{ret\_delim = FALSE}}
|
||||
\func{}{wxStringTokenizer}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{bool }{ret\_delim = FALSE}}
|
||||
|
||||
Constructor. Pass the string to tokenze, a string containing delimiters,
|
||||
a flag specifying whether delimiters are retained.
|
||||
|
@ -53,6 +53,19 @@ Using makefiles:
|
||||
3. Change directory to wx\samples and type 'nmake -f makefile.vc'
|
||||
to make all the samples. You can also make them individually.
|
||||
|
||||
To build the release version using makefiles, add FINAL=1 to your
|
||||
nmake invocation, both when building the library and for samples.
|
||||
|
||||
Use the 'clean' target to clean all objects, libraries and
|
||||
executables.
|
||||
|
||||
To build the DLL version using makefiles:
|
||||
|
||||
1. Change directory to wx\src\msw. Type 'nmake -f makefile.vc dll pch'
|
||||
to make both a suitable DLL and import library, and to build a
|
||||
suitable precompiled header file for compiling applications.
|
||||
2. Invoke a sample makefile with 'nmake -f makefile.vc WXUSINGDLL=1'.
|
||||
|
||||
Note (1): if you wish to use templates, please edit
|
||||
include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0.
|
||||
Without this, the redefinition of 'new' will cause problems in
|
||||
@ -72,6 +85,12 @@ Visual C++ 1.5 compilation
|
||||
3. Change directory to a sample, such as wx\samples\minimal, and
|
||||
type 'nmake -f makefile.dos'.
|
||||
|
||||
Add FINAL=1 to your makefile invocation to build the release
|
||||
versions of the library and samples.
|
||||
|
||||
Use the 'clean' target to clean all objects, libraries and
|
||||
executables.
|
||||
|
||||
Borland C++ 4.5/5.0 compilation
|
||||
-------------------------------
|
||||
|
||||
|
@ -133,12 +133,15 @@ WXDLLEXPORT bool wxGetEmailAddress(char *buf, int maxSize);
|
||||
|
||||
// Get hostname.
|
||||
WXDLLEXPORT bool wxGetHostName(char *buf, int maxSize);
|
||||
WXDLLEXPORT bool wxGetHostName(wxString& buf);
|
||||
|
||||
// Get user ID e.g. jacs
|
||||
WXDLLEXPORT bool wxGetUserId(char *buf, int maxSize);
|
||||
WXDLLEXPORT bool wxGetUserId(wxString& buf);
|
||||
|
||||
// Get user name e.g. Julian Smart
|
||||
WXDLLEXPORT bool wxGetUserName(char *buf, int maxSize);
|
||||
WXDLLEXPORT bool wxGetUserName(wxString& buf);
|
||||
|
||||
/*
|
||||
* Strip out any menu codes
|
||||
@ -185,13 +188,20 @@ WXDLLEXPORT int wxGetOsVersion(int *majorVsn= (int *) NULL,int *minorVsn= (int *
|
||||
class WXDLLEXPORT wxCursor;
|
||||
WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR;
|
||||
WXDLLEXPORT void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR);
|
||||
|
||||
|
||||
// Restore cursor to normal
|
||||
WXDLLEXPORT void wxEndBusyCursor(void);
|
||||
|
||||
// TRUE if we're between the above two calls
|
||||
WXDLLEXPORT bool wxIsBusy(void);
|
||||
|
||||
// Convenience class so we can just create a wxBusyCursor object on the stack
|
||||
class WXDLLEXPORT wxBusyCursor
|
||||
{
|
||||
inline wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) { wxBeginBusyCursor(cursor); }
|
||||
inline ~wxBusyCursor() { wxEndBusyCursor(); }
|
||||
};
|
||||
|
||||
/* Error message functions used by wxWindows */
|
||||
|
||||
// Non-fatal error (continues)
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
* File: client.cpp
|
||||
* Purpose: wxSocket: client demo
|
||||
* Author: LAVAUX Guilhem (from minimal.cc)
|
||||
* Author: LAVAUX Guilhem
|
||||
* Created: June 1997
|
||||
* Updated:
|
||||
* Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||
* (C) 1997, LAVAUX Guilhem
|
||||
* Copyright: (c) 1997, LAVAUX Guilhem
|
||||
*/
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#pragma interface
|
||||
@ -22,10 +22,15 @@
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/socket.h"
|
||||
#include "wx/url.h"
|
||||
#include "wx/protocol/http.h"
|
||||
|
||||
#if defined(__WXMOTIF__) || defined(__WXGTK__)
|
||||
#include "mondrian.xpm"
|
||||
#endif
|
||||
|
||||
// Define a new application type
|
||||
class MyApp: public wxApp
|
||||
{ public:
|
||||
@ -88,12 +93,7 @@ bool MyApp::OnInit(void)
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
// Give it an icon
|
||||
#ifdef wx_msw
|
||||
frame->SetIcon(new wxIcon("mondrian"));
|
||||
#endif
|
||||
#ifdef wx_x
|
||||
frame->SetIcon(new wxIcon("mondrian.xbm"));
|
||||
#endif
|
||||
frame->SetIcon(wxICON(mondrian));
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu();
|
||||
@ -116,7 +116,7 @@ bool MyApp::OnInit(void)
|
||||
frame->SetMenuBar(menu_bar);
|
||||
|
||||
// Make a panel with a message
|
||||
(void)new wxPanel(frame, 0, 0, 300, 100);
|
||||
(void)new wxPanel(frame, -1, wxPoint(0, 0), wxSize(300, 100));
|
||||
|
||||
// Show the frame
|
||||
frame->Show(TRUE);
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
* File: server.cpp
|
||||
* Purpose: wxSocket: server demo
|
||||
* Author: LAVAUX Guilhem (from minimal.cc)
|
||||
* Author: LAVAUX Guilhem
|
||||
* Created: June 1997
|
||||
* Updated:
|
||||
* Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||
* (C) 1997, LAVAUX Guilhem
|
||||
* Copyright: (C) 1997, LAVAUX Guilhem
|
||||
*/
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#pragma interface
|
||||
@ -22,8 +22,13 @@
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/socket.h"
|
||||
|
||||
#if defined(__WXMOTIF__) || defined(__WXGTK__)
|
||||
#include "mondrian.xpm"
|
||||
#endif
|
||||
|
||||
// Define a new application type
|
||||
class MyApp: public wxApp
|
||||
{ public:
|
||||
@ -77,12 +82,7 @@ bool MyApp::OnInit(void)
|
||||
MyFrame *frame = new MyFrame(NULL);
|
||||
|
||||
// Give it an icon
|
||||
#ifdef wx_msw
|
||||
frame->SetIcon(new wxIcon("mondrian"));
|
||||
#endif
|
||||
#ifdef wx_x
|
||||
frame->SetIcon(new wxIcon("aiai.xbm"));
|
||||
#endif
|
||||
frame->SetIcon(wxICON(mondrian));
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
|
@ -811,3 +811,41 @@ int isascii( int c )
|
||||
return ( c >= 0 && c < 128 ) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Overloaded functions, taking a wxString
|
||||
bool wxGetHostName(wxString& name)
|
||||
{
|
||||
bool success = wxGetHostName(wxBuffer, 500);
|
||||
if (success)
|
||||
{
|
||||
name = wxBuffer;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxGetUserId(wxString& buf)
|
||||
{
|
||||
bool success = wxGetUserId(wxBuffer, 500);
|
||||
if (success)
|
||||
{
|
||||
buf = wxBuffer;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxGetUserName(wxString& buf)
|
||||
{
|
||||
bool success = wxGetUserName(wxBuffer, 500);
|
||||
if (success)
|
||||
{
|
||||
buf = wxBuffer;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -20,13 +20,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
struct wxBusyCursor
|
||||
{
|
||||
wxBusyCursor() { wxBeginBusyCursor(); }
|
||||
~wxBusyCursor() { wxEndBusyCursor(); }
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS(wxExtHelpController, wxHTMLHelpControllerBase)
|
||||
|
||||
/**
|
||||
|
@ -33,13 +33,6 @@ public:
|
||||
{ id = iid; url = iurl; doc = idoc; }
|
||||
};
|
||||
|
||||
|
||||
struct wxBusyCursor
|
||||
{
|
||||
wxBusyCursor() { wxBeginBusyCursor(); }
|
||||
~wxBusyCursor() { wxEndBusyCursor(); }
|
||||
};
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxHTMLHelpControllerBase, wxHelpControllerBase)
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "wx/app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/module.h"
|
||||
#include "wx/dde.h"
|
||||
|
||||
#ifndef __TWIN32__
|
||||
@ -40,6 +40,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include <windows.h>
|
||||
#include <ddeml.h>
|
||||
#include <string.h>
|
||||
@ -120,6 +121,21 @@ void wxDDECleanUp()
|
||||
delete [] DDEDefaultIPCBuffer ;
|
||||
}
|
||||
|
||||
// A module to allow DDE initialization/cleanup
|
||||
// without calling these functions from app.cpp or from
|
||||
// the user's application.
|
||||
|
||||
class wxDDEModule: public wxModule
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDDEModule)
|
||||
public:
|
||||
wxDDEModule() {}
|
||||
bool OnInit() { wxDDEInitialize(); return TRUE; };
|
||||
void OnExit() { wxDDECleanUp(); };
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxDDEModule, wxModule)
|
||||
|
||||
// Global find connection
|
||||
static wxDDEConnection *DDEFindConnection(HCONV hConv)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user