]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/common/settcmn.cpp
skip apple options
[wxWidgets.git] / src / common / settcmn.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/common/settcmn.cpp
3// Purpose: common (to all ports) wxWindow functions
4// Author: Robert Roebling
5// Copyright: (c) wxWidgets team
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9// ============================================================================
10// declarations
11// ============================================================================
12
13// ----------------------------------------------------------------------------
14// headers
15// ----------------------------------------------------------------------------
16
17// For compilers that support precompilation, includes "wx.h".
18#include "wx/wxprec.h"
19
20#ifdef __BORLANDC__
21 #pragma hdrstop
22#endif
23
24#include "wx/settings.h"
25
26#ifndef WX_PRECOMP
27 #include "wx/utils.h"
28#endif //WX_PRECOMP
29
30// ----------------------------------------------------------------------------
31// static data
32// ----------------------------------------------------------------------------
33
34wxSystemScreenType wxSystemSettings::ms_screen = wxSYS_SCREEN_NONE;
35
36// ----------------------------------------------------------------------------
37// ----------------------------------------------------------------------------
38
39wxSystemScreenType wxSystemSettings::GetScreenType()
40{
41 if (ms_screen == wxSYS_SCREEN_NONE)
42 {
43 // wxUniv will be used on small devices, too.
44 int x = GetMetric( wxSYS_SCREEN_X );
45
46 ms_screen = wxSYS_SCREEN_DESKTOP;
47
48 if (x < 800)
49 ms_screen = wxSYS_SCREEN_SMALL;
50
51 if (x < 640)
52 ms_screen = wxSYS_SCREEN_PDA;
53
54 if (x < 200)
55 ms_screen = wxSYS_SCREEN_TINY;
56
57 // This is probably a bug, but VNC seems to report 0
58 if (x < 10)
59 ms_screen = wxSYS_SCREEN_DESKTOP;
60 }
61
62 return ms_screen;
63}
64
65void wxSystemSettings::SetScreenType( wxSystemScreenType screen )
66{
67 ms_screen = screen;
68}