From e3c10211e41d4e79c3775207ba02f9a4872087aa Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Mon, 9 Oct 2000 14:31:03 +0000
Subject: [PATCH] Added wxQuantize, wxTipWindow, wxSplashScreen docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/bitmap.tex   |  2 +-
 docs/latex/wx/category.tex |  7 +++-
 docs/latex/wx/classes.tex  |  3 ++
 docs/latex/wx/helpprov.tex |  4 ++
 docs/latex/wx/hprovcnt.tex |  7 +++-
 docs/latex/wx/hprovsmp.tex |  4 ++
 docs/latex/wx/quantize.tex | 49 ++++++++++++++++++++++
 docs/latex/wx/splash.tex   | 83 ++++++++++++++++++++++++++++++++++++++
 docs/latex/wx/tipwin.tex   | 34 ++++++++++++++++
 9 files changed, 189 insertions(+), 4 deletions(-)
 create mode 100644 docs/latex/wx/quantize.tex
 create mode 100644 docs/latex/wx/splash.tex
 create mode 100644 docs/latex/wx/tipwin.tex

diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex
index b639c4d397..76b74824e1 100644
--- a/docs/latex/wx/bitmap.tex
+++ b/docs/latex/wx/bitmap.tex
@@ -10,7 +10,7 @@ either monochrome or colour.
 \helpref{wxGDIObject}{wxgdiobject}\\
 \helpref{wxObject}{wxobject}
 
-\wxheading{Include files}
+\wxheading{Include file}
 
 <wx/bitmap.h>
 
diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex
index dc38e4f001..37611eab9d 100644
--- a/docs/latex/wx/category.tex
+++ b/docs/latex/wx/category.tex
@@ -14,12 +14,14 @@ Frames may contain windows, and dialog boxes may directly contain controls.
 \begin{twocollist}\itemsep=0pt
 \twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box}
 \twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame}
-\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
 \twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
+\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
 \twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar}
-\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.}
+\twocolitem{\helpref{wxSplashScreen}{wxsplashscreen}}{Splash screen class}
 \twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog
 (deprecated, use wxNotebook instead)}
+\twocolitem{\helpref{wxTipWindow}{wxtipwindow}}{Shows text in a small window}
+\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog}
 \end{twocollist}
 
 See also {\bf Common dialogs}.
@@ -510,6 +512,7 @@ used internally by the HTML classes.
 \twocolitem{\helpref{wxFontMapper}{wxfontmapper}}{Font mapping, finding suitable font for given encoding}
 \twocolitem{\helpref{wxEncodingConverter}{wxencodingconverter}}{Encoding conversions}
 \twocolitem{\helpref{wxCalendarDateAttr}{wxcalendardateattr}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
+\twocolitem{\helpref{wxQuantize}{wxquantize}}{Class to perform quantization, or colour reduction}
 \end{twocollist}
 
 {\large {\bf Database classes}}
diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex
index 9503bd0952..351e869f6f 100644
--- a/docs/latex/wx/classes.tex
+++ b/docs/latex/wx/classes.tex
@@ -227,6 +227,7 @@
 \input propval.tex
 \input propview.tex
 \input protocol.tex
+\input quantize.tex
 \input query.tex
 \input qylayevt.tex
 \input radiobox.tex
@@ -257,6 +258,7 @@
 \input spinbutt.tex
 \input spinctrl.tex
 \input spinevt.tex
+\input splash.tex
 \input splitevt.tex
 \input splitter.tex
 \input statbmp.tex
@@ -295,6 +297,7 @@
 \input time.tex
 \input timer.tex
 \input tipprov.tex
+\input tipwin.tex
 \input toolbar.tex
 \input tooltip.tex
 \input treectrl.tex
diff --git a/docs/latex/wx/helpprov.tex b/docs/latex/wx/helpprov.tex
index ba99934fa4..e338064bfd 100644
--- a/docs/latex/wx/helpprov.tex
+++ b/docs/latex/wx/helpprov.tex
@@ -10,6 +10,10 @@ wxHelpProvider::Set().
 
 No base class
 
+\wxheading{Include files}
+
+<wx/cshelp.h>
+
 \wxheading{See also}
 
 \helpref{wxContextHelp}{wxcontexthelp}, \helpref{wxContextHelpButton}{wxcontexthelpbutton}, 
diff --git a/docs/latex/wx/hprovcnt.tex b/docs/latex/wx/hprovcnt.tex
index a1146f9ab7..f5df37c824 100644
--- a/docs/latex/wx/hprovcnt.tex
+++ b/docs/latex/wx/hprovcnt.tex
@@ -3,7 +3,8 @@
 wxHelpControllerHelpProvider is an implementation of wxHelpProvider which supports
 both context identifiers and plain text help strings. If the help text is an integer,
 it is passed to wxHelpController::DisplayContextPopup. Otherwise, it shows the string
-in a tooltip as per wxSimpleHelpProvider.
+in a tooltip as per wxSimpleHelpProvider. If you use this with a wxCHMHelpController instance
+on windows, it will use the native style of tip window instead of \helpref{wxTipWindow}{wxtipwindow}.
 
 You can use the convenience function {\bf wxContextId} to convert an integer context
 id to a string for passing to \helpref{wxWindow::SetHelpText}{wxwindowsethelptext}.
@@ -13,6 +14,10 @@ id to a string for passing to \helpref{wxWindow::SetHelpText}{wxwindowsethelptex
 \helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}\\
 \helpref{wxHelpProvider}{wxhelpprovider}
 
+\wxheading{Include files}
+
+<wx/cshelp.h>
+
 \wxheading{See also}
 
 \helpref{wxHelpProvider}{wxhelpprovider}, \helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}, 
