Tidied some doc references; added Stefan's Blit optimisation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-12-29 14:21:38 +00:00
parent 29b5bcd515
commit e12be2f7fb
7 changed files with 81 additions and 85 deletions

View File

@ -90,7 +90,9 @@ configuration, can be handlers for BMP (loading) (always installed), GIF
(loading), PCX (loading), PNM (loading and saving as raw
rgb), PNG (loading and saving), JPEG (loading and saving), file formats.
See also: \helpref{wxImage}{wximage} \helpref{wxImageHandler}{wximagehandler}
\wxheading{See also}
\helpref{wxImage}{wximage}, \helpref{wxImageHandler}{wximagehandler}
\membersection{::wxIsAbsolutePath}
@ -258,7 +260,9 @@ Use of this function requires the file wx\_doc.h to be included.
Returns the FQDN (fully qualified domain host name) or an empty string on
error.
See also: \helpref{wxGetHostName}{wxgethostname}
\wxheading{See also}
\helpref{wxGetHostName}{wxgethostname}
\wxheading{Include files}
@ -296,7 +300,9 @@ The first variant of this function returns the hostname if successful or an
empty string otherwise. The second (deprecated) function returns TRUE
if successful, FALSE otherwise.
See also: \helpref{wxGetFullHostName}{wxgetfullhostname}
\wxheading{See also}
\helpref{wxGetFullHostName}{wxgetfullhostname}
\wxheading{Include files}
@ -321,7 +327,9 @@ The first variant of this function returns the login name if successful or an
empty string otherwise. The second (deprecated) function returns TRUE
if successful, FALSE otherwise.
See also: \helpref{wxGetUserName}{wxgetusername}
\wxheading{See also}
\helpref{wxGetUserName}{wxgetusername}
\wxheading{Include files}
@ -344,7 +352,9 @@ The first variant of this function returns the user name if successful or an
empty string otherwise. The second (deprecated) function returns TRUE
if successful, FALSE otherwise.
See also: \helpref{wxGetUserId}{wxgetuserid}
\wxheading{See also}
\helpref{wxGetUserId}{wxgetuserid}
\wxheading{Include files}
@ -427,20 +437,20 @@ buffer is never overflowed.
Returns the number of characters copied to the buffer or -1 if there is not
enough space.
\wxheading{See also:}
\helpref{wxVsnprintf}{wxvsnprintf},
\helpref{wxString::Printf}{wxstringprintf}
\wxheading{See also}
\membersection{::wxVsnprintf}\label{wxsnprintf}
\helpref{wxVsnprintf}{wxvsnprintf}, \helpref{wxString::Printf}{wxstringprintf}
\membersection{::wxVsnprintf}\label{wxvsnprintf}
\func{int}{wxVsnprintf}{\param{wxChar *}{buf}, \param{size\_t }{len}, \param{const wxChar *}{format}, \param{va\_list }{argptr}}
The same as \helpref{wxSnprintf}{wxsnprintf} but takes a {\tt va\_list}
argument instead of arbitrary number of parameters.
\wxheading{See also:}
\helpref{wxSnprintf}{wxsnprintf},
\helpref{wxString::PrintfV}{wxstringprintfv}
\wxheading{See also}
\helpref{wxSnprintf}{wxsnprintf}, \helpref{wxString::PrintfV}{wxstringprintfv}
\section{Dialog functions}\label{dialogfunctions}
@ -462,7 +472,7 @@ used with \helpref{wxShowTip}{wxshowtip}.
\docparam{currentTip}{The index of the first tip to show - normally this index
is remembered between the 2 program runs.}
\wxheading{See also:}
\wxheading{See also}
\helpref{Tips overview}{tipsoverview}
@ -691,7 +701,7 @@ It may be created with the \helpref{wxCreateFileTipProvider}{wxcreatefiletipprov
otherwise. This is used as the initial value for "Show tips at startup"
checkbox which is shown in the tips dialog.}
\wxheading{See also:}
\wxheading{See also}
\helpref{Tips overview}{tipsoverview}
@ -1293,7 +1303,7 @@ Under X only, returns the current display name. See also \helpref{wxSetDisplayNa
Return the (current) user's home directory.
\wxheading{See also:}
\wxheading{See also}
\helpref{wxGetUserHome}{wxgetuserhome}

View File

@ -1,9 +1,3 @@
%
% automatically generated by HelpGen from
% x.h at 23/Dec/99 21:30:20
%
\section{\class{wxHtmlLinkInfo}}\label{wxhtmllinkinfo}
This class stores all neccessary information about hypertext
@ -15,24 +9,19 @@ current implementation it stores URL and target frame name.
\helpref{wxObject}{wxobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxHtmlLinkInfo::wxHtmlLinkInfo}\label{wxhtmllinkinfowxhtmllinkinfo}
\func{}{wxHtmlLinkInfo}{\void}
Default ctor.
\membersection{wxHtmlLinkInfo::wxHtmlLinkInfo}\label{wxhtmllinkinfowxhtmllinkinfo}
\func{}{wxHtmlLinkInfo}{\param{const wxString\& }{href}, \param{const wxString\& }{target = wxEmptyString}}
Construct hypertext link from HREF (aka URL) and TARGET (name of target
frame).
\membersection{wxHtmlLinkInfo::GetHref}\label{wxhtmllinkinfogethref}
\func{wxString}{GetHref}{\void}
@ -46,3 +35,4 @@ Returns {\it HREF} value of the {\tt <A>} tag.
Returns {\it TARGET} value of the {\tt <A>} tag (this value
is used to specify in which frame should be the page pointed
by {\helpref{Href}{wxhtmllinkinfogethref} opened).

View File

@ -157,7 +157,7 @@ terminating NULL.
Destroys the list. Also destroys any remaining nodes, but does not destroy
client data held in the nodes.
\membersection{wxList::Append}
\membersection{wxList::Append}\label{wxlistappend}
\func{wxNode *}{Append}{\param{wxObject *}{object}}
@ -171,7 +171,7 @@ later retrieval using the key. The new node is returned in each case.
The key string is copied and stored by the list implementation.
\membersection{wxList::Clear}
\membersection{wxList::Clear}\label{wxlistclear}
\func{void}{Clear}{\void}
@ -184,20 +184,20 @@ Clears the list (but does not delete the client data stored with each node).
If {\it destroy} is TRUE, instructs the list to call {\it delete} on the client contents of
a node whenever the node is destroyed. The default is FALSE.
\membersection{wxList::DeleteNode}
\membersection{wxList::DeleteNode}\label{wxlistdeletenode}
\func{bool}{DeleteNode}{\param{wxNode *}{node}}
Deletes the given node from the list, returning TRUE if successful.
\membersection{wxList::DeleteObject}
\membersection{wxList::DeleteObject}\label{wxlistdeleteobject}
\func{bool}{DeleteObject}{\param{wxObject *}{object}}
Finds the given client {\it object} and deletes the appropriate node from the list, returning
TRUE if successful. The application must delete the actual object separately.
\membersection{wxList::Find}
\membersection{wxList::Find}\label{wxlistfind}
\func{wxNode *}{Find}{\param{long}{ key}}
@ -211,26 +211,26 @@ Returns the node whose stored key matches {\it key}. Use on a keyed list only.
Returns the number of elements in the list.
\membersection{wxList::GetFirst}
\membersection{wxList::GetFirst}\label{wxlistgetfirst}
\func{wxNode *}{GetFirst}{\void}
Returns the first node in the list (NULL if the list is empty).
\membersection{wxList::GetLast}
\membersection{wxList::GetLast}\label{wxlistgetlast}
\func{wxNode *}{GetLast}{\void}
Returns the last node in the list (NULL if the list is empty).
\membersection{wxList::IndexOf}
\membersection{wxList::IndexOf}\label{wxlistindexof}
\func{int}{IndexOf}{\param{wxObject*}{ obj }}
Returns the index of {\it obj} within the list or NOT\_FOUND if {\it obj}
is not found in the list.
\membersection{wxList::Insert}
\membersection{wxList::Insert}\label{wxlistinsert}
\func{wxNode *}{Insert}{\param{wxObject *}{object}}
@ -253,7 +253,7 @@ Inserts the object before the given {\it node}.
Returns the node at given position in the list.
\membersection{wxList::Member}
\membersection{wxList::Member}\label{wxlistmember}
\func{wxNode *}{Member}{\param{wxObject *}{object}}
@ -261,7 +261,7 @@ Returns the node at given position in the list.
Returns the node associated with {\it object} if it is in the list, NULL otherwise.
\membersection{wxList::Nth}
\membersection{wxList::Nth}\label{wxlistnth}
\func{wxNode *}{Nth}{\param{int}{ n}}
@ -270,7 +270,7 @@ Returns the node associated with {\it object} if it is in the list, NULL otherwi
Returns the {\it nth} node in the list, indexing from zero (NULL if the list is empty
or the nth node could not be found).
\membersection{wxList::Number}
\membersection{wxList::Number}\label{wxlistnumber}
\func{int}{Number}{\void}
@ -278,7 +278,7 @@ or the nth node could not be found).
Returns the number of elements in the list.
\membersection{wxList::Sort}
\membersection{wxList::Sort}\label{wxlistsort}
\func{void}{Sort}{\param{wxSortCompareFunction}{ compfunc}}
@ -312,4 +312,3 @@ Example:
}
\end{verbatim}

