applied wxPerl doc patches

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-04-14 19:46:05 +00:00
parent ea5999b96f
commit f35398824b
9 changed files with 134 additions and 1 deletions

View File

@@ -141,6 +141,10 @@ Loads the accelerator table from a Windows resource (Windows only).
wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode, wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode,
and cmd values like you would construct wxAcceleratorEntry objects with.} 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}} \membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}}
\func{}{\destruct{wxAcceleratorTable}}{\void} \func{}{\destruct{wxAcceleratorTable}}{\void}

View File

@@ -72,6 +72,15 @@ for all carets, so this functions is static).
Get the caret position (in pixels). 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} \membersection{wxCaret::GetSize}\label{wxcaretgetsize}
\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}} \constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
@@ -80,6 +89,15 @@ Get the caret position (in pixels).
Get the caret size. 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} \membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
\constfunc{wxWindow*}{GetWindow}{\void} \constfunc{wxWindow*}{GetWindow}{\void}

View File

@@ -262,6 +262,10 @@ deleting the list of points.
\pythonnote{The wxPython version of this method accepts a Python list \pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.} 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} \membersection{wxDC::DrawPolygon}\label{wxdcdrawpolygon}
\func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\ \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 \pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.} 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} \membersection{wxDC::DrawPoint}\label{wxdcdrawpoint}
\func{void}{DrawPoint}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} \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 \pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.} of wxPoint objects.}
\perlnote{The wxPerl version of this method accepts a reference to an array
of wxPoint objects.}
\membersection{wxDC::DrawText}\label{wxdcdrawtext} \membersection{wxDC::DrawText}\label{wxdcdrawtext}
\func{void}{DrawText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}} \func{void}{DrawText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}}

View File

@@ -535,7 +535,7 @@ variable fields.
\pythonnote{Only a single parameter is required, a Python list of \pythonnote{Only a single parameter is required, a Python list of
integers.} 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} \membersection{wxFrame::SetToolBar}\label{wxframesettoolbar}

View File

@@ -672,6 +672,10 @@ characters) is centred; if FALSE, the message is left-justified.
<wx/choicdlg.h> <wx/choicdlg.h>
\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} \membersection{::wxGetNumberFromUser}\label{wxgetnumberfromuser}
\func{long}{wxGetNumberFromUser}{ \func{long}{wxGetNumberFromUser}{
@@ -790,6 +794,9 @@ characters) is centred; if FALSE, the message is left-justified.
<wx/choicdlg.h> <wx/choicdlg.h>
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{::wxGetSingleChoiceIndex}\label{wxgetsinglechoiceindex} \membersection{::wxGetSingleChoiceIndex}\label{wxgetsinglechoiceindex}
\func{int}{wxGetSingleChoiceIndex}{\param{const wxString\& }{message},\\ \func{int}{wxGetSingleChoiceIndex}{\param{const wxString\& }{message},\\
@@ -811,6 +818,9 @@ string. If the user pressed cancel, -1 is returned.
<wx/choicdlg.h> <wx/choicdlg.h>
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{::wxGetSingleChoiceData}\label{wxgetsinglechoicedata} \membersection{::wxGetSingleChoiceData}\label{wxgetsinglechoicedata}
\func{wxString}{wxGetSingleChoiceData}{\param{const wxString\& }{message},\\ \func{wxString}{wxGetSingleChoiceData}{\param{const wxString\& }{message},\\
@@ -838,6 +848,10 @@ elements as {\it choices} or {\it aChoices}!
<wx/choicdlg.h> <wx/choicdlg.h>
\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} \membersection{::wxMessageBox}\label{wxmessagebox}
\func{int}{wxMessageBox}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Message"}, \param{int}{ style = wxOK \pipe wxCENTRE},\\ \func{int}{wxMessageBox}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Message"}, \param{int}{ style = wxOK \pipe wxCENTRE},\\

View File

@@ -225,6 +225,15 @@ implements the following methods:\par
\end{twocollist}} \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} \membersection{wxListCtrl::GetColumn}\label{wxlistctrlgetcolumn}
\constfunc{bool}{GetColumn}{\param{int }{col}, \param{wxListItem\& }{item}} \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 Gets information about this column. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more
information. information.
\perlnote{In wxPerl this method takes only the {\bf col} parameter and
returns a Wx::ListItem ( or undef ).}
\membersection{wxListCtrl::GetColumnWidth}\label{wxlistctrlgetcolumnwidth} \membersection{wxListCtrl::GetColumnWidth}\label{wxlistctrlgetcolumnwidth}
\constfunc{int}{GetColumnWidth}{\param{int }{col}} \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 for the item ID, an optional integer for the column number, and
returns the wxListItem object.} 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} \membersection{wxListCtrl::GetItemCount}\label{wxlistctrlgetitemcount}
\constfunc{int}{GetItemCount}{\void} \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 \pythonnote{The wxPython version of this method accepts only the item
ID and returns the wxPoint.} 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} \membersection{wxListCtrl::GetItemRect}\label{wxlistctrlgetitemrect}
\constfunc{bool}{GetItemRect}{\param{long }{item}, \param{wxRect\& }{rect}, \param{int }{code = wxLIST\_RECT\_BOUNDS}} \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 \pythonnote{The wxPython version of this method accepts only the item
ID and code and returns the wxRect.} 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} \membersection{wxListCtrl::GetItemSpacing}\label{wxlistctrlgetitemspacing}
\constfunc{int}{GetItemSpacing}{\param{bool }{isSmall}} \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 this method. The first value is the item id and the second is the
flags value mentioned above.} 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} \membersection{wxListCtrl::InsertColumn}\label{wxlistctrlinsertcolumn}
\func{long}{InsertColumn}{\param{long }{col}, \param{wxListItem\& }{info}} \func{long}{InsertColumn}{\param{long }{col}, \param{wxListItem\& }{info}}
@@ -492,6 +516,17 @@ implements the following methods:\par
\end{twocollist}} \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} \membersection{wxListCtrl::ScrollList}\label{wxlistctrlscrolllist}
\func{bool}{ScrollList}{\param{int }{dx}, \param{int }{dy}} \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 SortItems with a reference to a callable object that expects two
parameters.} 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.}

