]> git.saurik.com Git - wxWidgets.git/blame - src/common/preferencescmn.cpp
No changes, just change data structures used by mouse capture code.
[wxWidgets.git] / src / common / preferencescmn.cpp
CommitLineData
2aab96f5
VS
1///////////////////////////////////////////////////////////////////////////////
2// Name: src/common/preferencescmn.cpp
3// Purpose: wxPreferencesEditor implementation common to all platforms.
4// Author: Vaclav Slavik
5// Created: 2013-02-19
2aab96f5
VS
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
a9452957
VZ
25#if wxUSE_PREFERENCES_EDITOR
26
2aab96f5
VS
27#include "wx/private/preferences.h"
28#include "wx/intl.h"
29
30// ============================================================================
31// implementation
32// ============================================================================
33
34wxString 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
654c4b7b
VZ
46wxPreferencesEditor::wxPreferencesEditor(const wxString& title)
47 : m_impl(wxPreferencesEditorImpl::Create(title))
2aab96f5
VS
48{
49}
50
51wxPreferencesEditor::~wxPreferencesEditor()
52{
53 delete m_impl;
54}
55
56void wxPreferencesEditor::AddPage(wxPreferencesPage* page)
57{
58 wxCHECK_RET( page, "can't set NULL page" );
59 m_impl->AddPage(page);
60}
61
62void wxPreferencesEditor::Show(wxWindow* parent)
63{
64 m_impl->Show(parent);
65}
66
67void wxPreferencesEditor::Dismiss()
68{
69 m_impl->Dismiss();
70}
a9452957
VZ
71
72#endif // wxUSE_PREFERENCES_EDITOR