View File

@ -229,25 +229,6 @@ Enables or disables (greys out) a menu item.
Finds the menu item id for a menu item string.
\wxheading{Parameters}
\docparam{itemString}{Menu item string to find.}
\wxheading{Return value}
Menu item identifier, or wxNOT\_FOUND if none is found.
\wxheading{Remarks}
Any special menu codes are stripped out of source and target strings
before matching.
\wxheading{See also}
\helpref{wxMenu::FindItem}{wxmenufinditem}
\membersection{wxMenu::FindItem}\label{wxmenufinditem}
\constfunc{wxMenuItem *}{FindItem}{\param{int}{ id}, \param{wxMenu **}{menu = NULL}}
Finds the menu item object associated with the given menu item identifier and,
@ -255,6 +236,8 @@ optionally, the (sub)menu it belongs to.
\wxheading{Parameters}
\docparam{itemString}{Menu item string to find.}
\docparam{id}{Menu item identifier.}
\docparam{menu}{If the pointer is not NULL, it will be filled with the items
@ -262,11 +245,14 @@ parent menu (if the item was found)}
\wxheading{Return value}
Returns the menu item object, or NULL if it is not found.
First form: menu item identifier, or wxNOT\_FOUND if none is found.
\wxheading{See also}
Second form: returns the menu item object, or NULL if it is not found.
\helpref{wxMenu::FindItem}{wxmenufinditem}
\wxheading{Remarks}
Any special menu codes are stripped out of source and target strings
before matching.
\pythonnote{The name of this method in wxPython is {\tt FindItemById}
and it does not support the second parameter.}
@ -704,7 +690,7 @@ Returns the menu at {\it menuIndex} (zero-based).
Returns the number of menus in this menubar.
\membersection{wxMenuBar::Insert}{wxmenubarinsert}
\membersection{wxMenuBar::Insert}\label{wxmenubarinsert}
\func{bool}{Insert}{\param{size\_t }{pos}, \param{wxMenu *}{menu}, \param{const wxString\& }{title}}
@ -800,8 +786,6 @@ responsible for deleting it.
\helpref{wxMenuBar::Insert}{wxmenubarinsert},\rtfsp
\helpref{wxMenuBar::Remove}{wxmenubarremove}
\membersection{wxMenuBar::IsChecked}\label{wxmenubarischecked}
\membersection{wxMenuBar::SetHelpString}\label{wxmenubarsethelpstring}
\func{void}{SetHelpString}{\param{int}{ id}, \param{const wxString\& }{helpString}}

