From 762e199741e236841278dfa6c08a7a0ca376252e Mon Sep 17 00:00:00 2001
From: Mattia Barbon <mbarbon@cpan.org>
Date: Fri, 27 Dec 2002 18:30:48 +0000
Subject: [PATCH]   wxPerl notes for DocView.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/docmanag.tex | 10 ++++++++++
 docs/latex/wx/doctempl.tex | 18 ++++++++++++++++++
 docs/latex/wx/scpdarry.tex |  2 +-
 docs/latex/wx/scpdptr.tex  |  2 +-
 docs/latex/wx/tdocview.tex |  9 +++++++++
 5 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/docs/latex/wx/docmanag.tex b/docs/latex/wx/docmanag.tex
index 5666e49938..dab5d749b2 100644
--- a/docs/latex/wx/docmanag.tex
+++ b/docs/latex/wx/docmanag.tex
@@ -358,6 +358,12 @@ followed by a file selector.
 
 This function is used in wxDocManager::CreateDocument.
 
+\perlnote{In wxPerl {\tt templates} is a reference to a list of templates.
+If you override this method in your document manager it must return
+two values, eg:\par
+  (doctemplate, path) = My::DocManager->SelectDocumentPath( ... );
+}
+
 \membersection{wxDocManager::SelectDocumentType}
 
 \func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates},
@@ -375,6 +381,8 @@ then this parameter indicates whether the list of templates that the user
 will have to choose from is sorted or not when shown the choice box dialog.  
 Default is FALSE.}
 
+\perlnote{In wxPerl {\tt templates} is a reference to a list of templates.}
+
 \membersection{wxDocManager::SelectViewType}
 
 \func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates},
@@ -394,6 +402,8 @@ then this parameter indicates whether the list of templates that the user
 will have to choose from is sorted or not when shown the choice box dialog.  
 Default is FALSE.}
 
+\perlnote{In wxPerl {\tt templates} is a reference to a list of templates.}
+
 \membersection{wxDocManager::SetLastDirectory}\label{wxdocmanagersetlastdirectory}
 
 \func{void}{SetLastDirectory}{\param{const wxString\&}{ dir}}
diff --git a/docs/latex/wx/doctempl.tex b/docs/latex/wx/doctempl.tex
index 9cd7334232..8d817852db 100644
--- a/docs/latex/wx/doctempl.tex
+++ b/docs/latex/wx/doctempl.tex
@@ -121,6 +121,24 @@ member to return a new view instance on demand.
 \item wxDEFAULT\_TEMPLATE\_FLAGS Defined as wxTEMPLATE\_VISIBLE.
 \end{itemize}
 
+\perlnote{In wxPerl {\tt docClassInfo} and {\tt viewClassInfo} can be
+either {\tt Wx::ClassInfo} objects or strings which contain the name
+of the perl packages which are to be used as {\tt Wx::Document} and
+{\tt Wx::View} classes (they must have a constructor named {\tt
+new}):\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{{\bf Wx::DocTemplate->new( docmgr, descr, filter, dir,
+ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags
+)}}{ will construct document and view objects from the class information}
+\twocolitem{{\bf Wx::DocTemplate->new( docmgr, descr, filter, dir,
+ext, docTypeName, viewTypeName, docClassName, viewClassName, flags
+)}}{ will construct document and view objects from perl packages}
+\twocolitem{{\bf Wx::DocTemplate->new( docmgr, descr, filter, dir,
+ext, docTypeName, viewTypeName )}}{
+{\tt Wx::DocTemplate::CreateDocument()} and
+{\tt Wx::DocTemplate::CreateView()} must be overridden}
+\end{twocollist}}}
+
 \membersection{wxDocTemplate::\destruct{wxDocTemplate}}
 
 \func{void}{\destruct{wxDocTemplate}}{\void}
diff --git a/docs/latex/wx/scpdarry.tex b/docs/latex/wx/scpdarry.tex
index baa23718ea..077656725f 100644
--- a/docs/latex/wx/scpdarry.tex
+++ b/docs/latex/wx/scpdarry.tex
@@ -1,4 +1,4 @@
-\section{wxScopedArray}\label{wxscopedarray}
+\section{\class{wxScopedArray}}\label{wxscopedarray}
 
 This is a simple scoped smart pointer array implementation that is similar to 
 the \urlref{Boost}{http://www.boost.org} smart pointers but rewritten to
diff --git a/docs/latex/wx/scpdptr.tex b/docs/latex/wx/scpdptr.tex
index 844aefbe2f..3fab597dfa 100644
--- a/docs/latex/wx/scpdptr.tex
+++ b/docs/latex/wx/scpdptr.tex
@@ -1,4 +1,4 @@
-\section{wxScopedPtr}\label{wxscopedptr}
+\section{\class{wxScopedPtr}}\label{wxscopedptr}
 
 This is a simple scoped smart pointer implementation that is similar to 
 the \urlref{Boost}{http://www.boost.org} smart pointers but rewritten to
diff --git a/docs/latex/wx/tdocview.tex b/docs/latex/wx/tdocview.tex
index 6d5be945f4..0cf6922896 100644
--- a/docs/latex/wx/tdocview.tex
+++ b/docs/latex/wx/tdocview.tex
@@ -62,6 +62,15 @@ class, to provide multi-page document facilities.
 Note that to activate framework functionality, you need to use some or all of
 the wxWindows \helpref{predefined command identifiers}{predefinedids} in your menus.
 
+\perlnote{The document/view framework is available in wxPerl. To use it,
+you will need the following statements in your application code:\par
+{\small
+\begin{verbatim}
+use Wx::DocView;
+use Wx ':docview';   # import constants (optional)
+\end{verbatim}
+}}
+
 \subsection{wxDocument overview}\label{wxdocumentoverview}
 
 \overview{Document/view framework overview}{docviewoverview}
-- 
2.50.0

