From f35398824b11747a5930f729409b9fa59da3fad9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 14 Apr 2001 19:46:05 +0000 Subject: [PATCH] applied wxPerl doc patches git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/accel.tex | 4 ++++ docs/latex/wx/caret.tex | 18 ++++++++++++++++++ docs/latex/wx/dc.tex | 11 +++++++++++ docs/latex/wx/frame.tex | 2 +- docs/latex/wx/function.tex | 14 ++++++++++++++ docs/latex/wx/listctrl.tex | 39 ++++++++++++++++++++++++++++++++++++++ docs/latex/wx/palette.tex | 6 ++++++ docs/latex/wx/sngchdlg.tex | 4 ++++ docs/latex/wx/treectrl.tex | 37 ++++++++++++++++++++++++++++++++++++ 9 files changed, 134 insertions(+), 1 deletion(-) diff --git a/docs/latex/wx/accel.tex b/docs/latex/wx/accel.tex index e753a8b75b..fab1e2b05f 100644 --- a/docs/latex/wx/accel.tex +++ b/docs/latex/wx/accel.tex @@ -141,6 +141,10 @@ Loads the accelerator table from a Windows resource (Windows only). wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode, and cmd values like you would construct wxAcceleratorEntry objects with.} +\perlnote{The wxPerl constructor accepts a list of either + Wx::AcceleratorEntry objects or references to 3-element arrays + ( flags, keyCode, cmd ), like the parameters of Wx::AcceleratorEntry::new.} + \membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}} \func{}{\destruct{wxAcceleratorTable}}{\void} diff --git a/docs/latex/wx/caret.tex b/docs/latex/wx/caret.tex index 474b9c4557..9252196b3a 100644 --- a/docs/latex/wx/caret.tex +++ b/docs/latex/wx/caret.tex @@ -72,6 +72,15 @@ for all carets, so this functions is static). Get the caret position (in pixels). +\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{wxCaret::GetSize}\label{wxcaretgetsize} \constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}} @@ -80,6 +89,15 @@ Get the caret position (in pixels). Get the caret size. +\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{wxCaret::GetWindow}\label{wxcaretgetwindow} \constfunc{wxWindow*}{GetWindow}{\void} diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex index 345ff3b041..a090adaae7 100644 --- a/docs/latex/wx/dc.tex +++ b/docs/latex/wx/dc.tex @@ -262,6 +262,10 @@ deleting the list of points. \pythonnote{The wxPython version of this method accepts a Python list of wxPoint objects.} +\perlnote{The wxPerl version of this method accepts + as its first parameter a reference to an array + of wxPoint objects.} + \membersection{wxDC::DrawPolygon}\label{wxdcdrawpolygon} \func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\ @@ -285,6 +289,10 @@ Note that wxWindows automatically closes the first and last points. \pythonnote{The wxPython version of this method accepts a Python list of wxPoint objects.} +\perlnote{The wxPerl version of this method accepts + as its first parameter a reference to an array + of wxPoint objects.} + \membersection{wxDC::DrawPoint}\label{wxdcdrawpoint} \func{void}{DrawPoint}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} @@ -342,6 +350,9 @@ Draws a three-point spline using the current pen. \pythonnote{The wxPython version of this method accepts a Python list of wxPoint objects.} +\perlnote{The wxPerl version of this method accepts a reference to an array + of wxPoint objects.} + \membersection{wxDC::DrawText}\label{wxdcdrawtext} \func{void}{DrawText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}} diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex index 931ac8fec7..76b1ccf613 100644 --- a/docs/latex/wx/frame.tex +++ b/docs/latex/wx/frame.tex @@ -535,7 +535,7 @@ variable fields. \pythonnote{Only a single parameter is required, a Python list of integers.} -\perlnote{In wxPerl this method takes the widths as parameters.} +\perlnote{In wxPerl this method takes the field widths as parameters.} \membersection{wxFrame::SetToolBar}\label{wxframesettoolbar} diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index 42b96d35f3..23e39caeab 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -672,6 +672,10 @@ characters) is centred; if FALSE, the message is left-justified. +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}, and no {\tt selections} parameter; the function +returns an array containing the user selections.} + \membersection{::wxGetNumberFromUser}\label{wxgetnumberfromuser} \func{long}{wxGetNumberFromUser}{ @@ -790,6 +794,9 @@ characters) is centred; if FALSE, the message is left-justified. +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} + \membersection{::wxGetSingleChoiceIndex}\label{wxgetsinglechoiceindex} \func{int}{wxGetSingleChoiceIndex}{\param{const wxString\& }{message},\\ @@ -811,6 +818,9 @@ string. If the user pressed cancel, -1 is returned. +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} + \membersection{::wxGetSingleChoiceData}\label{wxgetsinglechoicedata} \func{wxString}{wxGetSingleChoiceData}{\param{const wxString\& }{message},\\ @@ -838,6 +848,10 @@ elements as {\it choices} or {\it aChoices}! +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}, and the client data array must have the +same length as the choices array.} + \membersection{::wxMessageBox}\label{wxmessagebox} \func{int}{wxMessageBox}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Message"}, \param{int}{ style = wxOK \pipe wxCENTRE},\\ diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex index 186a5d2a9b..87c08b3077 100644 --- a/docs/latex/wx/listctrl.tex +++ b/docs/latex/wx/listctrl.tex @@ -225,6 +225,15 @@ implements the following methods:\par \end{twocollist}} } +\perlnote{In wxPerl there are three methods instead of a single overloaded +method:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{{\bf FindItem( start, str, partial = FALSE ) }}{} +\twocolitem{{\bf FindItemData( start, data ) }}{} +\twocolitem{{\bf FindItemAtPos( start, point, direction )}}{} +\end{twocollist} +}} + \membersection{wxListCtrl::GetColumn}\label{wxlistctrlgetcolumn} \constfunc{bool}{GetColumn}{\param{int }{col}, \param{wxListItem\& }{item}} @@ -232,6 +241,9 @@ implements the following methods:\par Gets information about this column. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more information. +\perlnote{In wxPerl this method takes only the {\bf col} parameter and + returns a Wx::ListItem ( or undef ).} + \membersection{wxListCtrl::GetColumnWidth}\label{wxlistctrlgetcolumnwidth} \constfunc{int}{GetColumnWidth}{\param{int }{col}} @@ -280,6 +292,9 @@ before calling this method. for the item ID, an optional integer for the column number, and returns the wxListItem object.} +\perlnote{In wxPerl this method takes as parameter the {\bf ID} of the item +and ( optionally ) the column, and returns a Wx::ListItem object.} + \membersection{wxListCtrl::GetItemCount}\label{wxlistctrlgetitemcount} \constfunc{int}{GetItemCount}{\void} @@ -301,6 +316,9 @@ Returns the position of the item, in icon or small icon view. \pythonnote{The wxPython version of this method accepts only the item ID and returns the wxPoint.} +\perlnote{In wxPerl this method takes only the {\bf item} parameter and +returns a Wx::Point ( or undef ).} + \membersection{wxListCtrl::GetItemRect}\label{wxlistctrlgetitemrect} \constfunc{bool}{GetItemRect}{\param{long }{item}, \param{wxRect\& }{rect}, \param{int }{code = wxLIST\_RECT\_BOUNDS}} @@ -312,6 +330,9 @@ Returns the rectangle representing the item's size and position, in client coord \pythonnote{The wxPython version of this method accepts only the item ID and code and returns the wxRect.} +\perlnote{In wxPerl this method takes only the {\bf item} parameter and +retutrns a Wx::Rect ( or undef ).} + \membersection{wxListCtrl::GetItemSpacing}\label{wxlistctrlgetitemspacing} \constfunc{int}{GetItemSpacing}{\param{bool }{isSmall}} @@ -432,6 +453,9 @@ wxLIST\_HITTEST\_ONITEMSTATEICON.} this method. The first value is the item id and the second is the flags value mentioned above.} +\perlnote{In wxPerl this method only takes the {\bf point} parameter + and returns a 2-element list ( item, flags ).} + \membersection{wxListCtrl::InsertColumn}\label{wxlistctrlinsertcolumn} \func{long}{InsertColumn}{\param{long }{col}, \param{wxListItem\& }{info}} @@ -492,6 +516,17 @@ implements the following methods:\par \end{twocollist}} } +\perlnote{In wxPerl there are four methods instead of a single overloaded +method:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{{\bf InsertItem( item )}}{Inserts a Wx::ListItem} +\twocolitem{{\bf InsertStringItem( index, label )}}{Inserts a string item} +\twocolitem{{\bf InsertImageItem( index, imageIndex )}}{Inserts an image item} +\twocolitem{{\bf InsertImageStringItem( index, label, imageIndex )}}{Inserts + an item with a string and an image} +\end{twocollist} +}} + \membersection{wxListCtrl::ScrollList}\label{wxlistctrlscrolllist} \func{bool}{ScrollList}{\param{int }{dx}, \param{int }{dy}} @@ -699,3 +734,7 @@ function to call, so it is not available for programmer use. Call SortItems with a reference to a callable object that expects two parameters.} +\perlnote{In wxPerl the comparison function must take just two parameters; + however, you may use a closure to achieve an effect similar to the + SortItems third parameter.} + diff --git a/docs/latex/wx/palette.tex b/docs/latex/wx/palette.tex index 994a0c6727..7f8c2cc6f0 100644 --- a/docs/latex/wx/palette.tex +++ b/docs/latex/wx/palette.tex @@ -57,6 +57,9 @@ red, blue or green component. \helpref{wxPalette::Create}{wxpalettecreate} +\perlnote{In wxPerl the third constructor form takes as parameters + 3 array references ( they must be of the same length ).} + \membersection{wxPalette::\destruct{wxPalette}} \func{}{\destruct{wxPalette}}{\void} @@ -137,6 +140,9 @@ TRUE if the operation was successful. \helpref{wxPalette::GetPixel}{wxpalettegetpixel} +\perlnote{In wxPerl this method takes only the {\tt pixel} parameter and + returns a 3-element list ( or the empty list upon failure ).} + \membersection{wxPalette::Ok}\label{wxpaletteok} \constfunc{bool}{Ok}{\void} diff --git a/docs/latex/wx/sngchdlg.tex b/docs/latex/wx/sngchdlg.tex index ed8b0470b5..dcb28e6599 100644 --- a/docs/latex/wx/sngchdlg.tex +++ b/docs/latex/wx/sngchdlg.tex @@ -69,6 +69,10 @@ Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to into a single parameter {\tt choices} which is expected to be a Python list of strings.} +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}, and the client data array, if present, must have the +same length as the choices array.} + \membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}} \func{}{\destruct{wxSingleChoiceDialog}}{\void} diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index 8e684c6e41..fc720bd220 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -244,6 +244,9 @@ item is currently invisible. {\tt item} and {\tt textOnly} parameters. The return value is either a {\tt wxRect} object or {\tt None}.} +\perlnote{In wxPerl this method only takes the parameters {\tt item} and + {\tt textOnly}, and returns a Wx::Rect ( or undef ).} + \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount} \constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = TRUE}} @@ -284,6 +287,9 @@ Returns an invalid tree item if there are no further children. \pythonnote{In wxPython the returned wxTreeItemId and the new cookie value are both returned as a tuple containing the two values.} +\perlnote{In wxPerl this method only takes the {\tt item} parameter, and + returns a 2-element list ( item, cookie ).} + \membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem} \constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void} @@ -320,6 +326,15 @@ associated with the wxTreeItemData for the given item Id.} \end{twocollist}} } +\perlnote{wxPerl provides the following shortcut method: +\indented{2cm}{ +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf GetPlData( item )}}{Returns the Perl data +associated with the Wx::TreeItemData ( it is just the same as +tree->GetItemData( item )->GetData(); ).} +\end{twocollist}} +} + \membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage} \constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item}, @@ -376,6 +391,9 @@ Returns an invalid tree item if there are no further children. \pythonnote{In wxPython the returned wxTreeItemId and the new cookie value are both returned as a tuple containing the two values.} +\perlnote{In wxPerl this method returns a 2-element list + ( item, cookie ), instead of modifying its parameters.} + \membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling} \constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}} @@ -455,6 +473,9 @@ Returns the number of selected items. \pythonnote{The wxPython version of this method accepts no parameters and returns a Python list of {\tt wxTreeItemId}s.} +\perlnote{In wxPerl this method takes no parameters and returns a list of + {\tt Wx::TreeItemId}s.} + \membersection{wxTreeCtrl::GetStateImageList}\label{wxtreectrlgetstateimagelist} \constfunc{wxImageList*}{GetStateImageList}{\void} @@ -486,6 +507,9 @@ id at this point plus extra information {\it flags}. {\it flags} is a bitlist of \pythonnote{in wxPython both the wxTreeItemId and the flags are returned as a tuple.} +\perlnote{In wxPerl this method only takes the {\tt point} parameter + and returns a 2-element list ( item, flags ).} + \membersection{wxTreeCtrl::InsertItem}\label{wxtreectrlinsertitem} \func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxTreeItemId\& }{previous}, \param{const wxString\&}{ text}, @@ -613,6 +637,15 @@ Object with the wxTreeItemData for the given item Id.} \end{twocollist}} } +\perlnote{wxPerl provides the following shortcut method: +\indented{2cm}{ +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf SetPlData( item, data )}}{Sets the Perl data +associated with the Wx::TreeItemData ( it is just the same as +tree->GetItemData( item )->SetData( data ); ).} +\end{twocollist}} +} + \membersection{wxTreeCtrl::SetItemFont}\label{wxtreectrlsetitemfont} \func{void}{SetItemFont}{\param{const wxTreeItemId\&}{ item}, \param{const wxFont\& }{font}} @@ -752,6 +785,10 @@ wxTreeItemData} \end{twocollist}} } +\perlnote{In wxPerl the constructor accepts as parameter an optional scalar, + and stores it as client data. You may retrieve this data by calling + {\bf GetData()}, and set it by callling {\bf SetData( data ).} +} \membersection{wxTreeItemData::\destruct{wxTreeItemData}} -- 2.45.2