]> git.saurik.com Git - wxWidgets.git/blame - src/common/preferencescmn.cpp
Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW.
[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
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
a9452957
VZ
26#if wxUSE_PREFERENCES_EDITOR
27
2aab96f5
VS
28#include "wx/private/preferences.h"
29#include "wx/intl.h"
30
31// ============================================================================
32// implementation
33// ============================================================================
34
35wxString wxStockPreferencesPage::GetName() const
36{
37 switch ( m_kind )
38 {
39 case Kind_General:
40 return _("General");
41 case Kind_Advanced:
42 return _("Advanced");
43 }
44 return wxString(); // silence compiler warning
45}
46
654c4b7b
VZ
47wxPreferencesEditor::wxPreferencesEditor(const wxString& title)
48 : m_impl(wxPreferencesEditorImpl::Create(title))
2aab96f5
VS
49{
50}
51
52wxPreferencesEditor::~wxPreferencesEditor()
53{
54 delete m_impl;
55}
56
57void wxPreferencesEditor::AddPage(wxPreferencesPage* page)
58{
59 wxCHECK_RET( page, "can't set NULL page" );
60 m_impl->AddPage(page);
61}
62
63void wxPreferencesEditor::Show(wxWindow* parent)
64{
65 m_impl->Show(parent);
66}
67
68void wxPreferencesEditor::Dismiss()
69{
70 m_impl->Dismiss();
71}
a9452957
VZ
72
73#endif // wxUSE_PREFERENCES_EDITOR