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