From: Vadim Zeitlin Date: Wed, 20 Dec 2000 16:10:46 +0000 (+0000) Subject: wxPerl doc patches applied X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5873607e5c6d255f5692cc37637551eaeb2e4472?hp=0354a70ce873af8be1449d47bab0a4c4e7ab72ed wxPerl doc patches applied git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index 76b74824e1..359ed01f33 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -164,6 +164,14 @@ empty bitmap with the given specifications} \end{twocollist}} } +\perlnote{Constructors supported by wxPerl are:\par +\begin{itemize} +\item{Wx::Bitmap->new( width, height, depth = -1 )} +\item{Wx::Bitmap->new( name, type )} +\item{Wx::Bitmap->new( icon )} +\end{itemize} +} + \membersection{wxBitmap::\destruct{wxBitmap}} \func{}{\destruct{wxBitmap}}{\void} diff --git a/docs/latex/wx/checklst.tex b/docs/latex/wx/checklst.tex index 1094fdb4e3..cf9dba3c67 100644 --- a/docs/latex/wx/checklst.tex +++ b/docs/latex/wx/checklst.tex @@ -76,6 +76,9 @@ appropriately.} and {\tt choices} arguments are to a single argument, which is a list of strings.} +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} + \membersection{wxCheckListBox::\destruct{wxCheckListBox}} \func{void}{\destruct{wxCheckListBox}}{\void} diff --git a/docs/latex/wx/choice.tex b/docs/latex/wx/choice.tex index e70287e75d..bcf4474186 100644 --- a/docs/latex/wx/choice.tex +++ b/docs/latex/wx/choice.tex @@ -78,6 +78,9 @@ appropriately.} and {\tt choices} arguments are to a single argument, which is a list of strings.} +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} + \membersection{wxChoice::\destruct{wxChoice}} \func{}{\destruct{wxChoice}}{\void} diff --git a/docs/latex/wx/combobox.tex b/docs/latex/wx/combobox.tex index 218f17e93c..7b780e526c 100644 --- a/docs/latex/wx/combobox.tex +++ b/docs/latex/wx/combobox.tex @@ -90,6 +90,8 @@ appropriately.} and {\tt choices} arguments are to a single argument, which is a list of strings.} +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} \membersection{wxComboBox::\destruct{wxComboBox}} diff --git a/docs/latex/wx/cursor.tex b/docs/latex/wx/cursor.tex index 6d0c748903..bbc3c38daa 100644 --- a/docs/latex/wx/cursor.tex +++ b/docs/latex/wx/cursor.tex @@ -148,6 +148,13 @@ hotSpotY=0)}}{Constructs a cursor from a filename} \end{twocollist}} } +\perlnote{Contructors supported by wxPerl are:\par +\begin{itemize} +\item{Wx::Cursor->new( name, type, hotSpotX = 0, hotSpotY = 0 )} +\item{Wx::Cursor->new( id )} +\end{itemize} +} + \membersection{wxCursor::\destruct{wxCursor}} \func{}{\destruct{wxCursor}}{\void} diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex index be5a632c3a..345ff3b041 100644 --- a/docs/latex/wx/dc.tex +++ b/docs/latex/wx/dc.tex @@ -440,6 +440,9 @@ Gets the rectangle surrounding the current clipping region. \pythonnote{No arguments are required and the four values defining the rectangle are returned as a tuple.} +\perlnote{This method takes no arguments and returns a four element list +{\tt ( \$x, \$y, \$width, \$height )}} + \membersection{wxDC::GetFont}\label{wxdcgetfont} \func{wxFont\&}{GetFont}{\void} @@ -485,6 +488,9 @@ is being worked on. Not available for wxPostScriptDC or wxMetafileDC. \pythonnote{For wxPython the wxColour value is returned and is not required as a parameter.} +\perlnote{This method only takes the parameters {\tt x} and {\tt y} and returns +a Wx::Colour value} + \membersection{wxDC::GetSize}\label{wxdcgetsize} \func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}} @@ -515,6 +521,14 @@ implements the following methods:\par \end{twocollist}} } +\perlnote{In place of a single overloaded method, wxPerl uses:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{{\bf GetSize()}}{Returns a Wx::Size} +\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list + {\tt ( \$width, \$height )}} +\end{twocollist} +}} + \membersection{wxDC::GetTextBackground}\label{wxdcgettextbackground} \func{wxColour\&}{GetTextBackground}{\void} @@ -550,6 +564,11 @@ See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}. \end{twocollist}} } +\perlnote{In wxPerl this method is implemented as + {\bf GetTextExtent( string, font = undef )} returning a four element + array {\tt ( \$width, \$height, \$descent, \$externalLeading )} +} + \membersection{wxDC::GetTextForeground}\label{wxdcgettextforeground} \func{wxColour\&}{GetTextForeground}{\void} @@ -565,6 +584,8 @@ Gets the current text foreground colour (see \helpref{wxDC::SetTextForeground}{w Gets the current user scale factor (set by \helpref{SetUserScale}{wxdcsetuserscale}). +\perlnote{In wxPerl this method takes no arguments and returna a two element + array {\tt ( \$x, \$y )}} \membersection{wxDC::LogicalToDeviceX}\label{wxdclogicaltodevicex} diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex index 0bc42220db..931ac8fec7 100644 --- a/docs/latex/wx/frame.tex +++ b/docs/latex/wx/frame.tex @@ -535,6 +535,8 @@ variable fields. \pythonnote{Only a single parameter is required, a Python list of integers.} +\perlnote{In wxPerl this method takes the widths as parameters.} + \membersection{wxFrame::SetToolBar}\label{wxframesettoolbar} \func{void}{SetToolBar}{\param{wxToolBar*}{ toolBar}} diff --git a/docs/latex/wx/icon.tex b/docs/latex/wx/icon.tex index fb8b0eb930..321380350f 100644 --- a/docs/latex/wx/icon.tex +++ b/docs/latex/wx/icon.tex @@ -192,6 +192,13 @@ must have mask colour set. \helpref{wxIcon::LoadFile}{wxiconloadfile} +\perlnote{Constructors supported by wxPerl are:\par +\begin{itemize} +\item{Wx::Icon->new( width, height, depth = -1 )} +\item{Wx::Icon->new( name, type, desiredWidth = -1, desiredHeight = -1 )} +\end{itemize} +} + \membersection{wxIcon::\destruct{wxIcon}} \func{}{\destruct{wxIcon}}{\void} diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex index 84f08f2df6..78a3f2f121 100644 --- a/docs/latex/wx/image.tex +++ b/docs/latex/wx/image.tex @@ -145,6 +145,15 @@ platform-dependent bitmap} \end{twocollist}} } +\perlnote{Constructors supported by wxPerl are:\par +\begin{itemize} +\item{Wx::Image->new( bitmap )} +\item{Wx::Image->new( width, height )} +\item{Wx::Image->new( name, type )} +\item{Wx::Image->new( name, mimetype )} +\end{itemize} +} + \membersection{wxImage::\destruct{wxImage}} \func{}{\destruct{wxImage}}{\void} @@ -471,6 +480,13 @@ mimetype from a file} \end{twocollist}} } +\perlnote{Methods supported by wxPerl are:\par +\begin{itemize} +\item{\$bitmap->LoadFile( name, type )} +\item{\$bitmap->LoadFile( name, mimetype )} +\end{itemize} +} + \membersection{wxImage::Ok}\label{wximageok} @@ -549,6 +565,13 @@ mimetype to the named file} \end{twocollist}} } +\perlnote{Methods supported by wxPerl are:\par +\begin{itemize} +\item{\$bitmap->SaveFile( name, type )} +\item{\$bitmap->SaveFile( name, mimetype )} +\end{itemize} +} + \membersection{wxImage::Mirror}\label{wximagemirror} \constfunc{wxImage}{Mirror}{\param{bool}{ horizontally = TRUE}} diff --git a/docs/latex/wx/layout.tex b/docs/latex/wx/layout.tex index 31ec86c587..ac9f3bffc3 100644 --- a/docs/latex/wx/layout.tex +++ b/docs/latex/wx/layout.tex @@ -26,6 +26,14 @@ width and height will be used, to be compatible with panel items which often have take a default size. If the constraint is wxAsIs, the dimension will not be changed. +\perlnote{In wxPerl the constraints are accessed as +\begin{verbatim} + my( \$constraint ) = Wx::LayoutConstraints->new(); + \$constraint->centreX->AsIs(); + \$constraint->centreY->Unconstrained(); +\end{verbatim} +} + \wxheading{Derived from} \helpref{wxObject}{wxobject} diff --git a/docs/latex/wx/listbox.tex b/docs/latex/wx/listbox.tex index 59f09a388e..b06831a1e5 100644 --- a/docs/latex/wx/listbox.tex +++ b/docs/latex/wx/listbox.tex @@ -100,7 +100,8 @@ appropriately.} and {\tt choices} arguments are to a single argument, which is a list of strings.} - +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} \membersection{wxListBox::\destruct{wxListBox}} @@ -240,6 +241,9 @@ Use this with a multiple selection listbox. \pythonnote{The wxPython version of this method takes no parameters and returns a tuple of the selected items.} +\perlnote{In wxPerl this method takes no parameters and returna the +selected items as a list.} + \membersection{wxListBox::GetString}\label{wxlistboxgetstring} \constfunc{wxString}{GetString}{\param{int}{ n}} @@ -286,6 +290,9 @@ will be inserted in the beginning of the listbox} \pythonnote{The first two parameters are collapsed into a single parameter for wxPython, which is a list of strings.} +\perlnote{In wxPerl there is just an array reference in place of {\tt nItems} +and {\tt items}.} + \membersection{wxListBox::Number}\label{wxlistboxnumber} \constfunc{int}{Number}{\void} diff --git a/docs/latex/wx/locale.tex b/docs/latex/wx/locale.tex index a22041f817..3eebae4c9e 100644 --- a/docs/latex/wx/locale.tex +++ b/docs/latex/wx/locale.tex @@ -6,6 +6,19 @@ generalization of the C locale concept. In wxWindows this class manages message catalogs which contain the translations of the strings used to the current language. +\perlnote{In wxPerl the {\tt Wx} module exports a '_' function +that corresponds to the '_' C++ macro. +\begin{verbatim} + use Wx qw(_); + + # .... + + print _( ``Panic!'' ); + + my( \$button ) = Wx::Button->new( \$window, -1, _( ``Label'' ) ); +\end{verbatim} +} + \wxheading{Derived from} No base class diff --git a/docs/latex/wx/mask.tex b/docs/latex/wx/mask.tex index e850fb3f16..137cd4d4af 100644 --- a/docs/latex/wx/mask.tex +++ b/docs/latex/wx/mask.tex @@ -29,13 +29,13 @@ contains a mask. Default constructor. -\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}} +\func{}{wxMask}{\param{const \helpref{wxBitmap}{wxbitmap}\& }{bitmap}} Constructs a mask from a monochrome bitmap. \pythonnote{This is the default constructor for wxMask in wxPython.} -\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}, \param{const wxColour\& }{colour}} +\func{}{wxMask}{\param{const \helpref{wxBitmap}{wxbitmap}\& }{bitmap}, \param{const \helpref{wxColour}{wxcolour}\& }{colour}} Constructs a mask from a bitmap and a colour that indicates the background. diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex index 027c789d8f..2537457c0a 100644 --- a/docs/latex/wx/menu.tex +++ b/docs/latex/wx/menu.tex @@ -234,6 +234,10 @@ Finds the menu item id for a menu item string. Finds the menu item object associated with the given menu item identifier and, optionally, the (sub)menu it belongs to. +\perlnote{In wxPerl this method takes just the {\tt id} parameter; +in scalar context it returns the associated {\tt Wx::MenuItem}, in list +context it returns a two element list ( item, submenu )} + \wxheading{Parameters} \docparam{itemString}{Menu item string to find.} @@ -507,6 +511,9 @@ menu bar.} \pythonnote{Only the default constructor is supported in wxPython. Use wxMenuBar.Append instead.} +\perlnote{wxPerl only supports the first contructor: +use {\tt Append} instead.} + \membersection{wxMenuBar::\destruct{wxMenuBar}} \func{void}{\destruct{wxMenuBar}}{\void} diff --git a/docs/latex/wx/pen.tex b/docs/latex/wx/pen.tex index 8754bae778..5a79e8f523 100644 --- a/docs/latex/wx/pen.tex +++ b/docs/latex/wx/pen.tex @@ -130,6 +130,14 @@ is found in the colour database. \helpref{wxPen::SetStyle}{wxpensetstyle}, \helpref{wxPen::SetColour}{wxpensetcolour},\rtfsp \helpref{wxPen::SetWidth}{wxpensetwidth}, \helpref{wxPen::SetStipple}{wxpensetstipple} +\perlnote{Constructors supported by wxPerl are:\par +\begin{itemize} +\item{Wx::Pen->new( colour, width, style )} +\item{Wx::Pen->new( colourName, width, style )} +\item{Wx::Pen->new( stipple, width )} +\end{itemize} +} + \membersection{wxPen::\destruct{wxPen}} \func{}{\destruct{wxPen}}{\void} diff --git a/docs/latex/wx/radiobox.tex b/docs/latex/wx/radiobox.tex index 67b539b0cc..3bcddf3f7c 100644 --- a/docs/latex/wx/radiobox.tex +++ b/docs/latex/wx/radiobox.tex @@ -90,6 +90,8 @@ radiobox.} and {\tt choices} arguments are to a single argument, which is a list of strings.} +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} \membersection{wxRadioBox::\destruct{wxRadioBox}} diff --git a/docs/latex/wx/scrolwin.tex b/docs/latex/wx/scrolwin.tex index bfe54c172b..2cf1f691cd 100644 --- a/docs/latex/wx/scrolwin.tex +++ b/docs/latex/wx/scrolwin.tex @@ -121,6 +121,9 @@ CalcScrolledPosition(0, 0, \&xx, \&yy) will return 10 in yy. \pythonnote{The wxPython version of this methods accepts only two parameters and returns xx and yy as a tuple of values.} +\perlnote{In wxPerl this method takes two parameters and returns a +2-element list {\tt ( xx, yy )}.} + \membersection{wxScrolledWindow::CalcUnscrolledPosition}\label{wxscrolledwindowcalcunscrolledposition} \constfunc{void}{CalcUnscrolledPosition}{ @@ -141,6 +144,9 @@ CalcUnscrolledPosition(0, 10, \&xx, \&yy) will return 0 in yy. \pythonnote{The wxPython version of this methods accepts only two parameters and returns xx and yy as a tuple of values.} +\perlnote{In wxPerl this method takes two parameters and returns a +2-element list {\tt ( xx, yy )}.} + \membersection{wxScrolledWindow::Create}\label{wxscrolledwindowcreate} \func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id = -1},\rtfsp @@ -196,6 +202,8 @@ scrolling in that direction. \pythonnote{The wxPython version of this methods accepts no parameters and returns a tuple of values for xUnit and yUnit.} +\perlnote{In wxPerl this method takes no parameters and returns a +2-element list {\tt ( xUnit, yUnit )}.} \membersection{wxScrolledWindow::GetVirtualSize}\label{wxscrolledwindowgetvirtualsize} @@ -224,6 +232,9 @@ to translate these units to logical units. \pythonnote{The wxPython version of this methods accepts no parameters and returns a tuple of values for x and y.} +\perlnote{In wxPerl this method takes no parameters and returns a +2-element list {\tt ( x, y )}.} + \membersection{wxScrolledWindow::IsRetained}\label{wxscrolledwindowisretained} \constfunc{bool}{IsRetained}{\void} @@ -382,3 +393,5 @@ by the number of pixels per scroll increment. \pythonnote{The wxPython version of this methods accepts no parameters and returns a tuple of values for x and y.} +\perlnote{In wxPerl this method takes no parameters and returns a +2-element list {\tt ( x, y )}.} diff --git a/docs/latex/wx/statusbr.tex b/docs/latex/wx/statusbr.tex index 172178f3a0..e9e0e7b9a9 100644 --- a/docs/latex/wx/statusbr.tex +++ b/docs/latex/wx/statusbr.tex @@ -207,6 +207,9 @@ Sets the number of fields, and optionally the field widths. \pythonnote{Only the first parameter is accepted. Use SetStatusWidths to set the widths of the fields.} +\perlnote{In wxPerl this function acceps only the {\tt n} parameter. +Use SetStatusWidths to set the field widths.} + \wxheading{Parameters} \docparam{number}{The number of fields.} @@ -266,4 +269,4 @@ variable fields. \pythonnote{Only a single parameter is required, a Python list of integers.} - +\perlnote{In wxPerl this method takes as parameters the field widths.} diff --git a/docs/latex/wx/tex2rtf.ini b/docs/latex/wx/tex2rtf.ini index bc66d37256..4027cea01e 100644 --- a/docs/latex/wx/tex2rtf.ini +++ b/docs/latex/wx/tex2rtf.ini @@ -36,5 +36,5 @@ htmlIndex = true \bftt [1] {\bf{\tt{#1}}} \pythonnote [1] {{\bf \fcol{blue}{wxPython note:}} #1} %\pythonnote [1] {} - +\perlnote [1] {{\bf \fcol{blue}{wxPerl note:}} #1} diff --git a/docs/latex/wx/texhelp.sty b/docs/latex/wx/texhelp.sty index fd9d1b0b9b..1dd5cd5f21 100644 --- a/docs/latex/wx/texhelp.sty +++ b/docs/latex/wx/texhelp.sty @@ -103,6 +103,7 @@ % pythonnote: A note about the wxpython interface. %\newcommand{\pythonnote}[1]{{\bf wxPython note: }#1} \newcommand{\pythonnote}[1]{{}} +\newcommand{\perlnote}[1]{{}} % =================== Hypertext facilities =================== % diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index 657aa9ec13..fff6a22f19 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -315,6 +315,9 @@ no selection. \pythonnote{The wxPython version of this method returns a tuple consisting of the from and to values.} +\perlnote{In wxPerl this method takes no parameter and returns a +2-element list {\tt ( from, to )}.} + \membersection{wxTextCtrl::GetValue}\label{wxtextctrlgetvalue} \constfunc{wxString}{GetValue}{\void} @@ -423,6 +426,9 @@ parameter). y values, so (x,y) = PositionToXY() is equivalent to the call described above.} +\perlnote{In wxPerl this method only takes the {\tt pos} parameter, and +returns a 2-element list {\tt ( x, y )}.} + \membersection{wxTextCtrl::Redo}\label{wxtextctrlredo} \func{virtual void}{Redo}{\void} diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 829539cf69..7328f7ec10 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -224,6 +224,9 @@ cause an erase background event to be generated. \constfunc{virtual void}{ClientToScreen}{\param{int* }{x}, \param{int* }{y}} +\perlnote{In wxPerl this method returns a 2-element list intead of +modifying its parameters.} + \constfunc{virtual wxPoint}{ClientToScreen}{\param{const wxPoint\&}{ pt}} Converts to screen coordinates from coordinates relative to this window. @@ -244,7 +247,6 @@ implements the following methods:\par \end{twocollist}} } - \membersection{wxWindow::Close}\label{wxwindowclose} \func{virtual bool}{Close}{\param{bool}{ force = FALSE}} @@ -509,6 +511,9 @@ Returns a reference to the list of the window's children. \constfunc{virtual void}{GetClientSize}{\param{int* }{width}, \param{int* }{height}} +\perlnote{In wxPerl this method takes no parameter and returns +a 2-element list {\tt ( width, height )}.} + \constfunc{virtual wxSize}{GetClientSize}{\void} This gets the size of the window `client area' in pixels. The client area is the @@ -697,6 +702,15 @@ implements the following methods:\par \end{twocollist}} } +\perlnote{In wxPerl there are two methods instead of a single overloaded +method:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{{\bf GetPosition()}}{Returns a Wx::Point} +\twocolitem{{\bf GetPositionXY()}}{Returns a 2-element list + {\tt ( x, y )}} +\end{twocollist} +}} + \membersection{wxWindow::GetRect}\label{wxwindowgetrect} \constfunc{virtual wxRect}{GetRect}{\void} @@ -755,6 +769,15 @@ implements the following methods:\par \end{twocollist}} } +\perlnote{In wxPerl there are two methods instead of a single overloaded +method:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{{\bf GetSize()}}{Returns a Wx::Size} +\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list + {\tt ( width, height )}} +\end{twocollist} +}} + \membersection{wxWindow::GetTextExtent} \constfunc{virtual void}{GetTextExtent}{\param{const wxString\& }{string}, \param{int* }{x}, \param{int* }{y}, @@ -790,6 +813,9 @@ implements the following methods:\par \end{twocollist}} } +\perlnote{In wxPerl this method takes only the {\tt string} and optionally + {\tt font} parameters, and returns a 4-element list + {\tt ( x, y, descent, externalLeading )}.} \membersection{wxWindow::GetTitle}\label{wxwindowgettitle}