diff --git a/docs/latex/wx/hprovsmp.tex b/docs/latex/wx/hprovsmp.tex
index 116d8d4692..25f77bec0e 100644
--- a/docs/latex/wx/hprovsmp.tex
+++ b/docs/latex/wx/hprovsmp.tex
@@ -8,6 +8,10 @@ control (if any) in a tooltip.
 
 \helpref{wxHelpProvider}{wxhelpprovider}
 
+\wxheading{Include files}
+
+<wx/cshelp.h>
+
 \wxheading{See also}
 
 \helpref{wxHelpProvider}{wxhelpprovider}, \helpref{wxHelpControllerHelpProvider}{wxhelpcontrollerhelpprovider}, 
diff --git a/docs/latex/wx/quantize.tex b/docs/latex/wx/quantize.tex
new file mode 100644
index 0000000000..33065722bf
--- /dev/null
+++ b/docs/latex/wx/quantize.tex
@@ -0,0 +1,49 @@
+\section{\class{wxQuantize}}\label{wxquantize}
+
+Performs quantization, or colour reduction, on a wxImage.
+
+Functions in this class are static and so a wxQuantize object need not be created.
+
+\wxheading{Derived from}
+
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/quantize.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxQuantize::wxQuantize}\label{wxquantizewxquantize}
+
+\func{}{wxQuantize}{\void}
+
+Constructor. You do not need to construct a wxQuantize object since its functions are static.
+
+\membersection{wxQuantize::Quantize}\label{wxquantizequantize}
+
+\func{bool}{Quantize}{\param{const wxImage\& }{src}, \param{wxImage\& }{dest}, \param{wxPalette** }{pPalette}, \param{int }{desiredNoColours = 236}, \param{unsigned char** }{eightBitData = 0}, \param{int }{flags = wxQUANTIZE\_INCLUDE\_WINDOWS\_COLOURS|wxQUANTIZE\_FILL\_DESTINATION\_IMAGE|wxQUANTIZE\_RETURN\_8BIT\_DATA}}
+
+Reduce the colours in the source image and put the result into the
+destination image. Both images may be the same, to overwrite the source image.
+Specify an optional palette pointer to receive the resulting palette.
+This palette may be passed to ConvertImageToBitmap, for example.
+
+If you pass a palette pointer, you must free the palette yourself.
+
+\func{bool}{Quantize}{\param{const wxImage\& }{src}, \param{wxImage\& }{dest}, \param{int }{desiredNoColours = 236}, \param{unsigned char** }{eightBitData = 0}, \param{int }{flags = wxQUANTIZE\_INCLUDE\_WINDOWS\_COLOURS|wxQUANTIZE\_FILL\_DESTINATION\_IMAGE|wxQUANTIZE\_RETURN\_8BIT\_DATA}}
+
+This version sets a palette in the destination image so you don't
+have to manage it yourself.
+
+\membersection{wxQuantize::DoQuantize}\label{wxquantizedoquantize}
+
+\func{void}{DoQuantize}{\param{unsigned }{w}, \param{unsigned }{h}, \param{unsigned char** }{in\_rows}, \param{unsigned char** }{out\_rows}, \param{unsigned char* }{palette}, \param{int }{desiredNoColours}}
+
+Converts input bitmap(s) into 8bit representation with custom palette.
+
+in\_rows and out\_rows are arrays [0..h-1] of pointer to rows
+(in\_rows contains w * 3 bytes per row, out\_rows w bytes per row).
+
+Fills out\_rows with indexes into palette (which is also stored into palette variable).
+
diff --git a/docs/latex/wx/splash.tex b/docs/latex/wx/splash.tex
new file mode 100644
index 0000000000..cd0193bd2f
--- /dev/null
+++ b/docs/latex/wx/splash.tex
@@ -0,0 +1,83 @@
+\section{\class{wxSplashScreen}}\label{wxsplashscreen}
+
+wxSplashScreen shows a window with a thin border, displaying a bitmap describing your
+application. Show it in application initialisation, and then either explicitly destroy
+it or let it time-out.
+
+Example usage:
+
+\begin{verbatim}
+  wxBitmap bitmap;
+  if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
+  {
+      wxSplashScreen* splash = new wxSplashScreen(bitmap,
+          wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
+          6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
+          wxSIMPLE_BORDER|wxSTAY_ON_TOP);
+  }
+  wxYield();
+\end{verbatim}
+ 
+\wxheading{Derived from}
+
+\helpref{wxFrame}{wxframe}\\
+\helpref{wxWindow}{wxwindow}\\
+\helpref{wxEvtHandler}{wxevthandler}\\
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/splash.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxSplashScreen::wxSplashScreen}\label{wxsplashscreenwxsplashscreen}
+
+\func{}{wxSplashScreen}{\param{const wxBitmap\& }{bitmap}, \param{long }{splashStyle}, \param{int }{milliseconds}, \param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSIMPLE\_BORDER}}
+
+Construct the splash screen passing a bitmap, a style, a timeout, a window id, optional position
+and size, and a window style.
+
+{\it splashStyle} is a bitlist of some of the following:
+
+\begin{itemize}\itemsep=0pt
+\item wxSPLASH\_CENTRE\_ON\_PARENT
+\item wxSPLASH\_CENTRE\_ON\_SCREEN
+\item wxSPLASH\_NO\_CENTRE
+\item wxSPLASH\_TIMEOUT
+\item wxSPLASH\_NO\_TIMEOUT
+\end{itemize}
+
+{\it milliseconds} is the timeout in milliseconds.
+
+\membersection{wxSplashScreen::\destruct{wxSplashScreen}}\label{wxsplashscreendtor}
+
+\func{}{\destruct{wxSplashScreen}}{\void}
+
+Destroys the splash screen.
+
+\membersection{wxSplashScreen::OnCloseWindow}\label{wxsplashscreenonclosewindow}
+
+\func{void}{OnCloseWindow}{\param{wxCloseEvent\& }{event}}
+
+Reimplement this event handler if you want to set an application variable on window destruction, for example.
+
+\membersection{wxSplashScreen::GetSplashStyle}\label{wxsplashscreengetsplashstyle}
+
+\constfunc{long}{GetSplashStyle}{\void}
+
+Returns the splash style (see \helpref{wxSplashScreen::wxSplashScreen}{wxsplashscreenwxsplashscreen} for
+details).
+
+\membersection{wxSplashScreen::GetSplashWindow}\label{wxsplashscreengetsplashwindow}
+
+\constfunc{wxSplashScreenWindow*}{GetSplashWindow}{\void}
+
+Returns the window used to display the bitmap.
+
+\membersection{wxSplashScreen::GetTimeout}\label{wxsplashscreengettimeout}
+
+\constfunc{int}{GetTimeout}{\void}
+
+Returns the timeout in milliseconds.
+
diff --git a/docs/latex/wx/tipwin.tex b/docs/latex/wx/tipwin.tex
new file mode 100644
index 0000000000..602af2bba5
--- /dev/null
+++ b/docs/latex/wx/tipwin.tex
@@ -0,0 +1,34 @@
+\section{\class{wxTipWindow}}\label{wxtipwindow}
+
+Shows simple text in a popup tip window on creation. This is used by \helpref{wxSimpleHelpProvider}{wxsimplehelpprovider} to
+show popup help. The window automatically destroys itself when the user clicks on it or it loses
+the focus.
+
+You should not normally need to use it explicitly in your application since a help provider class
+will create it when required.
+
+\wxheading{Derived from}
+
+\helpref{wxFrame}{wxframe}\\
+\helpref{wxWindow}{wxwindow}\\
+\helpref{wxEvtHandler}{wxevthandler}\\
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/tipwin.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxTipWindow::wxTipWindow}\label{wxtipwindowwxtipwindow}
+
+\func{}{wxTipWindow}{\param{wxWindow* }{parent}, \param{const wxString\& }{text}, \param{wxCoord }{maxLength = 100}}
+
+Constructor. The tip is shown immediately the window is constructed.
+
+\membersection{wxTipWindow::Adjust}\label{wxtipwindowadjust}
+
+\func{void}{Adjust}{\param{const wxString\& }{text}, \param{wxCoord }{maxLength}}
+
+Calculates the client rect we need to display the text.
+
-- 
2.50.0

