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