]> git.saurik.com Git - wxWidgets.git/blob - src/common/preferencescmn.cpp
Fix wxTextEntryDialog::GetValue() when using SetTextValidator().
[wxWidgets.git] / src / common / preferencescmn.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/preferencescmn.cpp
3 // Purpose: wxPreferencesEditor implementation common to all platforms.
4 // Author: Vaclav Slavik
5 // Created: 2013-02-19
6 // RCS-ID: $Id$
7 // Copyright: (c) 2013 Vaclav Slavik <vslavik@fastmail.fm>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 // for compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #include "wx/private/preferences.h"
27 #include "wx/intl.h"
28
29 // ============================================================================
30 // implementation
31 // ============================================================================
32
33 wxString wxStockPreferencesPage::GetName() const
34 {
35 switch ( m_kind )
36 {
37 case Kind_General:
38 return _("General");
39 case Kind_Advanced:
40 return _("Advanced");
41 }
42 return wxString(); // silence compiler warning
43 }
44
45 wxPreferencesEditor::wxPreferencesEditor()
46 : m_impl(wxPreferencesEditorImpl::Create())
47 {
48 }
49
50 wxPreferencesEditor::~wxPreferencesEditor()
51 {
52 delete m_impl;
53 }
54
55 void wxPreferencesEditor::AddPage(wxPreferencesPage* page)
56 {
57 wxCHECK_RET( page, "can't set NULL page" );
58 m_impl->AddPage(page);
59 }
60
61 void wxPreferencesEditor::Show(wxWindow* parent)
62 {
63 m_impl->Show(parent);
64 }
65
66 void wxPreferencesEditor::Dismiss()
67 {
68 m_impl->Dismiss();
69 }