/[pcsx2_0.9.7]/trunk/3rdparty/wxWidgets/src/common/settcmn.cpp
ViewVC logotype

Contents of /trunk/3rdparty/wxWidgets/src/common/settcmn.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 2 months ago) by william
File size: 2457 byte(s)
committing r3113 initial commit again...
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/settcmn.cpp
3 // Purpose: common (to all ports) wxWindow functions
4 // Author: Robert Roebling
5 // RCS-ID: $Id: settcmn.cpp 39310 2006-05-24 07:16:32Z ABX $
6 // Copyright: (c) wxWidgets team
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
25 #include "wx/settings.h"
26
27 #ifndef WX_PRECOMP
28 #include "wx/utils.h"
29 #endif //WX_PRECOMP
30
31 // ----------------------------------------------------------------------------
32 // static data
33 // ----------------------------------------------------------------------------
34
35 wxSystemScreenType wxSystemSettings::ms_screen = wxSYS_SCREEN_NONE;
36
37 // ----------------------------------------------------------------------------
38 // ----------------------------------------------------------------------------
39
40 wxSystemScreenType wxSystemSettings::GetScreenType()
41 {
42 if (ms_screen == wxSYS_SCREEN_NONE)
43 {
44 // wxUniv will be used on small devices, too.
45 int x = GetMetric( wxSYS_SCREEN_X );
46
47 ms_screen = wxSYS_SCREEN_DESKTOP;
48
49 if (x < 800)
50 ms_screen = wxSYS_SCREEN_SMALL;
51
52 if (x < 640)
53 ms_screen = wxSYS_SCREEN_PDA;
54
55 if (x < 200)
56 ms_screen = wxSYS_SCREEN_TINY;
57
58 // This is probably a bug, but VNC seems to report 0
59 if (x < 10)
60 ms_screen = wxSYS_SCREEN_DESKTOP;
61 }
62
63 return ms_screen;
64 }
65
66 void wxSystemSettings::SetScreenType( wxSystemScreenType screen )
67 {
68 ms_screen = screen;
69 }
70
71 #if WXWIN_COMPATIBILITY_2_4
72
73 wxColour wxSystemSettings::GetSystemColour(int index)
74 {
75 return GetColour((wxSystemColour)index);
76 }
77
78 wxFont wxSystemSettings::GetSystemFont(int index)
79 {
80 return GetFont((wxSystemFont)index);
81 }
82
83 int wxSystemSettings::GetSystemMetric(int index)
84 {
85 return GetMetric((wxSystemMetric)index);
86 }
87
88 #endif // WXWIN_COMPATIBILITY_2_4

  ViewVC Help
Powered by ViewVC 1.1.22