Added automatic dialog scrolling ability
Added ability to resize wizard bitmaps automatically Made it easier to derive from wxWizard and override behaviour, mainly by making members protected instead of private git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -114,6 +114,7 @@
|
||||
\input debugrptup.tex
|
||||
\input delgrend.tex
|
||||
\input dialog.tex
|
||||
\input dialoglayoutadapter.tex
|
||||
\input dialevt.tex
|
||||
\input dialup.tex
|
||||
\input dir.tex
|
||||
|
@@ -15,6 +15,7 @@ A dialog box is a window with a title bar and sometimes a system menu, which
|
||||
can be moved around the screen. It can contain controls and other windows and
|
||||
is often used to allow the user to make some choice or to answer a question.
|
||||
|
||||
Dialogs can be made scrollable, automatically: please see \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for further details.
|
||||
|
||||
\wxheading{Dialog Buttons}
|
||||
|
||||
@@ -31,8 +32,6 @@ Also notice that the \helpref{CreateButtonSizer()}{wxdialogcreatebuttonsizer}
|
||||
should be used to create the buttons appropriate for the current platform and
|
||||
positioned correctly (including their order which is platform-dependent).
|
||||
|
||||
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
|
||||
@@ -177,6 +176,22 @@ individual dialog boxes.}
|
||||
|
||||
Destructor. Deletes any child windows before deleting the physical window.
|
||||
|
||||
\membersection{wxDialog::AddMainButtonId}\label{wxdialogaddmainbuttonid}
|
||||
|
||||
\func{void}{AddMainButtonId}{\param{wxWindowID}{ id}}
|
||||
|
||||
Adds an identifier to be regarded as a main button for the non-scrolling area of a dialog.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
\membersection{wxDialog::CanDoLayoutAdaptation}\label{wxdialogcandolayoutadaptation}
|
||||
|
||||
\func{bool}{CanDoLayoutAdapation}{\void}
|
||||
|
||||
Returns \true if this dialog can and should perform layout adaptation using \helpref{DoLayoutAdaptation}{wxdialogdolayoutadaptation}, usually if
|
||||
the dialog is too large to fit on the display.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
\membersection{wxDialog::Centre}\label{wxdialogcentre}
|
||||
|
||||
@@ -241,6 +256,13 @@ wxHELP, wxNO\_DEFAULT.
|
||||
|
||||
The sizer lays out the buttons in a manner appropriate to the platform.
|
||||
|
||||
\membersection{wxDialog::DoLayoutAdaptation}\label{wxdialogdolayoutadaptation}
|
||||
|
||||
\func{bool}{DoLayoutAdapation}{\void}
|
||||
|
||||
Performs layout adaptation, usually if the dialog is too large to fit on the display.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
\membersection{wxDialog::DoOK}\label{wxdialogdook}
|
||||
|
||||
@@ -251,6 +273,14 @@ A command event for the identifier returned by GetAffirmativeId is sent by
|
||||
default. You can override this function. If the function returns false, wxWidgets
|
||||
will call Close() for the dialog.
|
||||
|
||||
\membersection{wxDialog::EnableLayoutAdaptation}\label{wxdialogenablelayoutadaptation}
|
||||
|
||||
\func{static void}{EnableLayoutAdaptation}{\param{bool}{ enable}}
|
||||
|
||||
A static function enabling or disabling layout adaptation for all dialogs.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::EndModal}\label{wxdialogendmodal}
|
||||
|
||||
@@ -281,6 +311,13 @@ dialog.
|
||||
|
||||
\helpref{wxDialog::SetAffirmativeId}{wxdialogsetaffirmativeid}
|
||||
|
||||
\membersection{wxDialog::GetContentWindow}\label{wxdialoggetcontentwindow}
|
||||
|
||||
\constfunc{wxWindow*}{GetContentWindow}{\void}
|
||||
|
||||
Override this to return a window containing the main content of the dialog. This is
|
||||
particularly useful when the dialog implements pages, such as wxPropertySheetDialog,
|
||||
and allows the \helpref{layout adaptation code}{wxdialogoverview} to know that only the pages need to be made scrollable.
|
||||
|
||||
\membersection{wxDialog::GetEscapeId}\label{wxdialoggetescapeid}
|
||||
|
||||
@@ -294,6 +331,50 @@ button to.
|
||||
\helpref{wxDialog::SetEscapeId}{wxdialogsetescapeid}
|
||||
|
||||
|
||||
\membersection{wxDialog::GetLayoutAdaptationDone}\label{wxdialoggetlayoutadaptationdone}
|
||||
|
||||
\constfunc{bool}{GetLayoutAdaptationDone}{\void}
|
||||
|
||||
Returns \true if the dialog has been adapted, usually by making it scrollable to work with a small display.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::GetLayoutAdaptationLevel}\label{wxdialoggetlayoutadaptationlevel}
|
||||
|
||||
\func{int}{GetLayoutAdaptationLevel}{\void}
|
||||
|
||||
Gets a value representing the aggressiveness of search for buttons and sizers to be in the non-scrolling part of a layout-adapted dialog.
|
||||
Zero switches off adaptation, and 3 allows search for standard buttons anywhere in the dialog.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::GetLayoutAdaptationMode}\label{wxdialoggetlayoutadaptationmode}
|
||||
|
||||
\constfunc{wxDialogLayoutAdaptationMode}{GetLayoutAdaptationMode}{\void}
|
||||
|
||||
Gets the adaptation mode, overriding the global adaptation flag.
|
||||
|
||||
See also \helpref{SetLayoutAdaptationMode}{wxdialogsetlayoutadaptationmode} and \helpref{Automatic scrolling dialogs}{autoscrollingdialogs}.
|
||||
|
||||
\membersection{wxDialog::GetLayoutAdapter}\label{wxdialoggetlayoutadapter}
|
||||
|
||||
\func{static wxDialogLayoutAdapter*}{GetLayoutAdapter}{\void}
|
||||
|
||||
A static function getting the current layout adapter object.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::GetMainButtonIds}\label{wxdialoggetmainbuttonids}
|
||||
|
||||
\func{wxArrayInt\&}{GetMainButtonIds}{\void}
|
||||
|
||||
Returns an array of identifiers to be regarded as the main buttons for the non-scrolling area of a dialog.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
\membersection{wxDialog::GetReturnCode}\label{wxdialoggetreturncode}
|
||||
|
||||
\func{int}{GetReturnCode}{\void}
|
||||
@@ -352,6 +433,24 @@ Returns true if the dialog box is iconized. Windows only.
|
||||
Always returns false under Windows since dialogs cannot be iconized.
|
||||
|
||||
|
||||
\membersection{wxDialog::IsLayoutAdaptationEnabled}\label{wxdialogislayoutadaptationenabled}
|
||||
|
||||
\func{static bool}{IsLayoutAdaptationEnabled}{\void}
|
||||
|
||||
A static function returning \true if layout adaptation is enabled for all dialogs.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::IsMainButton}\label{wxdialogismainbutton}
|
||||
|
||||
\constfunc{bool}{IsMainButton}{\param{wxWindowID\& }{id}}
|
||||
|
||||
Returns \true if {\it id} is in the array of identifiers to be regarded as the main buttons for the non-scrolling area of a dialog.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::IsModal}\label{wxdialogismodal}
|
||||
|
||||
\constfunc{bool}{IsModal}{\void}
|
||||
@@ -448,6 +547,53 @@ Sets the icons for this dialog.
|
||||
See also \helpref{wxIconBundle}{wxiconbundle}.
|
||||
|
||||
|
||||
\membersection{wxDialog::SetLayoutAdaptationDone}\label{wxdialogsetlayoutadaptationdone}
|
||||
|
||||
\func{void}{SetLayoutAdaptationDone}{\param{bool }{done}}
|
||||
|
||||
Marks the dialog as having been adapted, usually by making it scrollable to work with a small display.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::SetLayoutAdaptationLevel}\label{wxdialogsetlayoutadaptationlevel}
|
||||
|
||||
\func{void}{SetLayoutAdaptationLevel}{\param{int }{level}}
|
||||
|
||||
Sets the aggressiveness of search for buttons and sizers to be in the non-scrolling part of a layout-adapted dialog.
|
||||
Zero switches off adaptation, and 3 allows search for standard buttons anywhere in the dialog.
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::SetLayoutAdaptationMode}\label{wxdialogsetlayoutadaptationmode}
|
||||
|
||||
\func{void}{SetLayoutAdaptationMode}{\param{wxDialogLayoutAdaptationMode }{mode}}
|
||||
|
||||
Sets the adaptation mode, overriding the global adaptation flag. {\it mode} may be one of the following values:
|
||||
|
||||
\begin{verbatim}
|
||||
enum wxDialogLayoutAdaptationMode
|
||||
{
|
||||
wxDIALOG_ADAPTATION_MODE_DEFAULT = 0, // use global adaptation enabled status
|
||||
wxDIALOG_ADAPTATION_MODE_ENABLED = 1, // enable this dialog overriding global status
|
||||
wxDIALOG_ADAPTATION_MODE_DISABLED = 2 // disable this dialog overriding global status
|
||||
};
|
||||
\end{verbatim}
|
||||
|
||||
See also \helpref{Automatic scrolling dialogs}{autoscrollingdialogs} for more on layout adaptation.
|
||||
|
||||
|
||||
\membersection{wxDialog::SetLayoutAdapter}\label{wxdialogsetlayoutadapter}
|
||||
|
||||
\func{static wxDialogLayoutAdapter*}{SetLayoutAdapter}{\param{wxDialogLayoutAdapter*}{ adapter}}
|
||||
|
||||
A static function for setting the current layout adapter object, returning the old adapter. If you call this, you should
|
||||
delete the old adapter object.
|
||||
|
||||
See also \helpref{wxDialogLayoutAdapter}{wxdialoglayoutadapter} and \helpref{Automatic scrolling dialogs}{autoscrollingdialogs}.
|
||||
|
||||
|
||||
\membersection{wxDialog::SetModal}\label{wxdialogsetmodal}
|
||||
|
||||
\func{void}{SetModal}{\param{bool}{ flag}}
|
||||
|
48
docs/latex/wx/dialoglayoutadapter.tex
Normal file
48
docs/latex/wx/dialoglayoutadapter.tex
Normal file
@@ -0,0 +1,48 @@
|
||||
\section{\class{wxDialogLayoutAdapter}}\label{wxdialoglayoutadapter}
|
||||
|
||||
This abstract class is the base for classes that help wxWidgets peform run-time layout adaptation of dialogs. Principally,
|
||||
this is to cater for small displays by making part of the dialog scroll, but the application developer may find other
|
||||
uses for layout adaption.
|
||||
|
||||
By default, there is one instance of wxStandardDialogLayoutAdapter
|
||||
which can perform adaptation for most custom dialogs and dialogs with book controls
|
||||
such as \helpref{wxPropertySheetDialog}{wxpropertysheetdialog}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/dialog.h>
|
||||
|
||||
\wxheading{Library}
|
||||
|
||||
\helpref{wxCore}{librarieslist}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Automatic scrolling dialogs}{autoscrollingdialogs}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxDialogLayoutAdapter::wxDialogLayoutAdapter}\label{wxdialoglayoutadapterctor}
|
||||
|
||||
\func{}{wxDialogLayoutAdapter}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\membersection{wxDialogLayoutAdapter::CanDoLayoutAdaptation}\label{wxdialoglayoutadaptercandolayoutadaptation}
|
||||
|
||||
\func{bool}{CanDoLayoutAdaptation}{\param{wxDialog*}{ dialog}}
|
||||
|
||||
Override this to returns \true if adaptation can and should be done.
|
||||
|
||||
\membersection{wxDialogLayoutAdapter::DoLayoutAdaptation}\label{wxdialoglayoutadapterdolayoutadaptation}
|
||||
|
||||
\func{bool}{DoLayoutAdaptation}{\param{wxDialog*}{ dialog}}
|
||||
|
||||
Override this to perform layout adaptation, such as making parts of the dialog scroll and resizing the dialog to fit the display.
|
||||
Normally this function will be called just before the dialog is shown.
|
||||
|
@@ -36,6 +36,11 @@ before calling Create.
|
||||
The dialogs sample shows this class being used with notebook and toolbook controllers (for
|
||||
Windows-style and Mac-style settings dialogs).
|
||||
|
||||
To make pages of the dialog scroll when the display is too small to fit the whole dialog, you can switch
|
||||
layout adaptation on globally with \helpref{wxDialog::EnableLayoutAdaptation}{wxdialogenablelayoutadaptation} or
|
||||
per dialog with \helpref{wxDialog::SetLayoutAdaptationMode}{wxdialogsetlayoutadaptationmode}. For more
|
||||
about layout adaptation, see \helpref{Automatic scrolling dialogs}{autoscrollingdialogs}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDialog}{wxdialog}\\
|
||||
|
@@ -1,6 +1,6 @@
|
||||
\section{wxDialog overview}\label{wxdialogoverview}
|
||||
|
||||
Classes: \helpref{wxDialog}{wxdialog}
|
||||
Classes: \helpref{wxDialog}{wxdialog}, \helpref{wxDialogLayoutAdapter}{wxdialoglayoutadapter}
|
||||
|
||||
A dialog box is similar to a panel, in that it is a window which can
|
||||
be used for placing controls, with the following exceptions:
|
||||
@@ -13,19 +13,89 @@ be used for placing controls, with the following exceptions:
|
||||
until the dialog box is dismissed.
|
||||
\end{enumerate}
|
||||
|
||||
Under Windows 3, modal dialogs have to be emulated using
|
||||
modeless dialogs and a message loop. This is because Windows 3 expects
|
||||
the contents of a modal dialog to be loaded from a resource file or
|
||||
created on receipt of a dialog initialization message. This is too
|
||||
restrictive for wxWidgets, where any window may be created and displayed
|
||||
before its contents are created.
|
||||
|
||||
For a set of dialog convenience functions, including file selection, see
|
||||
\rtfsp\helpref{Dialog functions}{dialogfunctions}.
|
||||
|
||||
See also \helpref{wxPanel}{wxpanel} and \helpref{wxWindow}{wxwindow} for inherited
|
||||
member functions. Validation of data in controls is covered
|
||||
in \helpref{Validator overview}{validatoroverview}.
|
||||
See also \helpref{wxTopLevelWindow}{wxtoplevelwindow} and \helpref{wxWindow}{wxwindow} for inherited
|
||||
member functions. Validation of data in controls is covered in \helpref{Validator overview}{validatoroverview}.
|
||||
|
||||
\subsection{Automatic scrolling dialogs}\label{autoscrollingdialogs}
|
||||
|
||||
As an ever greater variety of mobile hardware comes to market, it becomes more imperative for wxWidgets applications to adapt
|
||||
to these platforms without putting too much burden on the programmer. One area where wxWidgets can help is in adapting
|
||||
dialogs for the lower resolution screens that inevitably accompany a smaller form factor. wxDialog therefore supplies
|
||||
a global \helpref{wxDialogLayoutAdapter}{wxdialoglayoutadapter} class that implements automatic scrolling adaptation for most sizer-based custom dialogs.
|
||||
Many applications should therefore be able to adapt to small displays with little or no work, as far as dialogs are concerned.
|
||||
|
||||
By default this adaptation is off. To switch scrolling adaptation on globally in your application, call the static function\rtfsp
|
||||
\helpref{wxDialog::EnableLayoutAdaptation}{wxdialogenablelayoutadaptation} passing \true. You can also adjust adaptation on a per-dialog basis by calling\rtfsp
|
||||
\helpref{wxDialog::SetLayoutAdaptationMode}{wxdialogsetlayoutadaptationmode} with one of {\tt wxDIALOG\_ADAPTATION\_MODE\_DEFAULT} (use the global setting), {\tt wxDIALOG\_ADAPTATION\_MODE\_ENABLED} or {\tt wxDIALOG\_ADAPTATION\_MODE\_DISABLED}.
|
||||
The last two modes override the global adaptation setting.
|
||||
|
||||
With adaptation enabled, if the display size is too small for the dialog, wxWidgets (or rather the
|
||||
standard adapter class wxStandardDialogLayoutAdapter) will
|
||||
make part of the dialog scrolling, leaving standard buttons in a non-scrolling part at the bottom of the dialog.
|
||||
|
||||
This is done as follows, in \helpref{wxDialogLayoutAdapter::DoLayoutAdaptation}{wxdialoglayoutadapterdolayoutadaptation} called from within wxDialog::Show or wxDialog::ShowModal:
|
||||
|
||||
\begin{enumerate}
|
||||
\item If \helpref{wxDialog::GetContentWindow}{wxdialoggetcontentwindow} returns a window derived from wxBookCtrlBase, the pages are made scrollable and
|
||||
no other adaptation is done.
|
||||
\item wxWidgets looks for a \helpref{wxStdDialogButtonSizer}{wxstddialogbuttonsizer} and uses it for the non-scrolling part.
|
||||
\item If that search failed, wxWidgets looks for a horizontal \helpref{wxBoxSizer}{wxboxsizer} with one or more
|
||||
standard buttons, with identifiers such as {\tt wxID\_OK} and {\tt wxID\_CANCEL}.
|
||||
\item If that search failed too, wxWidgets finds 'loose' standard buttons (in any kind of sizer) and adds them to a \helpref{wxStdDialogButtonSizer}{wxstddialogbuttonsizer}.
|
||||
If no standard buttons were found, the whole dialog content will scroll.
|
||||
\item All the children apart from standard buttons are reparented onto a new \helpref{wxScrolledWindow}{wxscrolledwindow} object,
|
||||
using the old top-level sizer for the scrolled window and creating a new top-level sizer to lay out the scrolled window and
|
||||
standard button sizer.
|
||||
\end{enumerate}
|
||||
|
||||
\wxheading{Customising scrolling adaptation}
|
||||
|
||||
In addition to switching adaptation on and off globally and per dialog, you can choose how aggressively wxWidgets will
|
||||
search for standard buttons by setting \helpref{wxDialog::SetLayoutAdaptationLevel}{wxdialogsetlayoutadaptationlevel}. By default,
|
||||
all the steps described above will be performed but by setting the level to 1, for example, you can choose to only look for wxStdDialogButtonSizer.
|
||||
|
||||
You can use \helpref{wxDialog::AddMainButtonId}{wxdialogaddmainbuttonid} to add identifiers for buttons that should also be
|
||||
treated as standard buttons for the non-scrolling area.
|
||||
|
||||
You can derive your own class from \helpref{wxDialogLayoutAdapter}{wxdialoglayoutadapter} or wxStandardDialogLayoutAdapter and call\rtfsp
|
||||
\helpref{wxDialog::SetLayoutAdapter}{wxdialogsetlayoutadapter}, deleting the old object that this function returns. Override
|
||||
the functions CanDoLayoutAdaptation and DoLayoutAdaptation to test for adaptation applicability and perform the adaptation.
|
||||
|
||||
You can also override \helpref{wxDialog::CanDoLayoutAdaptation}{wxdialogcandolayoutadaptation} and \helpref{wxDialog::DoLayoutAdaptation}{wxdialogdolayoutadaptation} in a class derived from wxDialog.
|
||||
|
||||
\wxheading{Situations where automatic scrolling adaptation may fail}
|
||||
|
||||
Because adaptation rearranges your sizer and window hierarchy, it is not fool-proof, and may fail in the following situations.
|
||||
|
||||
\begin{itemize}
|
||||
\item The dialog doesn't use sizers.
|
||||
\item The dialog implementation makes assumptions about the window hierarchy, for example getting the parent of a control and casting to the dialog class.
|
||||
\item The dialog does custom painting and/or event handling not handled by the scrolled window. If this problem can be solved globally,
|
||||
you can derive a new adapter class from wxStandardDialogLayoutAdapter and override its CreateScrolledWindow function to return an instance of your own class.
|
||||
\item The dialog has unusual layout, for example a vertical sizer containing a mixture of standard buttons and other controls.
|
||||
\item The dialog makes assumptions about the sizer hierarchy, for example to show or hide children of the top-level sizer. However, the original sizer hierarchy will still hold
|
||||
until Show or ShowModal is called.
|
||||
\end{itemize}
|
||||
|
||||
You can help make sure that your dialogs will continue to function after adaptation by:
|
||||
|
||||
\begin{itemize}
|
||||
\item avoiding the above situations and assumptions;
|
||||
\item using \helpref{wxStdDialogButtonSizer}{wxstddialogbuttonsizer};
|
||||
\item only making assumptions about hierarchy immediately after the dialog is created;
|
||||
\item using an intermediate sizer under the main sizer, a false top-level sizer that can be relied on to exist
|
||||
for the purposes of manipulating child sizers and windows;
|
||||
\item overriding \helpref{wxDialog::GetContentWindow}{wxdialoggetcontentwindow} to return a book control if your dialog implements pages: wxWidgets will then only make the pages
|
||||
scrollable.
|
||||
\end{itemize}
|
||||
|
||||
\wxheading{wxPropertySheetDialog and wxWizard}
|
||||
|
||||
Adaptation for wxPropertySheetDialog is always done by simply making the pages scrollable, since \helpref{wxDialog::GetContentWindow}{wxdialoggetcontentwindow} returns
|
||||
the dialog's book control and this is handled by the standard layout adapter.
|
||||
|
||||
wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather than the global adapter: again, only the wizard pages are made scrollable.
|
||||
|
||||
|
@@ -26,6 +26,16 @@ using either the non-default constructor or a default one followed by call to th
|
||||
want the wizard to show and call \helpref{RunWizard}{wxwizardrunwizard}.
|
||||
Finally, don't forget to call {\tt wizard->Destroy()}, otherwise your application will hang on exit due to an undestroyed window.
|
||||
|
||||
You can supply a bitmap to display on the left of the wizard, either for all pages
|
||||
or for individual pages. If you need to have the bitmap resize to the height of the wizard,
|
||||
call \helpref{wxWizard::SetBitmapPlacement}{wxwizardsetbitmapplacement} and if necessary,\rtfsp
|
||||
\helpref{wxWizard::SetBitmapBackgroundColour}{wxwizardsetbitmapbackgroundcolour} and \helpref{wxWizard::SetMinimumBitmapWidth}{wxwizardsetminimumbitmapheight}.
|
||||
|
||||
To make wizard pages scroll when the display is too small to fit the whole dialog, you can switch
|
||||
layout adaptation on globally with \helpref{wxDialog::EnableLayoutAdaptation}{wxdialogenablelayoutadaptation} or
|
||||
per dialog with \helpref{wxDialog::SetLayoutAdaptationMode}{wxdialogsetlayoutadaptationmode}. For more
|
||||
about layout adaptation, see \helpref{Automatic scrolling dialogs}{autoscrollingdialogs}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDialog}{wxdialog}\\
|
||||
@@ -167,6 +177,28 @@ from a single one and you should call {\it Fit} separately for the others.
|
||||
|
||||
Returns the bitmap used for the wizard.
|
||||
|
||||
|
||||
\membersection{wxWizard::GetBitmapBackgroundColour}\label{wxwizardgetbitmapbackgroundcolour}
|
||||
|
||||
\constfunc{const wxColour\&}{GetBitmapBackgroundColour}{\void}
|
||||
|
||||
Returns the colour that should be used to fill the area not taken up by the wizard or page bitmap,
|
||||
if a non-zero bitmap placement flag has been set.
|
||||
|
||||
See also \helpref{wxWizard::SetBitmapPlacement}{wxwizardsetbitmapplacement}.
|
||||
|
||||
|
||||
|
||||
\membersection{wxWizard::GetBitmapPlacement}\label{wxwizardgetbitmapplacement}
|
||||
|
||||
\func{int}{GetBitmapPlacement}{\void}
|
||||
|
||||
Returns the flags indicating how the wizard or page bitmap should be expanded and positioned to fit the
|
||||
page height. By default, placement is 0 (no expansion is done).
|
||||
|
||||
See also \helpref{wxWizard::SetBitmapPlacement}{wxwizardsetbitmapplacement} for the possible values.
|
||||
|
||||
|
||||
\membersection{wxWizard::GetCurrentPage}\label{wxwizardgetcurrentpage}
|
||||
|
||||
\constfunc{wxWizardPage*}{GetCurrentPage}{\void}
|
||||
@@ -175,6 +207,16 @@ Get the current page while the wizard is running. {\tt NULL} is returned if
|
||||
\helpref{RunWizard()}{wxwizardrunwizard} is not being executed now.
|
||||
|
||||
|
||||
\membersection{wxWizard::GetMinimumBitmapWidth}\label{wxwizardgetminimumbitmapwidth}
|
||||
|
||||
\constfunc{int}{GetMinimumBitmapWidth}{\void}
|
||||
|
||||
Returns the minimum width for the bitmap that will be constructed to contain the actual wizard or page bitmap
|
||||
if a non-zero bitmap placement flag has been set.
|
||||
|
||||
See also \helpref{wxWizard::SetBitmapPlacement}{wxwizardsetbitmapplacement}.
|
||||
|
||||
|
||||
\membersection{wxWizard::GetPageAreaSizer}\label{wxwizardgetpageareasizer}
|
||||
|
||||
\constfunc{virtual wxSizer*}{GetPageAreaSizer}{\void}
|
||||
@@ -256,6 +298,50 @@ can not be {\tt NULL}.
|
||||
|
||||
Sets the bitmap used for the wizard.
|
||||
|
||||
|
||||
\membersection{wxWizard::SetBitmapBackgroundColour}\label{wxwizardsetbitmapbackgroundcolour}
|
||||
|
||||
\func{void}{SetBitmapBackgroundColour}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Sets the colour that should be used to fill the area not taken up by the wizard or page bitmap,
|
||||
if a non-zero bitmap placement flag has been set.
|
||||
|
||||
See also \helpref{wxWizard::SetBitmapPlacement}{wxwizardsetbitmapplacement}.
|
||||
|
||||
|
||||
\membersection{wxWizard::SetBitmapPlacement}\label{wxwizardsetbitmapplacement}
|
||||
|
||||
\func{void}{SetBitmapPlacement}{\param{int}{ placement}}
|
||||
|
||||
Sets the flags indicating how the wizard or page bitmap should be expanded and positioned to fit the
|
||||
page height. By default, placement is 0 (no expansion is done). {\it placement} is a bitlist with the
|
||||
following possible values:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxWIZARD\_VALIGN\_TOP}}{Aligns the bitmap at the top.}
|
||||
\twocolitem{\windowstyle{wxWIZARD\_VALIGN\_CENTRE}}{Centres the bitmap vertically.}
|
||||
\twocolitem{\windowstyle{wxWIZARD\_VALIGN\_BOTTOM}}{Aligns the bitmap at the bottom.}
|
||||
\twocolitem{\windowstyle{wxWIZARD\_HALIGN\_LEFT}}{Left-aligns the bitmap.}
|
||||
\twocolitem{\windowstyle{wxWIZARD\_HALIGN\_CENTRE}}{Centres the bitmap horizontally.}
|
||||
\twocolitem{\windowstyle{wxWIZARD\_HALIGN\_RIGHT}}{Right-aligns the bitmap.}
|
||||
\twocolitem{\windowstyle{wxWIZARD\_TILE}}{}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{wxWizard::SetMinimumBitmapWidth}{wxwizardsetminimumbitmapwidth}.
|
||||
|
||||
|
||||
\membersection{wxWizard::SetMinimumBitmapWidth}\label{wxwizardsetminimumbitmapwidth}
|
||||
|
||||
\func{void}{SetMinimumBitmapWidth}{\param{int}{ width}}
|
||||
|
||||
Sets the minimum width for the bitmap that will be constructed to contain the actual wizard or page bitmap
|
||||
if a non-zero bitmap placement flag has been set. If this is not set when using bitmap placement, the initial
|
||||
layout may be incorrect.
|
||||
|
||||
See also \helpref{wxWizard::SetBitmapPlacement}{wxwizardsetbitmapplacement}.
|
||||
|
||||
|
||||
|
||||
\membersection{wxWizard::SetPageSize}\label{wxwizardsetpagesize}
|
||||
|
||||
\func{void}{SetPageSize}{\param{const wxSize\& }{sizePage}}
|
||||
|
Reference in New Issue
Block a user