Various documentation additions and changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@95 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -710,7 +710,7 @@ When an application invokes wxHelp, subsequent sections, blocks or
|
||||
files may be viewed using the same instance of wxHelp since the two
|
||||
programs are linked using wxWindows interprocess communication
|
||||
facilities. When the application exits, that application's instance of
|
||||
wxHelp may be made to exit also. See the {\bf wxHelpInstance} entry in the
|
||||
wxHelp may be made to exit also. See the {\bf wxHelpControllerBase} entry in the
|
||||
reference section for how an application controls wxHelp.
|
||||
|
||||
\section{Tex2RTF}\label{textortf}
|
||||
|
@@ -188,6 +188,7 @@ An event object contains information about a specific event. Event handlers
|
||||
%\twocolitem{\helpref{wxSessionEvent}{wxsessionevent}}{A session ending event}
|
||||
\twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event}
|
||||
\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event}
|
||||
\twocolitem{\helpref{wxTabEvent}{wxtabevent}}{A tab control event}
|
||||
\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event}
|
||||
\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event}
|
||||
\end{twocollist}
|
||||
@@ -267,7 +268,6 @@ based on DDE.
|
||||
\twocolitem{\helpref{wxDDEClient}{wxddeclient}}{Represents a client}
|
||||
\twocolitem{\helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server}
|
||||
\twocolitem{\helpref{wxDDEServer}{wxddeserver}}{Represents a server}
|
||||
%TODO: put this somewhere \twocolitem{\helpref{wxHelpInstance}{wxhelpinstance}}{A specialised client}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Document/view framework}}
|
||||
@@ -327,8 +327,10 @@ product.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxApp}{wxapp}}{Application class}
|
||||
\twocolitem{\helpref{wxHelpControllerBase}{wxhelpcontrollerbase}}{Base class for help controllers}
|
||||
\twocolitem{\helpref{wxTimer}{wxtimer}}{Timer class}
|
||||
\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class}
|
||||
\twocolitem{\helpref{wxWinHelpController}{wxwinhelpcontroller}}{Controls WinHelp instances}
|
||||
\end{twocollist}
|
||||
|
||||
|
||||
|
@@ -85,6 +85,8 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input imaglist.tex
|
||||
\input ilayout.tex
|
||||
\input indlgevt.tex
|
||||
\input joystick.tex
|
||||
\input joyevent.tex
|
||||
\input keyevent.tex
|
||||
\input layout.tex
|
||||
\input list.tex
|
||||
@@ -164,6 +166,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\input wave.tex
|
||||
\input window.tex
|
||||
\input windowdc.tex
|
||||
\input winhelp.tex
|
||||
|
||||
\input function.tex
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
A wxDC is a {\it device context} onto which graphics and text can be drawn.
|
||||
It is intended to represent a number of output devices in a generic way,
|
||||
so a canvas has a device context and a printer also has a device context.
|
||||
so a window can have a device context associated with it, and a printer also has a device context.
|
||||
In this way, the same piece of code may write to a number of different devices,
|
||||
if the device context is used as a parameter.
|
||||
|
||||
@@ -115,7 +115,7 @@ Clears the device context using the current background brush.
|
||||
\func{void}{CrossHair}{\param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Displays a cross hair using the current pen. This is a vertical
|
||||
and horizontal line the height and width of the canvas, centred
|
||||
and horizontal line the height and width of the window, centred
|
||||
on the given point.
|
||||
|
||||
\membersection{wxDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion}
|
||||
@@ -176,7 +176,7 @@ filling the shape.
|
||||
|
||||
Draws an arc of an ellipse. The current pen is used for drawing the arc and
|
||||
the current brush is used for drawing the pie. This function is currently only available for
|
||||
X canvas and PostScript device contexts.
|
||||
X window and PostScript device contexts.
|
||||
|
||||
{\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains
|
||||
the ellipse.
|
||||
@@ -195,7 +195,7 @@ complete ellipse will be drawn.
|
||||
\func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Draw an icon on the display (does nothing if the device context is PostScript).
|
||||
This can be the simplest way of drawing bitmaps on a canvas.
|
||||
This can be the simplest way of drawing bitmaps on a window.
|
||||
|
||||
\membersection{wxDC::DrawLine}\label{wxdcdrawline}
|
||||
|
||||
@@ -349,7 +349,7 @@ Gets the character height of the currently set font.
|
||||
|
||||
Gets the average character width of the currently set font.
|
||||
|
||||
\membersection{wxCanvas::GetClippingBox}\label{wxdcgetclippingbox}
|
||||
\membersection{wxDC::GetClippingBox}\label{wxdcgetclippingbox}
|
||||
|
||||
\func{void}{GetClippingBox}{\param{long}{ *x}, \param{long}{ *y}, \param{long}{ *width}, \param{long}{ *height}}
|
||||
|
||||
@@ -533,7 +533,7 @@ whether text will be drawn with a background colour or not.
|
||||
|
||||
Sets the clipping region for the DC. The clipping region is a rectangular area
|
||||
to which drawing is restricted. Possible uses for the clipping region are for clipping text
|
||||
or for speeding up canvas redraws when only a known area of the screen is damaged.
|
||||
or for speeding up window redraws when only a known area of the screen is damaged.
|
||||
|
||||
See also \helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}.
|
||||
|
||||
@@ -541,7 +541,7 @@ See also \helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}.
|
||||
|
||||
\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
|
||||
|
||||
If this is a canvas DC or memory DC, assigns the given palette to the window
|
||||
If this is a window DC or memory DC, assigns the given palette to the window
|
||||
or bitmap associated with the DC. If the argument is wxNullPalette, the current
|
||||
palette is selected out of the device context, and the original palette
|
||||
restored.
|
||||
@@ -576,7 +576,7 @@ See also \helpref{wxFont}{wxfont}.
|
||||
|
||||
\func{void}{SetLogicalFunction}{\param{int}{ function}}
|
||||
|
||||
Sets the current logical function for the canvas. This determines how
|
||||
Sets the current logical function for the device context. This determines how
|
||||
a source pixel (from a pen or brush colour, or source device context if
|
||||
using \helpref{wxDC::Blit}{wxdcblit}) combines with a destination pixel in the
|
||||
current device context.
|
||||
|
@@ -1,130 +1,122 @@
|
||||
\section{\class{wxHelpInstance}}\label{wxhelpinstance}
|
||||
\section{\class{wxHelpControllerBase}}\label{wxhelpcontrollerbase}
|
||||
|
||||
NOTE: this documentation is out of date (see comments below).
|
||||
This class defines the interface by which
|
||||
applications may invoke a help viewer to provide on-line help.
|
||||
|
||||
The {\bf wxHelpInstance} class implements the interface by which
|
||||
applications may invoke wxHelp to provide on-line help. Each instance
|
||||
of the class maintains one connection to an instance of wxHelp which
|
||||
belongs to the application, and which is shut down when the Quit
|
||||
member of {\bf wxHelpInstance} is called (for example in the {\bf
|
||||
OnClose} member of an application's main frame). Under MS Windows,
|
||||
there is currently only one instance of wxHelp which is used by all
|
||||
applications.
|
||||
Other classes derive from this class to provide actual implementations
|
||||
of help controllers.
|
||||
|
||||
Since there is a DDE link between the two programs, each subsequent
|
||||
request to display a file or section uses the existing instance of
|
||||
wxHelp, rather than starting a new instance each time. wxHelp thus
|
||||
appears to the user to be an extension of the current application.
|
||||
wxHelp may also be invoked independently of a client application.
|
||||
A help controller allows an application to display help, at the contents
|
||||
or at a particular topic, and shut the help program down on termination.
|
||||
This avoids proliferation of many instances of the help viewer whenever the
|
||||
user requests a different topic via the application's menus or buttons.
|
||||
|
||||
Normally an application will create an instance of {\bf
|
||||
wxHelpInstance} when it starts, and immediately call {\bf Initialize}\rtfsp
|
||||
to associate a filename with it. wxHelp will only get run, however,
|
||||
just before the first call to display something. See the test program
|
||||
supplied with the wxHelp source.
|
||||
|
||||
Include the file {\tt wx\_help.h} to use this API, even if you have
|
||||
included {\tt wx.h}.
|
||||
|
||||
If you give TRUE to the constructor, you can use the native help system
|
||||
where appropriate (currently under Windows only). Omit the file extension
|
||||
to allow wxWindows to choose the appropriate file for the platform.
|
||||
|
||||
TODO: no longer derive this from a client class, but maybe have several implementations,
|
||||
e.g. wxHelpInstanceBase, wxHelpInstanceDDE, wxHelpInstanceWinHelp, wxHelpInstanceHTML, etc.
|
||||
Typically, an application will create a help controller instance
|
||||
when it starts, and immediately call {\bf Initialize}\rtfsp
|
||||
to associate a filename with it. The help viewer will only get run, however,
|
||||
just before the first call to display something.
|
||||
|
||||
\wxheading{Derivation}
|
||||
|
||||
TODO
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
TODO
|
||||
\helpref{wxWinHelpController}{wxwinhelpcontroller}
|
||||
|
||||
\wxheading{Include file}
|
||||
|
||||
{\tt <wx/helpbase.h>} (for just wxHelpControllerBase)
|
||||
|
||||
{\tt <wx/help.h>} (to include the platform-specific controller, e.g. wxWinHelpController)
|
||||
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHelpInstance::wxHelpInstance}
|
||||
\membersection{wxHelpControllerBase::wxHelpControllerBase}
|
||||
|
||||
\func{}{wxHelpInstance}{\param{bool}{ native}}
|
||||
\func{}{wxHelpControllerBase}{\void}
|
||||
|
||||
Constructs a help instance object, but does not invoke wxHelp.
|
||||
If {\it native} is TRUE, tries to use the native help system where
|
||||
possible (Windows Help under MS Windows, wxHelp on other platforms).
|
||||
Constructs a help instance object, but does not invoke the help viewer.
|
||||
|
||||
\membersection{wxHelpInstance::\destruct{wxHelpInstance}}
|
||||
\membersection{wxHelpControllerBase::\destruct{wxHelpControllerBase}}
|
||||
|
||||
\func{}{\destruct{wxHelpInstance}}{\void}
|
||||
\func{}{\destruct{wxHelpControllerBase}}{\void}
|
||||
|
||||
Destroys the help instance, closing down wxHelp for this application
|
||||
if it is running.
|
||||
Destroys the help instance, closing down the viewer if it is running.
|
||||
|
||||
\membersection{wxHelpInstance::Initialize}
|
||||
\membersection{wxHelpControllerBase::Initialize}\label{wxhelpcontrollerbaseinitialize}
|
||||
|
||||
\func{void}{Initialize}{\param{const wxString\& }{file}, \param{int}{ server = -1}}
|
||||
\func{virtual void}{Initialize}{\param{const wxString\& }{file}}
|
||||
|
||||
\func{virtual void}{Initialize}{\param{const wxString\& }{file}, \param{int}{ server}}
|
||||
|
||||
Initializes the help instance with a help filename, and optionally a server (socket)
|
||||
number (one is chosen at random if this parameter is omitted). Does not invoke wxHelp.
|
||||
number. Does not invoke the help viewer.
|
||||
This must be called directly after the help instance object is created and before
|
||||
any attempts to communicate with wxHelp.
|
||||
any attempts to communicate with the viewer.
|
||||
|
||||
You may omit the file extension, and in fact this is recommended if you
|
||||
wish to support .xlp files under X and .hlp under Windows.
|
||||
You may omit the file extension and a suitable one will be chosen.
|
||||
|
||||
\membersection{wxHelpInstance::DisplayBlock}
|
||||
\membersection{wxHelpControllerBase::DisplayBlock}\label{wxhelpcontrollerbasedisplayblock}
|
||||
|
||||
\func{bool}{DisplayBlock}{\param{long}{ blockNo}}
|
||||
\func{virtual bool}{DisplayBlock}{\param{long}{ blockNo}}
|
||||
|
||||
If wxHelp is not running, runs wxHelp and displays the file at the given block number.
|
||||
If using Windows Help, displays the file at the given context number.
|
||||
If the help viewer is not running, runs it and displays the file at the given block number.
|
||||
The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this
|
||||
refers to the context number. If wxHelp, this is the wxHelp block number.
|
||||
|
||||
\membersection{wxHelpInstance::DisplayContents}
|
||||
\membersection{wxHelpControllerBase::DisplayContents}\label{wxhelpcontrollerbasedisplaycontents}
|
||||
|
||||
\func{bool}{DisplayContents}{\void}
|
||||
\func{virtual bool}{DisplayContents}{\void}
|
||||
|
||||
If wxHelp is not running, runs wxHelp (or Windows Help) and displays the
|
||||
contents (the first section of the file).
|
||||
If the help viewer is not running, runs it and displays the
|
||||
contents.
|
||||
|
||||
\membersection{wxHelpInstance::DisplaySection}
|
||||
\membersection{wxHelpControllerBase::DisplaySection}\label{wxhelpcontrollerbasedisplaysection}
|
||||
|
||||
\func{bool}{DisplaySection}{\param{int}{ sectionNo}}
|
||||
\func{virtual bool}{DisplaySection}{\param{int}{ sectionNo}}
|
||||
|
||||
If wxHelp is not running, runs wxHelp and displays the given section.
|
||||
Sections are numbered starting from 1, and section numbers may be viewed by running
|
||||
wxHelp in edit mode.
|
||||
If the help viewer is not running, runs it and displays the given section.
|
||||
Sections are numbered starting from 1.
|
||||
|
||||
\membersection{wxHelpInstance::KeywordSearch}
|
||||
For wxHelp, section numbers may be viewed by running wxHelp in edit mode.
|
||||
|
||||
\func{bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
|
||||
DisplaySection does not apply to WinHelp.
|
||||
|
||||
If wxHelp (or Windows Help) is not running, runs wxHelp (or Windows
|
||||
Help), and searches for sections matching the given keyword. If one
|
||||
\membersection{wxHelpControllerBase::KeywordSearch}\label{wxhelpcontrollerbasekeywordsearch}
|
||||
|
||||
\func{virtual bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
|
||||
|
||||
If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
|
||||
match is found, the file is displayed at this section. If more than one
|
||||
match is found, the Search dialog is displayed with the matches (wxHelp)
|
||||
or the first topic is displayed (Windows Help).
|
||||
|
||||
\membersection{wxHelpInstance::LoadFile}
|
||||
\membersection{wxHelpControllerBase::LoadFile}\label{wxhelpcontrollerbaseloadfile}
|
||||
|
||||
\func{bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
|
||||
\func{virtual bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
|
||||
|
||||
If wxHelp (or Windows Help) is not running, runs wxHelp (or Windows
|
||||
Help), and loads the given file. If the filename is not supplied or is
|
||||
NULL, the file specified in {\bf Initialize} is used. If wxHelp is
|
||||
If the help viewer is not running, runs it and loads the given file.
|
||||
If the filename is not supplied or is
|
||||
NULL, the file specified in {\bf Initialize} is used. If the viewer is
|
||||
already displaying the specified file, it will not be reloaded. This
|
||||
member function may be used before each display call in case the user
|
||||
has opened another file.
|
||||
|
||||
\membersection{wxHelpInstance::OnQuit}
|
||||
\membersection{wxHelpControllerBase::OnQuit}\label{wxhelpcontrollerbaseonquit}
|
||||
|
||||
\func{bool}{OnQuit}{\void}
|
||||
\func{virtual bool}{OnQuit}{\void}
|
||||
|
||||
Overridable member called when this application's wxHelp is quit
|
||||
(no effect if Windows Help is being used instead).
|
||||
Overridable member called when this application's viewer is quit by the user.
|
||||
|
||||
\membersection{wxHelpInstance::Quit}
|
||||
This only works for wxXLPHelpController.
|
||||
|
||||
\func{bool}{Quit}{\void}
|
||||
\membersection{wxHelpControllerBase::Quit}\label{wxhelpcontrollerbasequit}
|
||||
|
||||
If wxHelp is running, quits wxHelp by disconnecting (no effect for Windows
|
||||
Help).
|
||||
\func{virtual bool}{Quit}{\void}
|
||||
|
||||
If the viewer is running, quits it by disconnecting.
|
||||
|
||||
For Windows Help, the viewer will only close if no other application is using it.
|
||||
|
||||
|
118
docs/latex/wx/joyevent.tex
Normal file
118
docs/latex/wx/joyevent.tex
Normal file
@@ -0,0 +1,118 @@
|
||||
\section{\class{wxJoystickEvent}}\label{wxjoystickevent}
|
||||
|
||||
This event class contains information about mouse events, particularly
|
||||
events received by windows.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process a mouse event, use these event handler macros to direct input to member
|
||||
functions that take a wxJoystickEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_JOY\_BUTTON\_DOWN(func)}}{Process a wxEVT\_JOY\_BUTTON\_DOWN event.}
|
||||
\twocolitem{{\bf EVT\_JOY\_BUTTON\_UP(func)}}{Process a wxEVT\_JOY\_BUTTON\_UP event.}
|
||||
\twocolitem{{\bf EVT\_JOY\_MOVE(func)}}{Process a wxEVT\_JOY\_MOVE event.}
|
||||
\twocolitem{{\bf EVT\_JOY\_ZMOVE(func)}}{Process a wxEVT\_JOY\_ZMOVE event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxJoystick}{wxjoystick}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxJoystickEvent::wxJoystickEvent}
|
||||
|
||||
\func{}{wxJoystickEvent}{\param{WXTYPE}{ eventType = 0}, \param{int}{ state = 0},
|
||||
\param{int}{ joystick = wxJOYSTICK1}, \param{int }{change = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxJoystickEvent::ButtonDown}\label{wxjoystickeventbuttondown}
|
||||
|
||||
\constfunc{bool}{ButtonDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
|
||||
|
||||
Returns TRUE if the event was a down event from the specified button (or any button).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to
|
||||
indicate any button down event.}
|
||||
|
||||
\membersection{wxJoystickEvent::ButtonIsDown}\label{wxjoystickeventbuttonisdown}
|
||||
|
||||
\constfunc{bool}{ButtonIsDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
|
||||
|
||||
Returns TRUE if the specified button (or any button) was in a down state.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to
|
||||
indicate any button down event.}
|
||||
|
||||
\membersection{wxJoystickEvent::ButtonUp}\label{wxjoystickeventbuttonup}
|
||||
|
||||
\constfunc{bool}{ButtonUp}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
|
||||
|
||||
Returns TRUE if the event was an up event from the specified button (or any button).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to
|
||||
indicate any button down event.}
|
||||
|
||||
\membersection{wxJoystickEvent::GetButtonChange}\label{wxjoystickeventgetbuttonchange}
|
||||
|
||||
\constfunc{int}{GetButtonChange}{\void}
|
||||
|
||||
Returns the identifier of the button changing state. This is a wxJOY\_BUTTONn identifier, where
|
||||
n is one of 1, 2, 3, 4.
|
||||
|
||||
\membersection{wxJoystickEvent::GetButtonState}\label{wxjoystickeventgetbuttonstate}
|
||||
|
||||
\constfunc{int}{GetButtonState}{\void}
|
||||
|
||||
Returns the down state of the buttons. This is a bitlist of wxJOY\_BUTTONn identifiers, where
|
||||
n is one of 1, 2, 3, 4.
|
||||
|
||||
\membersection{wxJoystickEvent::GetJoystick}\label{wxjoystickeventgetjoystick}
|
||||
|
||||
\constfunc{int}{GetJoystick}{\void}
|
||||
|
||||
Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.
|
||||
|
||||
\membersection{wxJoystickEvent::GetPosition}\label{wxjoystickeventgetposition}
|
||||
|
||||
\constfunc{wxPoint}{GetPosition}{\void}
|
||||
|
||||
Returns the x, y position of the joystick event.
|
||||
|
||||
\membersection{wxJoystickEvent::GetZPosition}\label{wxjoystickeventgetzposition}
|
||||
|
||||
\constfunc{int}{GetZPosition}{\void}
|
||||
|
||||
Returns the z position of the joystick event.
|
||||
|
||||
\membersection{wxJoystickEvent::IsButton}\label{wxjoystickeventisbutton}
|
||||
|
||||
\constfunc{bool}{IsButton}{\void}
|
||||
|
||||
Returns TRUE if this was a button up or down event ({\it not} 'is any button down?').
|
||||
|
||||
\membersection{wxJoystickEvent::IsMove}\label{wxjoystickeventismove}
|
||||
|
||||
\constfunc{bool}{IsMove}{\void}
|
||||
|
||||
Returns TRUE if this was an x, y move event.
|
||||
|
||||
\membersection{wxJoystickEvent::IsZMove}\label{wxjoystickeventiszmove}
|
||||
|
||||
\constfunc{bool}{IsZMove}{\void}
|
||||
|
||||
Returns TRUE if this was a z move event.
|
||||
|
294
docs/latex/wx/joystick.tex
Normal file
294
docs/latex/wx/joystick.tex
Normal file
@@ -0,0 +1,294 @@
|
||||
\section{\class{wxJoystick}}\label{wxjoystick}
|
||||
|
||||
wxJoystick allows an application to control one or more joysticks.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxJoystickEvent}{wxjoystickevent}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxJoystick::wxJoystick}\label{wxjoystickconstr}
|
||||
|
||||
\func{}{wxJoystick}{\param{int}{ joystick = wxJOYSTICK1}}
|
||||
|
||||
Constructor. {\it joystick} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick
|
||||
controller of interest.
|
||||
|
||||
\membersection{wxJoystick::\destruct{wxJoystick}}
|
||||
|
||||
\func{}{\destruct{wxJoystick}}{\void}
|
||||
|
||||
Destroys the wxJoystick object.
|
||||
|
||||
\membersection{wxJoystick::GetButtonState}\label{wxjoystickgetbuttonstate}
|
||||
|
||||
\constfunc{int}{GetButtonState}{\void}
|
||||
|
||||
Returns the state of the joystick buttons. A bitlist of wxJOY\_BUTTONn identifiers,
|
||||
where n is 1, 2, 3 or 4.
|
||||
|
||||
\membersection{wxJoystick::GetManufacturerId}\label{wxjoystickgetmanufacturerid}
|
||||
|
||||
\constfunc{int}{GetManufacturerId}{\void}
|
||||
|
||||
Returns the manufacturer id.
|
||||
|
||||
\membersection{wxJoystick::GetMovementThreshold}\label{wxjoystickgetmovementthreshold}
|
||||
|
||||
\constfunc{int}{GetMovementThreshold}{\void}
|
||||
|
||||
Returns the movement threshold, the number of steps outside which the joystick is deemed to have
|
||||
moved.
|
||||
|
||||
\membersection{wxJoystick::GetNumberAxes}\label{wxjoystickgetnumberaxes}
|
||||
|
||||
\constfunc{int}{GetNumberAxes}{\void}
|
||||
|
||||
Returns the number of axes for this joystick.
|
||||
|
||||
\membersection{wxJoystick::GetNumberButtons}\label{wxjoystickgetnumberbuttons}
|
||||
|
||||
\constfunc{int}{GetNumberButtons}{\void}
|
||||
|
||||
Returns the number of buttons for this joystick.
|
||||
|
||||
\membersection{wxJoystick::GetNumberJoysticks}\label{wxjoystickgetnumberjoysticks}
|
||||
|
||||
\constfunc{int}{GetNumberJoysticks}{\void}
|
||||
|
||||
Returns the number of joysticks currently attached to the computer.
|
||||
|
||||
\membersection{wxJoystick::GetPollingMax}\label{wxjoystickgetpollingmax}
|
||||
|
||||
\constfunc{int}{GetPollingMax}{\void}
|
||||
|
||||
Returns the maximum polling frequency.
|
||||
|
||||
\membersection{wxJoystick::GetPollingMin}\label{wxjoystickgetpollingmin}
|
||||
|
||||
\constfunc{int}{GetPollingMin}{\void}
|
||||
|
||||
Returns the minimum polling frequency.
|
||||
|
||||
\membersection{wxJoystick::GetProductId}\label{wxjoystickgetproductid}
|
||||
|
||||
\constfunc{int}{GetProductId}{\void}
|
||||
|
||||
Returns the product id for the joystick.
|
||||
|
||||
\membersection{wxJoystick::GetProductName}\label{wxjoystickgetproductname}
|
||||
|
||||
\constfunc{wxString}{GetProductName}{\void}
|
||||
|
||||
Returns the product name for the joystick.
|
||||
|
||||
\membersection{wxJoystick::GetPosition}\label{wxjoystickgetposition}
|
||||
|
||||
\constfunc{wxPoint}{GetPosition}{\void}
|
||||
|
||||
Returns the x, y position of the joystick.
|
||||
|
||||
\membersection{wxJoystick::GetPOVPosition}\label{wxjoystickgetpovposition}
|
||||
|
||||
\constfunc{int}{GetPOVPosition}{\void}
|
||||
|
||||
Returns the point-of-view position, expressed in discrete units.
|
||||
|
||||
\membersection{wxJoystick::GetPOVCTSPosition}\label{wxjoystickgetpovctsposition}
|
||||
|
||||
\constfunc{int}{GetPOVCTSPosition}{\void}
|
||||
|
||||
Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units.
|
||||
|
||||
\membersection{wxJoystick::GetRudderMax}\label{wxjoystickgetruddermax}
|
||||
|
||||
\constfunc{int}{GetRudderMax}{\void}
|
||||
|
||||
Returns the maximum rudder position.
|
||||
|
||||
\membersection{wxJoystick::GetRudderMin}\label{wxjoystickgetruddermin}
|
||||
|
||||
\constfunc{int}{GetRudderMin}{\void}
|
||||
|
||||
Returns the minimum rudder position.
|
||||
|
||||
\membersection{wxJoystick::GetRudderPosition}\label{wxjoystickgetrudderposition}
|
||||
|
||||
\constfunc{int}{GetRudderPosition}{\void}
|
||||
|
||||
Returns the rudder position.
|
||||
|
||||
\membersection{wxJoystick::GetUMax}\label{wxjoystickgetumax}
|
||||
|
||||
\constfunc{int}{GetUMax}{\void}
|
||||
|
||||
Returns the maximum U position.
|
||||
|
||||
\membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin}
|
||||
|
||||
\constfunc{int}{GetUMin}{\void}
|
||||
|
||||
Returns the minimum U position.
|
||||
|
||||
\membersection{wxJoystick::GetUPosition}\label{wxjoystickgetuposition}
|
||||
|
||||
\constfunc{int}{GetUPosition}{\void}
|
||||
|
||||
Gets the position of the fifth axis of the joystick, if it exists.
|
||||
|
||||
\membersection{wxJoystick::GetVMax}\label{wxjoystickgetvmax}
|
||||
|
||||
\constfunc{int}{GetVMax}{\void}
|
||||
|
||||
Returns the maximum V position.
|
||||
|
||||
\membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin}
|
||||
|
||||
\constfunc{int}{GetUMin}{\void}
|
||||
|
||||
Returns the minimum U position.
|
||||
|
||||
\membersection{wxJoystick::GetVPosition}\label{wxjoystickgetvposition}
|
||||
|
||||
\constfunc{int}{GetVPosition}{\void}
|
||||
|
||||
Gets the position of the sixth axis of the joystick, if it exists.
|
||||
|
||||
\membersection{wxJoystick::GetXMax}\label{wxjoystickgetxmax}
|
||||
|
||||
\constfunc{int}{GetXMax}{\void}
|
||||
|
||||
Returns the maximum x position.
|
||||
|
||||
\membersection{wxJoystick::GetXMin}\label{wxjoystickgetxmin}
|
||||
|
||||
\constfunc{int}{GetXMin}{\void}
|
||||
|
||||
Returns the minimum x position.
|
||||
|
||||
\membersection{wxJoystick::GetYMax}\label{wxjoystickgetymax}
|
||||
|
||||
\constfunc{int}{GetYMax}{\void}
|
||||
|
||||
Returns the maximum y position.
|
||||
|
||||
\membersection{wxJoystick::GetYMin}\label{wxjoystickgetymin}
|
||||
|
||||
\constfunc{int}{GetYMin}{\void}
|
||||
|
||||
Returns the minimum y position.
|
||||
|
||||
\membersection{wxJoystick::GetZMax}\label{wxjoystickgetzmax}
|
||||
|
||||
\constfunc{int}{GetZMax}{\void}
|
||||
|
||||
Returns the maximum z position.
|
||||
|
||||
\membersection{wxJoystick::GetZMin}\label{wxjoystickgetzmin}
|
||||
|
||||
\constfunc{int}{GetXMin}{\void}
|
||||
|
||||
Returns the minimum z position.
|
||||
|
||||
\membersection{wxJoystick::GetZPosition}\label{wxjoystickgetzposition}
|
||||
|
||||
\constfunc{int}{GetZPosition}{\void}
|
||||
|
||||
Returns the z position of the joystick.
|
||||
|
||||
\membersection{wxJoystick::HasPOV}\label{wxjoystickhaspov}
|
||||
|
||||
\constfunc{bool}{HasPOV}{\void}
|
||||
|
||||
Returns TRUE if the joystick has a point of view control.
|
||||
|
||||
\membersection{wxJoystick::HasPOV4Dir}\label{wxjoystickhaspovfdir}
|
||||
|
||||
\constfunc{bool}{HasPOV4Dir}{\void}
|
||||
|
||||
Returns TRUE if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right).
|
||||
|
||||
\membersection{wxJoystick::HasPOVCTS}\label{wxjoystickhaspovcts}
|
||||
|
||||
\constfunc{bool}{HasPOVCTS}{\void}
|
||||
|
||||
Returns TRUE if the joystick point-of-view supports continuous degree bearings.
|
||||
|
||||
\membersection{wxJoystick::HasRudder}\label{wxjoystickhasrudder}
|
||||
|
||||
\constfunc{bool}{HasRudder}{\void}
|
||||
|
||||
Returns TRUE if there is a rudder attached to the computer.
|
||||
|
||||
\membersection{wxJoystick::HasU}\label{wxjoystickhasu}
|
||||
|
||||
\constfunc{bool}{HasU}{\void}
|
||||
|
||||
Returns TRUE if the joystick has a U axis.
|
||||
|
||||
\membersection{wxJoystick::HasV}\label{wxjoystickhasv}
|
||||
|
||||
\constfunc{bool}{HasV}{\void}
|
||||
|
||||
Returns TRUE if the joystick has a V axis.
|
||||
|
||||
\membersection{wxJoystick::HasZ}\label{wxjoystickhasz}
|
||||
|
||||
\constfunc{bool}{HasZ}{\void}
|
||||
|
||||
Returns TRUE if the joystick has a Z axis.
|
||||
|
||||
\membersection{wxJoystick::IsOk}\label{wxjoystickisok}
|
||||
|
||||
\constfunc{bool}{IsOk}{\void}
|
||||
|
||||
Returns TRUE if the joystick is functioning.
|
||||
|
||||
\membersection{wxJoystick::ReleaseCapture}\label{wxjoystickreleasecapture}
|
||||
|
||||
\func{bool}{ReleaseCapture}{\void}
|
||||
|
||||
Releases the capture set by {\bf SetCapture}.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the capture release succeeded.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxJoystick::SetCapture}{wxjoysticksetcapture}, \helpref{wxJoystickEvent}{wxjoystickevent}
|
||||
|
||||
\membersection{wxJoystick::SetCapture}\label{wxjoysticksetcapture}
|
||||
|
||||
\func{bool}{SetCapture}{\param{wxWindow*}{ win}, \param{int}{ pollingFreq = 0}}
|
||||
|
||||
Sets the capture to direct joystick events to {\it win}.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{win}{The window that will receive joystick events.}
|
||||
|
||||
\docparam{pollingFreq}{If zero, movement events are sent when above the
|
||||
threshold. If greater than zero, events are received every {\it pollingFreq} milliseconds.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the capture succeeded.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxJoystick::ReleaseCapture}{wxjoystickreleasecapture}, \helpref{wxJoystickEvent}{wxjoystickevent}
|
||||
|
||||
\membersection{wxJoystick::SetMovementThreshold}\label{wxjoysticksetmovementthreshold}
|
||||
|
||||
\func{void}{SetMovementThreshold}{\param{int}{ threshold}}
|
||||
|
||||
Sets the movement threshold, the number of steps outside which the joystick is deemed to have
|
||||
moved.
|
||||
|
||||
|
@@ -48,7 +48,7 @@ into the DC before drawing on it.
|
||||
Selects the given bitmap into the device context, to use as the memory
|
||||
bitmap. Selecting the bitmap into a memory DC allows you to draw into
|
||||
the DC (and therefore the bitmap) and also to use {\bf Blit} to copy
|
||||
the bitmap to a canvas. For this purpose, you may find \helpref{wxDC::DrawIcon}{wxdcdrawicon}\rtfsp
|
||||
the bitmap to a window. For this purpose, you may find \helpref{wxDC::DrawIcon}{wxdcdrawicon}\rtfsp
|
||||
easier to use instead.
|
||||
|
||||
If the argument is wxNullBitmap (or some other uninitialised wxBitmap) the current bitmap is selected out of the device
|
||||
|
@@ -1,7 +1,7 @@
|
||||
\section{\class{wxMouseEvent}}\label{wxmouseevent}
|
||||
|
||||
This event class contains information about mouse events, particularly
|
||||
events received by canvases. See \helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}.
|
||||
This event class contains information about mouse events.
|
||||
See \helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
@@ -169,7 +169,7 @@ Returns TRUE if this was a dragging event (motion while a button is depressed).
|
||||
|
||||
\func{bool}{Entering}{\void}
|
||||
|
||||
Returns TRUE if the mouse was entering the canvas (MS Windows and Motif).
|
||||
Returns TRUE if the mouse was entering the window (MS Windows and Motif).
|
||||
|
||||
See also \helpref{wxMouseEvent::Leaving}{wxmouseeventleaving}.
|
||||
|
||||
@@ -196,7 +196,7 @@ that may be tested using {\it ButtonDown}).
|
||||
|
||||
\func{bool}{Leaving}{\void}
|
||||
|
||||
Returns TRUE if the mouse was leaving the canvas (MS Windows and Motif).
|
||||
Returns TRUE if the mouse was leaving the window (MS Windows and Motif).
|
||||
|
||||
See also \helpref{wxMouseEvent::Entering}{wxmouseevententering}.
|
||||
|
||||
@@ -267,14 +267,14 @@ Returns TRUE if this was a motion event (no buttons depressed).
|
||||
\func{void}{Position}{\param{float *}{x}, \param{float *}{y}}
|
||||
|
||||
Sets *x and *y to the position at which the event occurred. If the
|
||||
window is a canvas, the position is converted to logical units
|
||||
window is a window, the position is converted to logical units
|
||||
(according to the current mapping mode) with scrolling taken into
|
||||
account. To get back to device units (for example to calculate where on the
|
||||
screen to place a dialog box associated with a canvas mouse event), use
|
||||
screen to place a dialog box associated with a window mouse event), use
|
||||
\rtfsp{\bf wxDC::LogicalToDeviceX} and {\bf wxDC::LogicalToDeviceY}.
|
||||
|
||||
For example, the following code calculates screen pixel coordinates
|
||||
from the frame position, canvas view start (assuming the canvas is the only
|
||||
from the frame position, window view start (assuming the window is the only
|
||||
subwindow on the frame and therefore at the top left of it), and the
|
||||
logical event position. A menu is popped up at the position where the
|
||||
mouse click occurred. (Note that the application should also check that
|
||||
@@ -285,9 +285,9 @@ occurred near the screen edge!)
|
||||
float event_x, event_y;
|
||||
event.Position(&event_x, &event_y);
|
||||
frame->GetPosition(&x, &y);
|
||||
canvas->ViewStart(&x1, &y1);
|
||||
int mouse_x = (int)(canvas->GetDC()->LogicalToDeviceX(event_x + x - x1);
|
||||
int mouse_y = (int)(canvas->GetDC()->LogicalToDeviceY(event_y + y - y1);
|
||||
window->ViewStart(&x1, &y1);
|
||||
int mouse_x = (int)(window->GetDC()->LogicalToDeviceX(event_x + x - x1);
|
||||
int mouse_y = (int)(window->GetDC()->LogicalToDeviceY(event_y + y - y1);
|
||||
|
||||
char *choice = wxGetSingleChoice("Menu", "Pick a node action",
|
||||
no_choices, choices, frame, mouse_x, mouse_y);
|
||||
@@ -318,7 +318,6 @@ of the current event type.
|
||||
|
||||
Returns TRUE if the right mouse button changed to up.
|
||||
|
||||
|
||||
\membersection{wxMouseEvent::ShiftDown}
|
||||
|
||||
\func{bool}{ShiftDown}{\void}
|
||||
|
@@ -178,7 +178,7 @@ outside of OnDraw (via OnPaint), or you wish to implement OnPaint yourself, you
|
||||
call this function yourself. For example:
|
||||
|
||||
\begin{verbatim}
|
||||
void MyCanvas::OnEvent(wxMouseEvent& event)
|
||||
void MyWindow::OnEvent(wxMouseEvent& event)
|
||||
{
|
||||
wxClientDC dc(this);
|
||||
PrepareDC(dc);
|
||||
|
@@ -1,21 +0,0 @@
|
||||
;;; Tex2RTF initialisation file for 32-bit WinHelp
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
authorFontSize = 10
|
||||
chapterFontSize = 12
|
||||
sectionFontSize = 12
|
||||
subsectionFontSize = 12
|
||||
headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
listItemIndent=40
|
||||
generateHPJ = yes
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpContents = yes
|
||||
winHelpVersion = 4 ; 3 for Windows 3.x, 4 for Windows 95
|
||||
winHelpTitle = "wxWindows Manual"
|
||||
\overview [2] { \settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
|
||||
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
|
||||
\sethotspotcolour{on}\sethotspotunderline{on}}
|
||||
|
@@ -10,11 +10,11 @@ required.
|
||||
|
||||
A bitmap created dynamically or loaded from a file can be selected
|
||||
into a memory device context (instance of \helpref{wxMemoryDC}{wxmemorydc}). This
|
||||
enables the bitmap to be copied to a canvas or memory device context
|
||||
enables the bitmap to be copied to a window or memory device context
|
||||
using \helpref{wxDC::Blit}{wxdcblit}, or to be used as a drawing surface. The {\bf
|
||||
wxToolBarSimple} class is implemented using bitmaps, and the toolbar demo
|
||||
shows one of the toolbar bitmaps being used for drawing a miniature
|
||||
version of the graphic which appears on the main canvas.
|
||||
version of the graphic which appears on the main window.
|
||||
|
||||
See \helpref{wxMemoryDC}{wxmemorydc} for an example of drawing onto a bitmap.
|
||||
|
||||
|
@@ -55,7 +55,7 @@ the wxColourDialog class. Here is an excerpt, which
|
||||
sets various parameters of a wxColourData object, including
|
||||
a grey scale for the custom colours. If the user did not cancel
|
||||
the dialog, the application retrieves the selected colour and
|
||||
uses it to set the background of a canvas.
|
||||
uses it to set the background of a window.
|
||||
|
||||
\begin{verbatim}
|
||||
wxColourData data;
|
||||
@@ -72,9 +72,9 @@ uses it to set the background of a canvas.
|
||||
wxColourData retData = dialog.GetColourData();
|
||||
wxColour col = retData.GetColour();
|
||||
wxBrush brush(col, wxSOLID);
|
||||
myCanvas->SetBackground(brush);
|
||||
myCanvas->Clear();
|
||||
myCanvas->Refresh();
|
||||
myWindow->SetBackground(brush);
|
||||
myWindow->Clear();
|
||||
myWindow->Refresh();
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
@@ -128,7 +128,7 @@ and colour for drawing text on a canvas. Here is an excerpt:
|
||||
wxFontData retData = dialog.GetFontData();
|
||||
canvasFont = retData.GetChosenFont();
|
||||
canvasTextColour = retData.GetColour();
|
||||
myCanvas->Refresh();
|
||||
myWindow->Refresh();
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
|
@@ -80,13 +80,13 @@ irrelevant.
|
||||
|
||||
\subsubsection{Example 1: subwindow layout}
|
||||
|
||||
This example specifies a panel and a canvas side by side,
|
||||
This example specifies a panel and a window side by side,
|
||||
with a text subwindow below it.
|
||||
|
||||
\begin{verbatim}
|
||||
frame->panel = new wxPanel(frame, 0, 0, 1000, 500, 0);
|
||||
frame->canvas = new MyCanvas(frame, 0, 0, 400, 400, wxRETAINED);
|
||||
frame->text_window = new MyTextWindow(frame, 0, 250, 400, 250, wxNATIVE_IMPL);
|
||||
frame->panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(1000, 500), 0);
|
||||
frame->scrollWindow = new MyScrolledWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), wxRETAINED);
|
||||
frame->text_window = new MyTextWindow(frame, -1, wxPoint(0, 250), wxSize(400, 250));
|
||||
|
||||
// Set constraints for panel subwindow
|
||||
wxLayoutConstraints *c1 = new wxLayoutConstraints;
|
||||
@@ -98,7 +98,7 @@ with a text subwindow below it.
|
||||
|
||||
frame->panel->SetConstraints(c1);
|
||||
|
||||
// Set constraints for canvas subwindow
|
||||
// Set constraints for scrollWindow subwindow
|
||||
wxLayoutConstraints *c2 = new wxLayoutConstraints;
|
||||
|
||||
c2->left.SameAs (frame->panel, wxRight);
|
||||
@@ -106,7 +106,7 @@ with a text subwindow below it.
|
||||
c2->right.SameAs (frame, wxRight);
|
||||
c2->height.PercentOf (frame, wxHeight, 50);
|
||||
|
||||
frame->canvas->SetConstraints(c2);
|
||||
frame->scrollWindow->SetConstraints(c2);
|
||||
|
||||
// Set constraints for text subwindow
|
||||
wxLayoutConstraints *c3 = new wxLayoutConstraints;
|
||||
@@ -127,7 +127,7 @@ the remainder of the width. Margins of 5 pixels are used.
|
||||
|
||||
\begin{verbatim}
|
||||
// Create some panel items
|
||||
wxButton *btn1 = new wxButton(frame->panel, (wxFunction)NULL, "A button") ;
|
||||
wxButton *btn1 = new wxButton(frame->panel, -1, "A button") ;
|
||||
|
||||
wxLayoutConstraints *b1 = new wxLayoutConstraints;
|
||||
b1->centreX.SameAs (frame->panel, wxCentreX);
|
||||
@@ -136,8 +136,8 @@ the remainder of the width. Margins of 5 pixels are used.
|
||||
b1->height.PercentOf (frame->panel, wxHeight, 10);
|
||||
btn1->SetConstraints(b1);
|
||||
|
||||
wxListBox *list = new wxListBox(frame->panel, (wxFunction)NULL, "A list",
|
||||
wxSINGLE, -1, -1, 200, 100);
|
||||
wxListBox *list = new wxListBox(frame->panel, -1, "A list",
|
||||
wxPoint(-1, -1), wxSize(200, 100));
|
||||
|
||||
wxLayoutConstraints *b2 = new wxLayoutConstraints;
|
||||
b2->top.Below (btn1, 5);
|
||||
@@ -146,8 +146,8 @@ the remainder of the width. Margins of 5 pixels are used.
|
||||
b2->bottom.SameAs (frame->panel, wxBottom, 5);
|
||||
list->SetConstraints(b2);
|
||||
|
||||
wxMultiText *mtext = new wxMultiText(frame->panel, (wxFunction)NULL, "Multiline text", "Some text",
|
||||
-1, -1, 150, 100);
|
||||
wxTextCtrl *mtext = new wxTextCtrl(frame->panel, -1, "Multiline text", "Some text",
|
||||
wxPoint(-1, -1), wxSize(150, 100), wxTE_MULTILINE);
|
||||
|
||||
wxLayoutConstraints *b3 = new wxLayoutConstraints;
|
||||
b3->top.Below (btn1, 5);
|
||||
|
@@ -27,7 +27,7 @@ These are the overall steps involved in creating an application based on the doc
|
||||
\item Define your own document and view classes, overriding a minimal set of
|
||||
member functions e.g. for input/output, drawing and initialization.
|
||||
\item Define any subwindows
|
||||
(such as a canvas) that are needed for the view(s). You may need to route some events
|
||||
(such as a scrolled window) that are needed for the view(s). You may need to route some events
|
||||
to views or documents, for example OnPaint needs to be routed to wxView::OnDraw.
|
||||
\item Decide what style of interface you will use: Microsoft's MDI (multiple
|
||||
document child frames surrounded by an overall frame), SDI (a separate, unconstrained frame
|
||||
|
@@ -11,7 +11,7 @@ headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
listItemIndent=40
|
||||
generateHPJ = yes
|
||||
generateHPJ = no
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpContents = yes
|
||||
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
|
||||
|
@@ -3,7 +3,7 @@
|
||||
Class: \helpref{wxFont}{wxfont}
|
||||
|
||||
A font is an object which determines the appearance of text, primarily
|
||||
when drawing text to a canvas or device context. A font is determined by
|
||||
when drawing text to a window or device context. A font is determined by
|
||||
up to six parameters:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
@@ -30,7 +30,7 @@ might be transported to a different Windows machine or other platform.
|
||||
two platforms, if the mapping mode is anything other than MM\_TEXT.
|
||||
Under X, font size is always specified in points. Under MS Windows, the
|
||||
unit for text is points but the text is scaled according to the
|
||||
current mapping mode. However, user scaling on a device canvas will
|
||||
current mapping mode. However, user scaling on a device context will
|
||||
also scale fonts under both environments.}
|
||||
|
||||
|
||||
|
@@ -22,13 +22,13 @@ Instead of creating a dialog box and populating it with items, it is possible to
|
||||
one of the convenient common dialog classes, such as \helpref{wxMessageDialog}{wxmessagedialog}\rtfsp
|
||||
and \helpref{wxFileDialog}{wxfiledialog}.
|
||||
|
||||
You never draw directly onto a canvas --- you use a {\it device context} (DC). \helpref{wxDC}{wxdc} is
|
||||
You never draw directly onto a window --- you use a {\it device context} (DC). \helpref{wxDC}{wxdc} is
|
||||
the base for \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPostScriptDC}{wxpostscriptdc},
|
||||
\rtfsp\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxMetaFileDC}{wxmetafiledc} and \helpref{wxPrinterDC}{wxprinterdc}.
|
||||
If your drawing functions have {\bf wxDC} as a parameter, you can pass any of these DCs
|
||||
to the function, and thus use the same code to draw to several different devices.
|
||||
You can draw using the member functions of {\bf wxDC}, such as \helpref{wxDC::DrawLine}{wxdcdrawline}\rtfsp
|
||||
and \helpref{wxDC::DrawText}{wxdcdrawtext}. Control colour on a canvas (\helpref{wxColour}{wxcolour}) with
|
||||
and \helpref{wxDC::DrawText}{wxdcdrawtext}. Control colour on a window (\helpref{wxColour}{wxcolour}) with
|
||||
brushes (\helpref{wxBrush}{wxbrush}) and pens (\helpref{wxPen}{wxpen}).
|
||||
|
||||
To intercept events, you add a DECLARE\_EVENT\_TABLE macro to the window class declaration,
|
||||
@@ -38,7 +38,7 @@ These might override predefined event handlers such as \helpref{wxWindow::OnChar
|
||||
\rtfsp\helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}.
|
||||
|
||||
Most modern applications will have an on-line, hypertext help system; for this, you
|
||||
need wxHelp and the \helpref{wxHelpInstance}{wxhelpinstance} class to control
|
||||
need wxHelp and the \helpref{wxHelpControllerBase}{wxhelpcontrollerbase} class to control
|
||||
wxHelp. To add sparkle, you might use the wxToolBar class (documented separately)
|
||||
which makes heavy use of the \helpref{wxBitmap}{wxbitmap}.
|
||||
|
||||
|
@@ -138,7 +138,7 @@ but for portability it should be called anyway.
|
||||
|
||||
\func{void}{DrawTool}{\param{wxMemoryDC\& }{memDC}, \param{wxToolBarBaseTool* }{tool}}
|
||||
|
||||
Draws the specified tool onto the canvas using the given memory device context.
|
||||
Draws the specified tool onto the window using the given memory device context.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
@@ -236,7 +236,7 @@ Returns the left/right and top/bottom margins, which are also used for inter-too
|
||||
\constfunc{void}{GetMaxSize}{\param{float*}{ w}, \param{float*}{ h}}
|
||||
|
||||
Gets the maximum size taken up by the tools after layout, including margins.
|
||||
This can be used to size a frame around the toolbar canvas.
|
||||
This can be used to size a frame around the toolbar window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
@@ -351,7 +351,7 @@ TRUE if the tool is toggled on, FALSE otherwise.
|
||||
\func{void}{Layout}{\void}
|
||||
|
||||
Called by the application after the tools have been added to
|
||||
automatically lay the tools out on the canvas. If you have given
|
||||
automatically lay the tools out on the window. If you have given
|
||||
absolute positions when adding the tools, do not call this.
|
||||
|
||||
\membersection{wxToolBarBase::OnLeftClick}\label{wxtoolbarbaseonleftclick}
|
||||
|
@@ -15,18 +15,16 @@ subwindows and hiding one of them.
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
splitter = new wxSplitterWindow(this, 0, 0, 400, 400, wxSP_3D);
|
||||
splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0), wxSize(400, 400), wxSP_3D);
|
||||
|
||||
leftCanvas = new MyCanvas(splitter);
|
||||
leftCanvas->SetBackground(wxRED_BRUSH);
|
||||
leftCanvas->SetScrollbars(20, 20, 50, 50, 4, 4);
|
||||
leftWindow = new MyWindow(splitter);
|
||||
leftWindow->SetScrollbars(20, 20, 50, 50);
|
||||
|
||||
rightCanvas = new MyCanvas(splitter);
|
||||
rightCanvas->SetBackground(wxCYAN_BRUSH);
|
||||
rightCanvas->SetScrollbars(20, 20, 50, 50, 4, 4);
|
||||
rightCanvas->Show(FALSE);
|
||||
rightWindow = new MyWindow(splitter);
|
||||
rightWindow->SetScrollbars(20, 20, 50, 50);
|
||||
rightWindow->Show(FALSE);
|
||||
|
||||
splitter->Initialize(leftCanvas);
|
||||
splitter->Initialize(leftWindow);
|
||||
|
||||
// Set this to prevent unsplitting
|
||||
// splitter->SetMinimumPaneSize(20);
|
||||
@@ -41,18 +39,18 @@ The next fragment shows how the splitter window can be manipulated after creatio
|
||||
{
|
||||
if ( splitter->IsSplit() )
|
||||
splitter->Unsplit();
|
||||
leftCanvas->Show(TRUE);
|
||||
rightCanvas->Show(TRUE);
|
||||
splitter->SplitVertically( leftCanvas, rightCanvas );
|
||||
leftWindow->Show(TRUE);
|
||||
rightWindow->Show(TRUE);
|
||||
splitter->SplitVertically( leftWindow, rightWindow );
|
||||
}
|
||||
|
||||
void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
|
||||
{
|
||||
if ( splitter->IsSplit() )
|
||||
splitter->Unsplit();
|
||||
leftCanvas->Show(TRUE);
|
||||
rightCanvas->Show(TRUE);
|
||||
splitter->SplitHorizontally( leftCanvas, rightCanvas );
|
||||
leftWindow->Show(TRUE);
|
||||
rightWindow->Show(TRUE);
|
||||
splitter->SplitHorizontally( leftWindow, rightWindow );
|
||||
}
|
||||
|
||||
void MyFrame::OnUnsplit(wxCommandEvent& event)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
\section{Tab classes overview}\label{wxtaboverview}
|
||||
|
||||
Classes: \helpref{wxTabView}{wxtabview}, \helpref{wxPanelTabView}{wxpaneltabview},
|
||||
\helpref{wxTabbedPanel}{wxtabbedpanel}, \helpref{wxTabbedDialogBox}{wxtabbeddialogbox},
|
||||
\helpref{wxTabbedPanel}{wxtabbedpanel}, \helpref{wxTabbedDialog}{wxtabbeddialog},
|
||||
\helpref{wxTabControl}{wxtabcontrol}
|
||||
|
||||
The tab classes provides a way to display rows of tabs (like file divider tabs), which can be
|
||||
@@ -9,7 +9,7 @@ used to switch between panels or other information. Tabs are most
|
||||
commonly used in dialog boxes where the number of options is too great
|
||||
to fit on one dialog.
|
||||
|
||||
\wxheading{The appearance and behaviour of a wxTabbedDialogBox}
|
||||
\wxheading{The appearance and behaviour of a wxTabbedDialog}
|
||||
|
||||
The following screenshot shows the appearance of the sample tabbed dialog application.
|
||||
|
||||
@@ -209,7 +209,7 @@ wxPanelTabView class, but an application could derive other kinds of
|
||||
view from wxTabView.
|
||||
|
||||
For example, a help application might draw a representation of a book on
|
||||
a canvas, with a row of tabs along the top. The new tab view class might
|
||||
a window, with a row of tabs along the top. The new tab view class might
|
||||
be called wxCanvasTabView, for example, with the wxBookCanvas posting
|
||||
the OnEvent function to the wxCanvasTabView before processing further,
|
||||
application-specific event processing.
|
||||
|
@@ -87,7 +87,7 @@ Example of toolbar use are given in the sample programs tbarsmpl,
|
||||
tbarmsw and tbar95.
|
||||
|
||||
Each sample creates a main window, and two toolbars: a floating toolbar
|
||||
with 24 tools, and a toolbar along the top of the main drawing canvas, divided into groups.
|
||||
with 24 tools, and a toolbar along the top of the main drawing window, divided into groups.
|
||||
|
||||
The test program defines a general-purpose derived frame called
|
||||
\rtfsp{\bf wxFrameWithToolBar} which can manage a frame with one main subwindow
|
||||
@@ -113,7 +113,7 @@ The following fragment illustrates the essence of creating a toolbar.
|
||||
wxDEFAULT_FRAME_STYLE | wxSTAY_ON_TOP);
|
||||
|
||||
// 5 rows
|
||||
toolBar = new TestToolBar(toolBarFrame, 10, 10, -1, -1, 0, wxVERTICAL, 5);
|
||||
toolBar = new TestToolBar(toolBarFrame, -1, wxPoint(10, 10), wxSize(-1, -1), 0, wxVERTICAL, 5);
|
||||
toolBar->SetMargins(2, 2);
|
||||
|
||||
for (int i = 10; i < 25; i++)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
In the descriptions of the wxWindows classes and their member
|
||||
functions, note that descriptions of inherited member functions are not
|
||||
duplicated in derived classes unless their behaviour is different. So in
|
||||
using a class such as wxCanvas, be aware that wxWindow functions may be
|
||||
using a class such as wxScrolledWindow, be aware that wxWindow functions may be
|
||||
relevant.
|
||||
|
||||
Note also that arguments with default values may be omitted from a
|
||||
|
@@ -1,7 +1,6 @@
|
||||
\section{\class{wxUpdateIterator}}\label{wxupdateiterator}
|
||||
|
||||
This class is used to iterate through all damaged regions of a canvas, panel
|
||||
or dialog box, within an OnPaint call.
|
||||
This class is used to iterate through all damaged regions of a window, within an OnPaint call.
|
||||
|
||||
To use it, construct an iterator object on the stack and loop through the
|
||||
regions, testing the object and incrementing the iterator at the end of the loop.
|
||||
|
@@ -118,8 +118,8 @@ Implements closing behaviour. The default implementation calls wxDocument::Close
|
||||
to close the associated document. Does not delete the view. The application
|
||||
may wish to do some cleaning up operations in this function, {\it if} a
|
||||
call to wxDocument::Close succeeded. For example, if your application's
|
||||
all share the same canvas, you need to disassociate the canvas from the view
|
||||
and perhaps clear the canvas. If {\it deleteWindow} is TRUE, delete the
|
||||
all share the same window, you need to disassociate the window from the view
|
||||
and perhaps clear the window. If {\it deleteWindow} is TRUE, delete the
|
||||
frame associated with the view.
|
||||
|
||||
\membersection{wxView::OnCreate}
|
||||
|
@@ -1246,13 +1246,6 @@ the commandInt member of the event to check the selected menu identifier.
|
||||
|
||||
\docparam{y}{Required y position for the menu to appear.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Valid only for subwindows (panels, canvases and text windows).
|
||||
|
||||
Sometimes this function does not function correctly under Motif, in which case
|
||||
please use \helpref{wxWindow::FakePopupMenu}{wxwindowfakepopupmenu} instead.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu}{wxmenu}, \helpref{wxWindow::FakePopupMenu}{wxwindowfakepopupmenu}
|
||||
@@ -1425,13 +1418,6 @@ You must call \helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout} to tell a
|
||||
the constraints automatically in OnSize; otherwise, you must
|
||||
override OnSize and call Layout explicitly.
|
||||
|
||||
% TODO: double click should always be allowed.
|
||||
%\membersection{wxWindow::SetDoubleClick}\label{setdoubleclick}
|
||||
%
|
||||
%\func{void}{SetDoubleClick}{\param{bool}{ allowDoubleClick}}
|
||||
%
|
||||
%For canvases, allows double click if {\it allowDoubleClick} is TRUE. The default is FALSE.
|
||||
|
||||
\membersection{wxWindow::SetFocus}\label{wxwindowsetfocus}
|
||||
|
||||
\func{virtual void}{SetFocus}{\void}
|
||||
@@ -1664,9 +1650,9 @@ Sets the range of one of the built-in scrollbars.
|
||||
\wxheading{Remarks}
|
||||
|
||||
The range of a scrollbar is the number of steps that the thumb may travel, rather than the total
|
||||
object length of the scrollbar. If you are implementing a scrolling canvas, for example, you
|
||||
would adjust the scroll range when the canvas is resized, by subtracting the canvas view size from the
|
||||
total virtual canvas size. When the two sizes are the same (all the canvas is visible), the range goes to zero
|
||||
object length of the scrollbar. If you are implementing a scrolling window, for example, you
|
||||
would adjust the scroll range when the window is resized, by subtracting the window view size from the
|
||||
total virtual window size. When the two sizes are the same (all the window is visible), the range goes to zero
|
||||
and usually the scrollbar will be automatically hidden.
|
||||
|
||||
\wxheading{See also}
|
||||
|
107
docs/latex/wx/winhelp.tex
Normal file
107
docs/latex/wx/winhelp.tex
Normal file
@@ -0,0 +1,107 @@
|
||||
\section{\class{wxWinHelpController}}\label{wxwinhelpcontroller}
|
||||
|
||||
This class provides the means to control a WinHelp instance.
|
||||
Under Windows, wxHelpController is defined to be a synonym for wxWinHelpController.
|
||||
|
||||
A help controller allows an application to display help, at the contents
|
||||
or at a particular topic, and shut the help program down on termination.
|
||||
This avoids proliferation of many instances of the help viewer whenever the
|
||||
user requests a different topic via the application's menus or buttons.
|
||||
|
||||
Typically, an application will create a help controller instance
|
||||
when it starts, and immediately call {\bf Initialize}\rtfsp
|
||||
to associate a filename with it. The help viewer will only get run, however,
|
||||
just before the first call to display something.
|
||||
|
||||
\wxheading{Derivation}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxHelpControllerBase}{wxwinhelpcontrollerbase}
|
||||
|
||||
\wxheading{Include file}
|
||||
|
||||
{\tt <wx/help.h>}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxWinHelpController::wxWinHelpController}
|
||||
|
||||
\func{}{wxWinHelpController}{\void}
|
||||
|
||||
Constructs a help instance object, but does not invoke the help viewer.
|
||||
|
||||
\membersection{wxWinHelpController::\destruct{wxWinHelpController}}
|
||||
|
||||
\func{}{\destruct{wxWinHelpController}}{\void}
|
||||
|
||||
Destroys the help instance, closing down the viewer if it is running.
|
||||
|
||||
\membersection{wxWinHelpController::Initialize}\label{wxwinhelpcontrollerinitialize}
|
||||
|
||||
\func{void}{Initialize}{\param{const wxString\& }{file}}
|
||||
|
||||
Initializes the help instance with a help filename. Does not invoke the help viewer.
|
||||
This must be called directly after the help instance object is created and before
|
||||
any attempts to communicate with the viewer.
|
||||
|
||||
You may omit the file extension and a suitable one will be chosen.
|
||||
|
||||
\membersection{wxWinHelpController::DisplayBlock}\label{wxwinhelpcontrollerdisplayblock}
|
||||
|
||||
\func{bool}{DisplayBlock}{\param{long}{ blockNo}}
|
||||
|
||||
If the help viewer is not running, runs it and displays the file at the given block number.
|
||||
The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this
|
||||
refers to the context number.
|
||||
|
||||
\membersection{wxWinHelpController::DisplayContents}\label{wxwinhelpcontrollerdisplaycontents}
|
||||
|
||||
\func{bool}{DisplayContents}{\void}
|
||||
|
||||
If the help viewer is not running, runs it and displays the
|
||||
contents.
|
||||
|
||||
\membersection{wxWinHelpController::DisplaySection}\label{wxwinhelpcontrollerdisplaysection}
|
||||
|
||||
\func{bool}{DisplaySection}{\param{int}{ sectionNo}}
|
||||
|
||||
DisplaySection does not apply to WinHelp.
|
||||
|
||||
\membersection{wxWinHelpController::KeywordSearch}\label{wxwinhelpcontrollerkeywordsearch}
|
||||
|
||||
\func{bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
|
||||
|
||||
If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
|
||||
match is found, the file is displayed at this section. If more than one
|
||||
match is found, the first topic is displayed (Windows Help).
|
||||
|
||||
\membersection{wxWinHelpController::LoadFile}\label{wxwinhelpcontrollerloadfile}
|
||||
|
||||
\func{bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
|
||||
|
||||
If the help viewer is not running, runs it and loads the given file.
|
||||
If the filename is not supplied or is
|
||||
NULL, the file specified in {\bf Initialize} is used. If the viewer is
|
||||
already displaying the specified file, it will not be reloaded. This
|
||||
member function may be used before each display call in case the user
|
||||
has opened another file.
|
||||
|
||||
\membersection{wxWinHelpController::OnQuit}\label{wxwinhelpcontrolleronquit}
|
||||
|
||||
\func{bool}{OnQuit}{\void}
|
||||
|
||||
Overridable member called when this application's viewer is quit by the user.
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxWinHelpController::Quit}\label{wxwinhelpcontrollerquit}
|
||||
|
||||
\func{bool}{Quit}{\void}
|
||||
|
||||
If the viewer is running, quits it by disconnecting.
|
||||
|
||||
For Windows Help, the viewer will only close if no other application is using it.
|
||||
|
1417
docs/latex/wx/wx.cnt
1417
docs/latex/wx/wx.cnt
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
[OPTIONS]
|
||||
BMROOT=d:\wx2\wxWindows\docs\latex\wx ; Assume that bitmaps are where the source is
|
||||
BMROOT=d:\wx2\wxwind~1\docs\latex\wx ; Assume that bitmaps are where the source is
|
||||
TITLE=wxWindows Manual
|
||||
CONTENTS=Contents
|
||||
COMPRESS=HIGH
|
||||
|
Reference in New Issue
Block a user