Version: 3.1.6
wxStockPreferencesPage Class Reference

#include <wx/preferences.h>

+ Inheritance diagram for wxStockPreferencesPage:

Detailed Description

Specialization of wxPreferencesPage useful for certain commonly used preferences page.

On macOS, preferences pages named "General" and "Advanced" are commonly used in apps and the OS provides stock icons for them that should be used. Instead of reimplementing this behaviour yourself, you can inherit from wxStockPreferencesPage and get correct title and icon.

Notice that this class only implements GetName() and GetLargeIcon(), you still have to provide the rest of wxPreferencesPage implementation.

Library:  wxCore

Public Types

enum  Kind {
 Kinds of stock pages. More...

Public Member Functions

 wxStockPreferencesPage (Kind kind)
 Constructor. More...
Kind GetKind () const
 Returns the page's kind. More...
virtual wxString GetName () const
 Reimplemented to return suitable name for the page's kind. More...
virtual wxBitmap GetLargeIcon () const
 Reimplemented to return stock icon on macOS. More...
- Public Member Functions inherited from wxPreferencesPage
 wxPreferencesPage ()
 Constructor. More...
virtual ~wxPreferencesPage ()
 Destructor. More...
virtual wxWindowCreateWindow (wxWindow *parent)=0
 Create a window for this page. More...

Member Enumeration Documentation

Kinds of stock pages.


The "General" page.


The "Advanced" page.

Constructor & Destructor Documentation

wxStockPreferencesPage::wxStockPreferencesPage ( Kind  kind)


Member Function Documentation

Kind wxStockPreferencesPage::GetKind ( ) const

Returns the page's kind.

virtual wxBitmap wxStockPreferencesPage::GetLargeIcon ( ) const

Reimplemented to return stock icon on macOS.

Implements wxPreferencesPage.

virtual wxString wxStockPreferencesPage::GetName ( ) const

Reimplemented to return suitable name for the page's kind.

Implements wxPreferencesPage.