Version: 2.9.4
Public Member Functions
wxPropertySheetDialog Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/propdlg.h>

Inheritance diagram for wxPropertySheetDialog:

Detailed Description

このクラスはプロパティシートダイアログ (設定を表示するためのタブ付きダイアログ) を表しています。

It is optimized to show flat tabs on PocketPC devices, and can be customized to use different controllers instead of the default notebook style.

To use this class, call Create() from your own Create function. Then call CreateButtons(), and create pages, adding them to the book control. Finally call LayoutDialog().

以下に例を示します:

    bool MyPropertySheetDialog::Create(...)
    {
        if (!wxPropertySheetDialog::Create(...))
            return false;

        CreateButtons(wxOK|wxCANCEL|wxHELP);

        // Add page
        wxPanel* panel = new wxPanel(GetBookCtrl(), ...);
        GetBookCtrl()->AddPage(panel, "General");

        LayoutDialog();
        return true;
    }

If necessary, override CreateBookCtrl() and AddBookCtrl() to create and add a different kind of book control. You will then need to use two-step construction for the dialog or change the style of the book control by calling SetSheetStyle() 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 wxDialog::EnableLayoutAdaptation() or per dialog with wxDialog::SetLayoutAdaptationMode().

For more about layout adaptation, see Automatic scrolling dialogs.

Library:  wxAdvanced
Category:  Managed Windows

Public Member Functions

 wxPropertySheetDialog (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=wxDialogNameStr)
 Constructor.
virtual void AddBookCtrl (wxSizer *sizer)
 Override this if you wish to add the book control in a way different from the standard way (for example, using different spacing).
bool Create (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=wxDialogNameStr)
 Call this from your own Create function, before adding buttons and pages.
virtual wxBookCtrlBaseCreateBookCtrl ()
 Override this if you wish to create a different kind of book control; by default, the value passed to SetSheetStyle() is used to determine the control.
virtual void CreateButtons (int flags=wxOK|wxCANCEL)
 Call this to create the buttons for the dialog.
wxBookCtrlBaseGetBookCtrl () const
 Returns the book control that will contain your settings pages.
wxSizerGetInnerSizer () const
 Returns the inner sizer that contains the book control and button sizer.
long GetSheetStyle () const
 Returns the sheet style.
virtual void LayoutDialog (int centreFlags=wxBOTH)
 Call this to lay out the dialog.
void SetBookCtrl (wxBookCtrlBase *bookCtrl)
 Sets the book control used for the dialog.
void SetSheetStyle (long style)
 You can customize the look and feel of the dialog by setting the sheet style.

List of all members.


Constructor & Destructor Documentation

wxPropertySheetDialog::wxPropertySheetDialog ( wxWindow parent,
wxWindowID  id,
const wxString title,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxDEFAULT_DIALOG_STYLE,
const wxString name = wxDialogNameStr 
)

Constructor.


Member Function Documentation

virtual void wxPropertySheetDialog::AddBookCtrl ( wxSizer sizer) [virtual]

Override this if you wish to add the book control in a way different from the standard way (for example, using different spacing).

bool wxPropertySheetDialog::Create ( wxWindow parent,
wxWindowID  id,
const wxString title,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxDEFAULT_DIALOG_STYLE,
const wxString name = wxDialogNameStr 
)

Call this from your own Create function, before adding buttons and pages.

Reimplemented from wxDialog.

virtual wxBookCtrlBase* wxPropertySheetDialog::CreateBookCtrl ( ) [virtual]

Override this if you wish to create a different kind of book control; by default, the value passed to SetSheetStyle() is used to determine the control.

The default behaviour is to create a notebook except on Smartphone, where a choicebook is used.

virtual void wxPropertySheetDialog::CreateButtons ( int  flags = wxOK|wxCANCEL) [virtual]

Call this to create the buttons for the dialog.

This calls wxDialog::CreateButtonSizer(), and the flags are the same.

注:
On PocketPC, no buttons are created.
wxBookCtrlBase* wxPropertySheetDialog::GetBookCtrl ( ) const

Returns the book control that will contain your settings pages.

wxSizer* wxPropertySheetDialog::GetInnerSizer ( ) const

Returns the inner sizer that contains the book control and button sizer.

long wxPropertySheetDialog::GetSheetStyle ( ) const

Returns the sheet style.

See SetSheetStyle() for allowed values.

virtual void wxPropertySheetDialog::LayoutDialog ( int  centreFlags = wxBOTH) [virtual]

Call this to lay out the dialog.

注:
On PocketPC, this does nothing, since the dialog will be shown full-screen, and the layout will be done when the dialog receives a size event.
void wxPropertySheetDialog::SetBookCtrl ( wxBookCtrlBase bookCtrl)

Sets the book control used for the dialog.

You will normally not need to use this.

void wxPropertySheetDialog::SetSheetStyle ( long  style)

You can customize the look and feel of the dialog by setting the sheet style.

It is a bit list of the wxPropertySheetDialogFlags values.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines