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