wxPerl documentation updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
097f29c22f
commit
0a67eeac3d
@ -70,6 +70,8 @@ Constructs a data format object for one of the standard data formats or an
|
||||
empty data object (use \helpref{SetType}{wxdataformatsettype} or
|
||||
\helpref{SetId}{wxdataformatsetid} later in this case)
|
||||
|
||||
\perlnote{In wxPerl this function is named {\tt newNative}.}
|
||||
|
||||
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformat}
|
||||
|
||||
\func{}{wxDataFormat}{\param{const wxChar }{*format}}
|
||||
@ -77,6 +79,8 @@ empty data object (use \helpref{SetType}{wxdataformatsettype} or
|
||||
Constructs a data format object for a custom format identified by its name
|
||||
{\it format}.
|
||||
|
||||
\perlnote{In wxPerl this function is named {\tt newUser}.}
|
||||
|
||||
\membersection{wxDataFormat::operator $==$}\label{wxdataformatoperatoreq}
|
||||
|
||||
\constfunc{bool}{operator $==$}{\param{const wxDataFormat\&}{ format}}
|
||||
|
@ -155,6 +155,10 @@ Destructor.
|
||||
Copy all supported formats in the given direction to the array pointed to by
|
||||
{\it formats}. There is enough space for GetFormatCount(dir) formats in it.
|
||||
|
||||
\perlnote{In wxPerl this method only takes the {\tt dir} parameter.
|
||||
In scalar context it returns the first format,
|
||||
in list context it returns a list containing all the supported formats.}
|
||||
|
||||
\membersection{wxDataObject::GetDataHere}\label{wxdataobjectgetdatahere}
|
||||
|
||||
\constfunc{virtual bool}{GetDataHere}{\param{const wxDataFormat\&}{ format}, \param{void }{*buf} }
|
||||
|
@ -525,7 +525,7 @@ Gets the rectangle surrounding the current clipping region.
|
||||
rectangle are returned as a tuple.}
|
||||
|
||||
\perlnote{This method takes no arguments and returns a four element list
|
||||
{\tt ( \$x, \$y, \$width, \$height )}}
|
||||
{\tt ( x, y, width, height )}}
|
||||
|
||||
\membersection{wxDC::GetFont}\label{wxdcgetfont}
|
||||
|
||||
@ -609,7 +609,7 @@ implements the following methods:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{{\bf GetSize()}}{Returns a Wx::Size}
|
||||
\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list
|
||||
{\tt ( \$width, \$height )}}
|
||||
{\tt ( width, height )}}
|
||||
\end{twocollist}
|
||||
}}
|
||||
|
||||
@ -650,7 +650,7 @@ See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}.
|
||||
|
||||
\perlnote{In wxPerl this method is implemented as
|
||||
{\bf GetTextExtent( string, font = undef )} returning a four element
|
||||
array {\tt ( \$width, \$height, \$descent, \$externalLeading )}
|
||||
array {\tt ( width, height, descent, externalLeading )}
|
||||
}
|
||||
|
||||
\membersection{wxDC::GetTextForeground}\label{wxdcgettextforeground}
|
||||
@ -669,7 +669,7 @@ 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 )}}
|
||||
array {\tt ( x, y )}}
|
||||
|
||||
\membersection{wxDC::LogicalToDeviceX}\label{wxdclogicaltodevicex}
|
||||
|
||||
|
@ -50,3 +50,5 @@ Override this function to receive dropped files.
|
||||
|
||||
Return TRUE to accept the data, FALSE to veto the operation.
|
||||
|
||||
\perlnote{In wxPerl there is just an array reference in place of {\tt nFiles}
|
||||
and {\tt files}.}
|
||||
|
@ -28,9 +28,9 @@ not be changed.
|
||||
|
||||
\perlnote{In wxPerl the constraints are accessed as
|
||||
\begin{verbatim}
|
||||
my( \$constraint ) = Wx::LayoutConstraints->new();
|
||||
\$constraint->centreX->AsIs();
|
||||
\$constraint->centreY->Unconstrained();
|
||||
constraint = Wx::LayoutConstraints->new();
|
||||
constraint->centreX->AsIs();
|
||||
constraint->centreY->Unconstrained();
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
|
@ -6,16 +6,36 @@ 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.
|
||||
\perlnote{In wxPerl you can't use the '\_' function name, so
|
||||
the {\tt Wx::Locale} module can export the {\tt gettext} and
|
||||
{\tt gettext\_noop} under any given name.
|
||||
\begin{verbatim}
|
||||
use Wx qw(_);
|
||||
# this imports gettext ( equivalent to Wx::GetTranslation
|
||||
# and gettext_noop ( a noop )
|
||||
# into your module
|
||||
use Wx::Locale qw(:default);
|
||||
|
||||
# ....
|
||||
|
||||
print _( ``Panic!'' );
|
||||
# use the functions
|
||||
print gettext( ``Panic!'' );
|
||||
|
||||
my( \$button ) = Wx::Button->new( \$window, -1, _( ``Label'' ) );
|
||||
button = Wx::Button->new( window, -1, gettext( ``Label'' ) );
|
||||
\end{verbatim}
|
||||
If you need to translate a lot of strings, then adding gettext( ) around
|
||||
each one is a long task ( that is why \_( ) was introduced ), so just choose
|
||||
a shorter name for gettext:
|
||||
\begin{verbatim}
|
||||
#
|
||||
use Wx::Locale 'gettext' => 't',
|
||||
'gettext_noop' => 'gettext_noop';
|
||||
|
||||
# ...
|
||||
|
||||
# use the functions
|
||||
print t( ``Panic!!'' );
|
||||
|
||||
# ...
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
@ -371,6 +391,8 @@ struct WXDLLEXPORT wxLanguageInfo
|
||||
|
||||
{\it Language} should be greater than wxLANGUAGE\_USER\_DEFINED.
|
||||
|
||||
\perlnote{In wxPerl Wx::LanguageInfo has only one method:\par
|
||||
Wx::LanguageInfo->new( language, canonicalName, WinLang, WinSubLang, Description )}
|
||||
|
||||
|
||||
\membersection{wxLocale::GetCanonicalName}\label{wxlocalegetcanonicalname}
|
||||
|
@ -236,7 +236,7 @@ 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 )}
|
||||
context it returns a 2-element list ( item, submenu )}
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
|
@ -760,6 +760,10 @@ it should be designed to take no parameters (other than the self
|
||||
reference) and to return a tuple of four integers.
|
||||
}
|
||||
|
||||
\perlnote{When this method is overridden in a derived class,
|
||||
it must not take any parameters, an return a 4-element list.
|
||||
}
|
||||
|
||||
\membersection{wxPrintout::GetPageSizeMM}\label{wxprintoutgetpagesizemm}
|
||||
|
||||
\func{void}{GetPageSizeMM}{\param{int *}{w}, \param{int *}{h}}
|
||||
@ -768,6 +772,9 @@ Returns the size of the printer page in millimetres.
|
||||
|
||||
\pythonnote{This method returns the output-only parameters as a tuple.}
|
||||
|
||||
\perlnote{In wxPerl this method takes no arguments and returns a
|
||||
2-element list {\tt ( w, h )}}
|
||||
|
||||
\membersection{wxPrintout::GetPageSizePixels}\label{wxprintoutgetpagesizepixels}
|
||||
|
||||
\func{void}{GetPageSizePixels}{\param{int *}{w}, \param{int *}{h}}
|
||||
@ -781,6 +788,9 @@ previewing is to be supported.
|
||||
|
||||
\pythonnote{This method returns the output-only parameters as a tuple.}
|
||||
|
||||
\perlnote{In wxPerl this method takes no arguments and returns a
|
||||
2-element list {\tt ( w, h )}}
|
||||
|
||||
\membersection{wxPrintout::GetPPIPrinter}\label{wxprintoutgetppiprinter}
|
||||
|
||||
\func{void}{GetPPIPrinter}{\param{int *}{w}, \param{int *}{h}}
|
||||
@ -792,6 +802,9 @@ this by a scaling factor to take the preview DC size into account.
|
||||
|
||||
\pythonnote{This method returns the output-only parameters as a tuple.}
|
||||
|
||||
\perlnote{In wxPerl this method takes no arguments and returns a
|
||||
2-element list {\tt ( w, h )}}
|
||||
|
||||
\membersection{wxPrintout::GetPPIScreen}\label{wxprintoutgetppiscreen}
|
||||
|
||||
\func{void}{GetPPIScreen}{\param{int *}{w}, \param{int *}{h}}
|
||||
@ -803,6 +816,9 @@ this by a scaling factor to take the preview DC size into account.
|
||||
|
||||
\pythonnote{This method returns the output-only parameters as a tuple.}
|
||||
|
||||
\perlnote{In wxPerl this method takes no arguments and returns a
|
||||
2-element list {\tt ( w, h )}}
|
||||
|
||||
\membersection{wxPrintout::HasPage}\label{wxprintouthaspage}
|
||||
|
||||
\func{bool}{HasPage}{\param{int}{ pageNum}}
|
||||
|
@ -80,7 +80,7 @@ enum
|
||||
Flags for regex matching to be used with \helpref{Matches()}{wxregexmatches}.
|
||||
|
||||
These flags are mainly useful when doing several matches in a long string
|
||||
to prevent erroneous matches for \verb|'^'| and {\tt '\$'}:
|
||||
to prevent erroneous matches for {\tt '^'} and {\tt '\$'}:
|
||||
|
||||
\begin{verbatim}
|
||||
enum
|
||||
|
@ -111,6 +111,9 @@ TRUE if the field index is valid, FALSE otherwise.
|
||||
|
||||
\helpref{wxRect}{wxrect}
|
||||
|
||||
\perlnote{In wxPerl this function returns a {\tt Wx::Rect} if the field
|
||||
index is valid, {\tt undef} otherwise.}
|
||||
|
||||
\membersection{wxStatusBar::GetFieldsCount}\label{wxstatusbargetfieldscount}
|
||||
|
||||
\constfunc{int}{GetFieldsCount}{\void}
|
||||
|
Loading…
Reference in New Issue
Block a user