wxPython documentation update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a4fe652485
commit
f899db6d37
@ -89,6 +89,20 @@ initialization in order to work with JPEGs.
|
||||
|
||||
\helpref{wxImage::LoadFile}{wximageloadfile}
|
||||
|
||||
\pythonnote{Constructors supported by wxPython are:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{\bf{wxImage(name, flag)}}{Loads an image from a file}
|
||||
\twocolitem{\bf{wxNullImage()}}{Create a null image (has no size or
|
||||
image data)}
|
||||
\twocolitem{\bf{wxEmptyImage(width, height)}}{Creates an empty image
|
||||
of the given size}
|
||||
\twocolitem{\bf{wxImageFromMime(name, mimetype}}{Creates an image from
|
||||
the given file of the given mimetype}
|
||||
\twocolitem{\bf{wxImageFromBitmap(bitmap)}}{Creates an image from a
|
||||
platform-dependent bitmap}
|
||||
\end{twocollist}}
|
||||
}
|
||||
|
||||
\membersection{wxImage::\destruct{wxImage}}
|
||||
|
||||
\func{}{\destruct{wxImage}}{\void}
|
||||
@ -108,6 +122,7 @@ of a given handler class in an application session.}
|
||||
|
||||
\helpref{wxImageHandler}{wximagehandler}
|
||||
|
||||
\pythonnote{In wxPython this static method is named \tt{wxImage_AddHandler}.}
|
||||
\membersection{wxImage::CleanUpHandlers}
|
||||
|
||||
\func{static void}{CleanUpHandlers}{\void}
|
||||
@ -329,6 +344,17 @@ TRUE if the operation succeeded, FALSE otherwise.
|
||||
|
||||
\helpref{wxImage::SaveFile}{wximagesavefile}
|
||||
|
||||
\pythonnote{In place of a single overloaded method name, wxPython
|
||||
implements the following methods:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{\bf{LoadFile(filename, type)}}{Loads an image of the given
|
||||
type from a file}
|
||||
\twocolitem{\bf{LoadMimeFile(filename, mimetype)}}{Loads an image of the given
|
||||
mimetype from a file}
|
||||
\end{twocollist}}
|
||||
}
|
||||
|
||||
|
||||
\membersection{wxImage::Ok}\label{wximageok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
@ -397,6 +423,16 @@ Depending on how wxWindows has been configured, not all formats may be available
|
||||
|
||||
\helpref{wxImage::LoadFile}{wximageloadfile}
|
||||
|
||||
\pythonnote{In place of a single overloaded method name, wxPython
|
||||
implements the following methods:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{\bf{SaveFile(filename, type)}}{Saves the image using the given
|
||||
type to the named file}
|
||||
\twocolitem{\bf{SaveMimeFile(filename, mimetype)}}{Saves the image using the given
|
||||
mimetype to the named file}
|
||||
\end{twocollist}}
|
||||
}
|
||||
|
||||
\membersection{wxImage::Scale}\label{wximagescale}
|
||||
|
||||
\func{wxImage}{Scale}{\param{int}{ width}, \param{int}{ height}}
|
||||
|
@ -237,6 +237,9 @@ Use this with a multiple selection listbox.
|
||||
\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp
|
||||
\helpref{wxListBox::SetSelection}{wxlistboxsetselection}
|
||||
|
||||
\pythonnote{The wxPython version of this method takes no parameters
|
||||
and returns a tuple of the selected items.}
|
||||
|
||||
\membersection{wxListBox::GetString}\label{wxlistboxgetstring}
|
||||
|
||||
\constfunc{wxString}{GetString}{\param{int}{ n}}
|
||||
|
@ -237,6 +237,9 @@ Returns an invalid tree item if there are no further children.
|
||||
|
||||
\helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild}
|
||||
|
||||
\pythonnote{In wxPython the returned wxTreeItemId and the new cookie
|
||||
value are both returned as a tuple containing the two values.}
|
||||
|
||||
\membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem}
|
||||
|
||||
\constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void}
|
||||
@ -272,6 +275,13 @@ Returns the tree item data associated with the item.
|
||||
|
||||
\helpref{wxTreeItemData}{wxtreeitemdata}
|
||||
|
||||
\pythonnote{wxPython provides the following shortcut method:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{\bf{GetPyData(item)}}{Returns the Python Object
|
||||
associated with the wxTreeItemData for the given item Id.}
|
||||
\end{twocollist}}
|
||||
}
|
||||
|
||||
\membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage}
|
||||
|
||||
\constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item}}
|
||||
@ -313,6 +323,9 @@ Returns an invalid tree item if there are no further children.
|
||||
|
||||
\helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild}
|
||||
|
||||
\pythonnote{In wxPython the returned wxTreeItemId and the new cookie
|
||||
value are both returned as a tuple containing the two values.}
|
||||
|
||||
\membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling}
|
||||
|
||||
\constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}}
|
||||
@ -500,6 +513,13 @@ See also: \helpref{IsBold}{wxtreectrlisbold}
|
||||
|
||||
Sets the item client data.
|
||||
|
||||
\pythonnote{wxPython provides the following shortcut method:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{\bf{SetPyData(item, obj)}}{Associate the given Python
|
||||
Object with the wxTreeItemData for the given item Id.}
|
||||
\end{twocollist}}
|
||||
}
|
||||
|
||||
\membersection{wxTreeCtrl::SetItemHasChildren}\label{wxtreectrlsetitemhaschildren}
|
||||
|
||||
\func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = TRUE}}
|
||||
@ -586,6 +606,21 @@ wxTreeItemId
|
||||
|
||||
Default constructor.
|
||||
|
||||
\pythonnote{The wxPython version of this constructor optionally
|
||||
accepts any Python object as a parameter. This object is then
|
||||
associated with the tree item using the wxTreeItemData as a
|
||||
container.
|
||||
|
||||
In addition, the following methods are added in wxPython for accessing
|
||||
the object:\par
|
||||
\indented{2cm}{\begin{twocollist}
|
||||
\twocolitem{\bf{GetData()}}{Returns a reference to the Python Object}
|
||||
\twocolitem{\bf{SetData(obj)}}{Associates a new Python Object with the
|
||||
wxTreeItemData}
|
||||
\end{twocollist}}
|
||||
}
|
||||
|
||||
|
||||
\membersection{wxTreeItemData::\destruct{wxTreeItemData}}
|
||||
|
||||
\func{void}{\destruct{wxTreeItemData}}{\void}
|
||||
|
@ -170,12 +170,12 @@ above.
|
||||
step. If not then you can try mailing the wxwin-developers list for
|
||||
help. Also, I will always have a pre-built win32 version of this extension module at
|
||||
\urlref{http://alldunn.com/wxPython}{http://alldunn.com/wxPython}.
|
||||
\item Change to the \tt{\$(WXWIN)/utils/wxPython/tests} directory.
|
||||
\item Try executing the test programs. Note that some of these print
|
||||
\item Change to the \tt{\$(WXWIN)/utils/wxPython/demo} directory.
|
||||
\item Try executing the demo program. Note that some of the demos print
|
||||
diagnositc or test info to standard output, so they will require the
|
||||
console version of python. For example:
|
||||
|
||||
\tt{python test1.py}
|
||||
\tt{python demo.py}
|
||||
|
||||
To run them without requiring a console, you can use the \tt{pythonw.exe}
|
||||
version of Python either from the command line or from a shortcut.
|
||||
@ -184,7 +184,7 @@ version of Python either from the command line or from a shortcut.
|
||||
\wxheading{Unix}
|
||||
|
||||
These directions assume that you have already successfully built
|
||||
wxWindows for GTK, and installed Python 1.5.1. If you build Python
|
||||
wxWindows for GTK, and installed Python 1.5.1 or later. If you build Python
|
||||
yourself, you will get everything installed that you need simply by
|
||||
doing \bftt{make install}. If you get Python from an RPM or other
|
||||
pre-packaged source then there will probably be a separate package
|
||||
@ -203,10 +203,10 @@ few sample Setup.in.[platform] files provided.
|
||||
|
||||
\item Once you have the \tt{Makefile}, run \bftt{make} to build and then
|
||||
\bftt{make install} to install the wxPython extension module.
|
||||
\item Change to the \tt{\$(WXWIN)/utils/wxPython/tests} directory.
|
||||
\item Try executing the test programs. For example:
|
||||
\item Change to the \tt{\$(WXWIN)/utils/wxPython/demo} directory.
|
||||
\item Try executing the demo program. For example:
|
||||
|
||||
\tt{python test1.py}
|
||||
\tt{python demo.py}
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
@ -221,12 +221,12 @@ I'm also going to assume that you know a bit about wxWindows already,
|
||||
enough to notice the similarities in the classes used.
|
||||
|
||||
Take a look at the following wxPython program. You can find a similar
|
||||
program in the \tt{wxPython/tests} directory, named \tt{test7.py}. If your
|
||||
program in the \tt{wxPython/demo} directory, named \tt{DialogUnits.py}. If your
|
||||
Python and wxPython are properly installed, you should be able to run
|
||||
it by issuing this command:
|
||||
|
||||
\begin{indented}{1cm}
|
||||
\bftt{python test7.py}
|
||||
\bftt{python DialogUnits.py}
|
||||
\end{indented}
|
||||
|
||||
\hrule
|
||||
@ -374,6 +374,7 @@ as possible to the C++ spec over time.
|
||||
\item \helpref{wxActivateEvent}{wxactivateevent}
|
||||
\item \helpref{wxBitmapButton}{wxbitmapbutton}
|
||||
\item \helpref{wxBitmap}{wxbitmap}
|
||||
\item wxBMPHandler
|
||||
\item \helpref{wxBrush}{wxbrush}
|
||||
\item \helpref{wxButton}{wxbutton}
|
||||
\item \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}
|
||||
@ -404,16 +405,21 @@ as possible to the C++ spec over time.
|
||||
\item \helpref{wxFont}{wxfont}
|
||||
\item \helpref{wxFrame}{wxframe}
|
||||
\item \helpref{wxGauge}{wxgauge}
|
||||
\item wxGIFHandler
|
||||
\item wxGLCanvas
|
||||
\item wxGridCell
|
||||
\item wxGridEvent
|
||||
\item \helpref{wxGrid}{wxgrid}
|
||||
\item wxIconizeEvent
|
||||
\item \helpref{wxIcon}{wxicon}
|
||||
\item \helpref{wxIdleEvent}{wxidleevent}
|
||||
\item \helpref{wxImage}{wximage}
|
||||
\item \helpref{wxImageHandler}{wximagehandler}
|
||||
\item \helpref{wxImageList}{wximagelist}
|
||||
\item \helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}
|
||||
\item \helpref{wxInitDialogEvent}{wxinitdialogevent}
|
||||
\item \helpref{wxJoystickEvent}{wxjoystickevent}
|
||||
\item wxJPEGHandler
|
||||
\item \helpref{wxKeyEvent}{wxkeyevent}
|
||||
\item \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}
|
||||
\item \helpref{wxLayoutConstraints}{wxlayoutconstraints}
|
||||
@ -445,6 +451,7 @@ as possible to the C++ spec over time.
|
||||
\item \helpref{wxPalette}{wxpalette}
|
||||
\item \helpref{wxPanel}{wxpanel}
|
||||
\item \helpref{wxPen}{wxpen}
|
||||
\item wxPNGHandler
|
||||
\item \helpref{wxPoint}{wxpoint}
|
||||
\item \helpref{wxPostScriptDC}{wxpostscriptdc}
|
||||
\item \helpref{wxPrintData}{wxprintdata}
|
||||
|
Loading…
Reference in New Issue
Block a user