View File

@@ -57,6 +57,9 @@ red, blue or green component.
\helpref{wxPalette::Create}{wxpalettecreate} \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}} \membersection{wxPalette::\destruct{wxPalette}}
\func{}{\destruct{wxPalette}}{\void} \func{}{\destruct{wxPalette}}{\void}
@@ -137,6 +140,9 @@ TRUE if the operation was successful.
\helpref{wxPalette::GetPixel}{wxpalettegetpixel} \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} \membersection{wxPalette::Ok}\label{wxpaletteok}
\constfunc{bool}{Ok}{\void} \constfunc{bool}{Ok}{\void}

View File

@@ -69,6 +69,10 @@ Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to
into a single parameter {\tt choices} which is expected to be a Python into a single parameter {\tt choices} which is expected to be a Python
list of strings.} 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}} \membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}}
\func{}{\destruct{wxSingleChoiceDialog}}{\void} \func{}{\destruct{wxSingleChoiceDialog}}{\void}

View File

@@ -244,6 +244,9 @@ item is currently invisible.
{\tt item} and {\tt textOnly} parameters. The return value is either a {\tt item} and {\tt textOnly} parameters. The return value is either a
{\tt wxRect} object or {\tt None}.} {\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} \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount}
\constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = TRUE}} \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 \pythonnote{In wxPython the returned wxTreeItemId and the new cookie
value are both returned as a tuple containing the two values.} 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} \membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem}
\constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void} \constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void}
@@ -320,6 +326,15 @@ associated with the wxTreeItemData for the given item Id.}
\end{twocollist}} \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} \membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage}
\constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item}, \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 \pythonnote{In wxPython the returned wxTreeItemId and the new cookie
value are both returned as a tuple containing the two values.} 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} \membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling}
\constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}} \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 \pythonnote{The wxPython version of this method accepts no parameters
and returns a Python list of {\tt wxTreeItemId}s.} 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} \membersection{wxTreeCtrl::GetStateImageList}\label{wxtreectrlgetstateimagelist}
\constfunc{wxImageList*}{GetStateImageList}{\void} \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 \pythonnote{in wxPython both the wxTreeItemId and the flags are
returned as a tuple.} 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} \membersection{wxTreeCtrl::InsertItem}\label{wxtreectrlinsertitem}
\func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxTreeItemId\& }{previous}, \param{const wxString\&}{ text}, \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}} \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} \membersection{wxTreeCtrl::SetItemFont}\label{wxtreectrlsetitemfont}
\func{void}{SetItemFont}{\param{const wxTreeItemId\&}{ item}, \param{const wxFont\& }{font}} \func{void}{SetItemFont}{\param{const wxTreeItemId\&}{ item}, \param{const wxFont\& }{font}}
@@ -752,6 +785,10 @@ wxTreeItemData}
\end{twocollist}} \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}} \membersection{wxTreeItemData::\destruct{wxTreeItemData}}