View File

@ -544,10 +544,7 @@ A typical use of this member might be to pop up a menu.
\func{bool}{Realize}{\void}
This function should be called after you have added tools. It
calls, according to the implementation,
either \helpref{wxToolBar::CreateTools}{wxtoolbarcreatetools} or
\helpref{wxToolBar::Layout}{wxtoolbarlayout}.
This function should be called after you have added tools.
If you are using absolute positions for your tools when using a wxToolBarSimple object,
do not call this function. You must call it at all other times.

View File

@ -38,7 +38,7 @@ Win32 a thread can only access GDI objects such as pens, brushes, \&c created by
itself and not by the other threads).
For communication between threads, use
\helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingprocessevent}
\helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingevent}
or its short version \helpref{wxPostEvent}{wxpostevent}. These functions
have thread safe implementation so that they can be used as they are for
sending event from one thread to another.

View File

@ -1230,17 +1230,6 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
else
#endif
{
// Old code
#if 0
HDC dc_mask = CreateCompatibleDC((HDC) source->m_hDC);
::SelectObject(dc_mask, (HBITMAP) source->m_selectedBitmap.GetMask()->GetMaskBitmap());
success = (BitBlt(GetHdc(), xdest1, ydest1, (int)width, (int)height,
dc_mask, xsrc1, ysrc1, 0x00220326 /* NOTSRCAND */) != 0);
success = (BitBlt(GetHdc(), xdest1, ydest1, (int)width, (int)height,
(HDC) source->m_hDC, xsrc1, ysrc1, SRCPAINT) != 0);
::SelectObject(dc_mask, 0);
::DeleteDC(dc_mask);
#endif
// New code from Chris Breeze, 15/7/98
// Blit bitmap with mask
@ -1318,11 +1307,37 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
}
else
{
// If we are printing, source colours are screen colours
// not printer colours and so we need copy the bitmap
// pixel by pixel.
if (IsKindOf(CLASSINFO(wxPrinterDC)))
{
// If we are printing, source colours are screen colours
// not printer colours and so we need copy the bitmap
// pixel by pixel.
HDC dc_src = (HDC) source->m_hDC;
RECT rect;
for (int y = 0; y < height; y++)
{
// This is Stefan Csomor's optimisation, where
// identical adjacent pixels are drawn together.
// We still need a faster way of drawing bitmaps,
// perhaps converting to a DIB first and using SetDIBitsToDevice.
for (int x = 0; x < width; x++)
{
COLORREF col = ::GetPixel(dc_src, x, y) ;
HBRUSH brush = ::CreateSolidBrush( col );
rect.left = xdest1 + x;
rect.top = ydest1 + y;
while( (x + 1 < width) && (::GetPixel(dc_src, x + 1, y) == col ) )
{
++x ;
}
rect.right = xdest1 + x + 1;
rect.bottom = rect.top + 1;
::FillRect((HDC) m_hDC, &rect, brush);
::DeleteObject(brush);
}
}
/*
HDC dc_src = (HDC) source->m_hDC;
RECT rect;
for (int x = 0; x < width; x++)
@ -1336,7 +1351,8 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
::DeleteObject(brush);
}
}
}
*/
}
else
{
success = (BitBlt(GetHdc(), xdest1, ydest1, (int)width, (int)height, (HDC) source->m_hDC,