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

@@ -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