Made wxGTK dataobj.cpp compile; removed flashing from wxGLCanvas samples;

some doc bug fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-24 23:56:51 +00:00
parent ba681060f3
commit 06ad863606
25 changed files with 428 additions and 213 deletions

View File

@@ -23,7 +23,9 @@ wxMotif:
- Setting the size of a hidden window may show that window.
- Motif-specific wxImage functions not yet implemented.
- wxRadioBox sometimes doesn't show (e.g. in controls sample).
- wxStaticText doesn't wrap.
General:
--------

View File

@@ -2,7 +2,7 @@
This section describes the so called {\it dynamic arrays}. This is a C
array-like data structure i.e. the member access time is constant (and not
linear in number of container elements as for linked lists). However, these
linear according to the number of container elements as for linked lists). However, these
arrays are dynamic in the sense that they will automatically allocate more
memory if there is not enough of it for adding a new element. They also perform
range checking on the index values but in debug mode only, so please be sure to
@@ -15,7 +15,7 @@ release build.
The array classes were designed to be reasonably efficient, both in terms of
run-time speed and memory consumption and the executable size. The speed of
array item access if, of course, constant (independent of number of elements)
array item access is, of course, constant (independent of the number of elements)
making them much more efficient than linked lists (\helpref{wxList}{wxlist}).
Adding items to the arrays is also implemented in more or less constant time -
but the price is preallocating the memory in advance. In the \helpref{memory management}{wxarraymemorymanagement} section
@@ -35,8 +35,8 @@ element type.
wxArray is suitable for storing integer types and pointers which it does not
treat as objects in any way, i.e. the element pointed to by the pointer is not
deleted when the element is removed from the array \&c. It should be noted that
all of wxArray functions are inline, so it costs strictly nothing to define as
deleted when the element is removed from the array. It should be noted that
all of wxArray's functions are inline, so it costs strictly nothing to define as
many array types as you want (either in terms of the executable size or the
speed) as long as at least one of them is defined and this is always the case
because wxArrays are used by wxWindows internally.
@@ -94,7 +94,6 @@ class MyDirectory
WX_DEFINE_OBJARRAY(ArrayOfDirectories);
// that's all!
\end{verbatim}
It is not as elegant as writing
@@ -106,7 +105,7 @@ typedef std::vector<MyDirectory> ArrayOfDirectories;
but is not that complicated and allows the code to be compiled with any, however
dumb, C++ compiler in the world.
The things are much simpler for wxArray and wxSortedArray however: it is enough
Things are much simpler for wxArray and wxSortedArray however: it is enough
just to write
\begin{verbatim}
@@ -209,7 +208,7 @@ does exactly the same as \helpref{Item()}{wxarrayitem} method.
\membersection{WX\_DEFINE\_ARRAY}\label{wxdefinearray}
\func{}{WX\_DEFINE\_ARRAY}{\param{}{T}, \param{name}}
\func{}{WX\_DEFINE\_ARRAY}{\param{}{T}, \param{}{name}}
This macro defines a new array class named {\it name} and containing the
elements of type {\it T}. Example:
@@ -335,11 +334,11 @@ element passed to it is less than, equal to or greater than the second one.
\func{}{wxObjArray}{\param{const wxObjArray\& }{array}}
\func{wxArray\&}{operator=}{\param{const wxArray\& }{array}}
\func{wxArray\&}{operator$=$}{\param{const wxArray\& }{array}}
\func{wxSortedArray\&}{operator=}{\param{const wxSortedArray\& }{array}}
\func{wxSortedArray\&}{operator$=$}{\param{const wxSortedArray\& }{array}}
\func{wxObjArray\&}{operator=}{\param{const wxObjArray\& }{array}}
\func{wxObjArray\&}{operator$=$}{\param{const wxObjArray\& }{array}}
The copy constructors and assignment operators perform a shallow array copy
(i.e. they don't copy the objects pointed to even if the source array contains
@@ -348,11 +347,11 @@ the array element are copied too) for wxObjArray.
\membersection{wxArray::\destruct{wxArray}}\label{wxarraydtor}
\func{}{\destruct{wxArray}}{}
\func{}{\destruct{wxArray}}{\void}
\func{}{\destruct{wxSortedArray}}{}
\func{}{\destruct{wxSortedArray}}{\void}
\func{}{\destruct{wxObjArray}}{}
\func{}{\destruct{wxObjArray}}{\void}
The wxObjArray destructor deletes all the items owned by the array. This is not
done by wxArray and wxSortedArray versions - you may use

View File

@@ -198,6 +198,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
\input thread.tex
\input time.tex
\input timer.tex
\input tokenizr.tex
\input toolbar.tex
\input treectrl.tex
\input treeevt.tex

View File

@@ -33,14 +33,14 @@ enum wxDragResult
\membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
\func{}{wxDropSource}{\param{wxWindow }{*win = NULL}}
\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}}
Default/wxGTK-specific constructor. If you use the default constructor you must
call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
{\it win} is required by wxGTK and therefore should always be set.
\func{}{wxDropSource}{\param{wxDataObject }{\&data}, \param{wxWindow }{*win = NULL}}
\func{}{wxDropSource}{\param{wxDataObject\& }{data}, \param{wxWindow*}{ win = NULL}}
\wxheading{Parameters}
@@ -54,7 +54,7 @@ call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
\membersection{wxDropSource::SetData}\label{wxdropsourcesetdata}
\func{void}{SetData}{\param{wxDataObject }{\&data}}
\func{void}{SetData}{\param{wxDataObject\&}{ data}}
Sets the data \helpref{data object}{wxdataobject} associated with the drop source.

View File

@@ -79,7 +79,7 @@ See \helpref{Read}{wxstreambufreadbuf}
\membersection{wxStreamBuffer::WriteBack}
\func{size\_t}{WriteBack}{\param{const char *}{buffer}, \param{size\_t}{ size}}
\func{size\_t}{WriteBack}{\param{const char*}{ buffer}, \param{size\_t}{ size}}
This function is only useful in ``read'' mode. It puts the specified \it{buffer}
in the input queue of the stream buf. By this way, the next
@@ -127,7 +127,7 @@ Frees all internal buffers and resets to initial state all variables.
\membersection{wxStreamBuffer::SetBufferIO}
\func{void}{SetBufferIO}{\param{char *}{ buffer\_start}, \param{char *}{ buffer\_end}}
\func{void}{SetBufferIO}{\param{char*}{ buffer\_start}, \param{char*}{ buffer\_end}}
Specifies which pointers to use for stream buffering. You need to pass a pointer on the
start of the buffer end and another on the end.
@@ -212,7 +212,7 @@ Returns the amount of available datas in the buffer.
% --------------
\membersection{wxStreamBuffer::Stream}
\func{wxStreamBase *}{Stream}{\void}
\func{wxStreamBase*}{Stream}{\void}
Returns the stream parent of the stream buffer.

View File

@@ -21,46 +21,53 @@ None
% -----------
\membersection{wxStreamBase::wxStreamBase}
\func{}{wxStreamBase}{\void}
Creates a dummy stream object.
\membersection{wxStreamBase::\destruct{wxStreamBase}}
\func{}{\destruct{wxStreamBase}}
Destructor.
\membersection{wxStreamBase::LastError}
\constfunc{wxStreamError}{LastError}{\void}
This function returns the last happened error. It is of the form:
% TODOTODOTODOTODOTODOTODOTODO
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. (E.g. for a file it the size of
the file) Warning ! There are streams which haven't size by definition (E.g.
a socket).
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}}
\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 which was actually read.
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
@@ -69,7 +76,6 @@ current position in the stream.
% -----------------------------------------------------------------------------
% wxInputStream
% -----------------------------------------------------------------------------
\section{\class{wxInputStream}}\label{wxinputstream}
\wxheading{Derived from}
@@ -83,8 +89,8 @@ current position in the stream.
% -----------
% ctor & dtor
% -----------
\membersection{wxInputStream::wxInputStream}
\func{}{wxInputStream}{\void}
Creates a dummy input stream.
@@ -95,6 +101,7 @@ 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}}
Destructor.
@@ -102,41 +109,45 @@ 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}}
\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 needs absolutely to have at least the specified size.
\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}}
\func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream_out}}
Reads data from the input queue and stores them in the specified output stream.
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.
@@ -144,13 +155,14 @@ Returns the current stream position.
% ---------------
% State functions
% ---------------
\membersection{wxInputStream::InputStreamBuffer}
\func{wxStreamBuffer *}{InputStreamBuffer}{\void}
\func{wxStreamBuffer*}{InputStreamBuffer}{\void}
Returns the stream buffer associated with the input stream.
\membersection{wxInputStream::LastRead}
\constfunc{size_t}{LastRead}{\void}
Returns the last amount of bytes read.
@@ -158,7 +170,6 @@ Returns the last amount of bytes read.
% -----------------------------------------------------------------------------
% wxOutputStream
% -----------------------------------------------------------------------------
\section{\class{wx0utputStream}}\label{wxoutputstream}
\wxheading{Derived from}
@@ -172,18 +183,19 @@ Returns the last amount of bytes read.
% -----------
% ctor & dtor
% -----------
\membersection{wxOutputStream::wxOutputStream}
\func{}{wxOutputStream}{\void}
Creates a dummy wxOutputStream object.
\func{}{wxOutputStream}{\param{wxStreamBuffer *}{sbuf}}
\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}}
Destructor.
@@ -191,23 +203,24 @@ 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}}
\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 needs absolutely to have at least the specified size.
\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}}
\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
@@ -216,13 +229,14 @@ by one of the two streams.
% ------------------
% Position functions
% ------------------
\membersection{wxOutputStream::SeekO}
\func{off_t}{SeekO}{\param{off_t}{ pos}, \param{wxSeekMode}}
Changes the stream current position.
\membersection{wxOutputStream::TellO}
\constfunc{off_t}{TellO}{\void}
Returns the current stream position.
@@ -230,20 +244,19 @@ 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}
\constfunc{size_t}{LastWrite}{\void}
% -----------------------------------------------------------------------------
% wxFilterInputStream
% -----------------------------------------------------------------------------
\section{\class{wxFilterInputStream}}\label{wxfilterinputstream}
\wxheading{Derived from}
@@ -259,12 +272,12 @@ differs and it is documented below.
% ctor & dtor
% -----------
\membersection{wxFilterInputStream::wxFilterInputStream}
\func{}{wxFilterInputStream}{\param{wxInputStream&}{ stream}}
\func{}{wxFilterInputStream}{\param{wxInputStream\&}{ stream}}
% -----------------------------------------------------------------------------
% wxFilterOutputStream
% -----------------------------------------------------------------------------
\section{\class{wxFilterOutputStream}}\label{wxfilteroutputstream}
\wxheading{Derived from}
@@ -280,4 +293,5 @@ differs and it is documented below.
% ctor & dtor
% -----------
\membersection{wxFilterOutputStream::wxFilterOutputStream}
\func{}{wxFilterOutputStream}{\param{wxOutputStream&}{ stream}}
\func{}{wxFilterOutputStream}{\param{wxOutputStream\&}{ stream}}

