X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..12df0ad59ff15b536ae0ab42ded22876f2b90356:/interface/propdlg.h diff --git a/interface/propdlg.h b/interface/propdlg.h index b4e652d0f3..77cd2f43ed 100644 --- a/interface/propdlg.h +++ b/interface/propdlg.h @@ -1,63 +1,108 @@ ///////////////////////////////////////////////////////////////////////////// // Name: propdlg.h -// Purpose: documentation for wxPropertySheetDialog class +// Purpose: interface of wxPropertySheetDialog // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// + +/** + Values used by wxPropertySheetDialog::SetSheetStyle +*/ +enum wxPropertySheetDialogFlags +{ + /** + Uses the default look and feel for the controller window, + normally a notebook except on Smartphone where a choice control is used. + */ + wxPROPSHEET_DEFAULT = 0x0001, + + /** + Uses a notebook for the controller window. + */ + wxPROPSHEET_NOTEBOOK = 0x0002, + + /** + Uses a toolbook for the controller window. + */ + wxPROPSHEET_TOOLBOOK = 0x0004, + + /** + Uses a choicebook for the controller window. + */ + wxPROPSHEET_CHOICEBOOK = 0x0008, + + /** + Uses a listbook for the controller window. + */ + wxPROPSHEET_LISTBOOK = 0x0010, + + /** + Uses a button toolbox for the controller window. + */ + wxPROPSHEET_BUTTONTOOLBOOK = 0x0020, + + /** + Uses a treebook for the controller window. + */ + wxPROPSHEET_TREEBOOK = 0x0040, + + /** + Shrinks the dialog window to fit the currently selected page + (common behaviour for property sheets on Mac OS X). + */ + wxPROPSHEET_SHRINKTOFIT = 0x0100, +}; + + /** @class wxPropertySheetDialog @wxheader{propdlg.h} - + This class represents a property sheet dialog: a tabbed dialog for showing settings. 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 wxPropertySheetDialog::Create from your own - Create function. Then call wxPropertySheetDialog::CreateButtons, and create - pages, adding them to the book control. - Finally call wxPropertySheetDialog::LayoutDialog. - + + 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(). + For example: - + @code bool MyPropertySheetDialog::Create(...) { if (!wxPropertySheetDialog::Create(...)) return @false; - + CreateButtons(wxOK|wxCANCEL|wxHELP); - + // Add page wxPanel* panel = new wxPanel(GetBookCtrl(), ...); - GetBookCtrl()-AddPage(panel, wxT("General")); - + GetBookCtrl()->AddPage(panel, wxT("General")); + LayoutDialog(); return @true; } @endcode - - If necessary, override CreateBookCtrl and AddBookCtrl to create and add a - different - kind of book control. You would then need to use two-step construction for the - dialog. - Or, change the style of book control by calling - wxPropertySheetDialog::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). - + + 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 @ref page_samples_dialogs 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 @ref overview_autoscrollingdialogs "Automatic - scrolling dialogs". - + whole dialog, you can switch layout adaptation on globally with + wxDialog::EnableLayoutAdaptation() or per dialog with + wxDialog::SetLayoutAdaptationMode(). + + For more about layout adaptation, see @ref overview_dialog_autoscrolling. + @library{wxadv} @category{managedwnd} */ @@ -92,98 +137,64 @@ public: /** 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. + 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 wxBookCtrlBase* CreateBookCtrl(); /** - 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. + Call this to create the buttons for the dialog. + This calls wxDialog::CreateButtonSizer(), and the flags are the same. + + @note On PocketPC, no buttons are created. */ - void CreateButtons(int flags=wxOK|wxCANCEL); + void CreateButtons(int flags = wxOK|wxCANCEL); /** Returns the book control that will contain your settings pages. */ - wxBookCtrlBase* GetBookCtrl(); + wxBookCtrlBase* GetBookCtrl() const; /** Returns the inner sizer that contains the book control and button sizer. */ - wxSizer* GetInnerSizer(); + wxSizer* GetInnerSizer() const; /** - Returns the sheet style. See SetSheetStyle() for - permissable values. + Returns the sheet style. + + See SetSheetStyle() for allowed values. */ - long GetSheetStyle(); + long GetSheetStyle() const; /** - 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. + Call this to lay out the dialog. + + @note 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 LayoutDialog(int centreFlags=wxBOTH); + void LayoutDialog(int centreFlags = wxBOTH); /** - Sets the book control used for the dialog. You will normally not need to use - this. + Sets the book control used for the dialog. + + You will normally not need to use this. */ void SetBookCtrl(wxBookCtrlBase* bookCtrl); /** - Sets the inner sizer that contains the book control and button sizer. You will - normally not need to use this. + Sets the inner sizer that contains the book control and button sizer. + + You will normally not need to use this. */ void SetInnerSizer(wxSizer* sizer); /** You can customize the look and feel of the dialog by setting the sheet style. - It is - a bit list of the following values: - - - wxPROPSHEET_DEFAULT - - - Uses the default look and feel for the controller window, - normally a notebook except on Smartphone where a choice control is used. - - wxPROPSHEET_NOTEBOOK - - - Uses a notebook for the controller window. - - wxPROPSHEET_TOOLBOOK - - - Uses a toolbook for the controller window. - - wxPROPSHEET_CHOICEBOOK - - - Uses a choicebook for the controller window. - - wxPROPSHEET_LISTBOOK - - - Uses a listbook for the controller window. - - wxPROPSHEET_TREEBOOK - - - Uses a treebook for the controller window. - - wxPROPSHEET_SHRINKTOFIT - - - Shrinks the dialog window to fit the currently selected page (common behaviour - for - property sheets on Mac OS X). + It is a bit list of the ::wxPropertySheetDialogFlags values. */ void SetSheetStyle(long style); }; +