View File

@@ -2,11 +2,11 @@
Classes: \helpref{wxList}{wxlist}, \helpref{wxArray}{wxarray}
wxWindows uses itself several container classes including (double) linked lists
wxWindows uses itself several container classes including doubly-linked lists
and dynamic arrays (i.e. arrays which expand automatically when they become
full). For both historical and portability reasons wxWindows does not
use STL which provides the standard implementation of many container classes in
C++: first of all, wxWindows had existed well before STL was written and
C++. First of all, wxWindows has existed since well before STL was written, and
secondly we don't believe that today compilers can deal really well with all of
STL classes (this is especially true for some less common platforms). Of
course, the compilers are evolving quite rapidly and hopefully their progress
@@ -18,20 +18,20 @@ ones, but they are quite useful and may be compiled with absolutely any C++
compiler. They're used internally by wxWindows, but may, of course, be used in
your programs as well if you wish.
The list classes in wxWindows are double-linked lists which may either own the
The list classes in wxWindows are doubly-linked lists which may either own the
objects they contain (meaning that the list deletes the object when it is
removed from the list or the list itself is destroyed) or just store the
pointers depending on whether you called or not
\helpref{wxList::DeleteContents}{wxlistdeletecontents} method.
Dynamic arrays resemble to C arrays but with two important differences: they
Dynamic arrays resemble C arrays but with two important differences: they
provide run-time range checking in debug builds and they expand automatically
the allocated memory when there is no more space for new items. They come in
two sorts: the "plain" arrays which store either built-in types such as "char",
"int" or "bool" or the pointers to arbitrary objects, or "object arrays" which
own the object pointers to which they store.
For the same portability reasons, container classes implementation in wxWindows
For the same portability reasons, the container classes implementation in wxWindows
does not use templates, but is rather based on C preprocessor i.e. is done with
the macros: {\it WX\_DECLARE\_LIST} and {\it WX\_DEFINE\_LIST} for the linked
lists and {\it WX\_DECLARE\_ARRAY}, {\it WX\_DECLARE\_OBJARRAY} and {\it WX\_DEFINE\_OBJARRAY} for
@@ -44,7 +44,7 @@ declaration), otherwise destructors of the container elements will not be
called! As array classes never delete the items they contain anyhow, there is
no WX\_DEFINE\_ARRAY macro for them.
Examples of usage of these macros may be found in \helpref{wxList}{wxlist} and
Examples of usage of these macros may be found in \helpref{wxList}{wxlist} and
\helpref{wxArray}{wxarray} documentation.
Finally, wxWindows predefines several commonly used container classes. wxList

View File

@@ -11,7 +11,6 @@
% ----------------------------------------------------------------------------
% Members
% ----------------------------------------------------------------------------
\latexignore{\rtfignore{\membersection{Members}}}
\membersection{wxURL::wxURL}\label{wxurlconstr}

View File

@@ -3,8 +3,6 @@ Outstanding issues
(see also todo.txt)
- wxTreeCtrl, wxListCtrl need some debugging (probably mostly
wxMotif scrolling issues).
- wxTextCtrl doesn't work as a stream buffer in Linux/gcc
- No wxSpinButton
- Need a way of specifying default settings for colour/font/etc.

View File

@@ -44,8 +44,6 @@ High Priority
- Miscellaneous events.
- wxGLCanvas: cure bad flicker
- Use wxImage to load other formats into wxBitmaps, such as PNG, BMP.
Low Priority