]> git.saurik.com Git - wxWidgets.git/blob - src/common/settcmn.cpp
Added Ok() member for print data, print dialog, page dialog, page dialog data
[wxWidgets.git] / src / common / settcmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: common/settcmn.cpp
3 // Purpose: common (to all ports) wxWindow functions
4 // Author: Robert Roebling
5 // RCS-ID: $Id$
6 // Copyright: (c) wxWindows team
7 // Licence: wxWindows license
8 /////////////////////////////////////////////////////////////////////////////
9
10 // ============================================================================
11 // declarations
12 // ============================================================================
13
14 // ----------------------------------------------------------------------------
15 // headers
16 // ----------------------------------------------------------------------------
17
18 #ifdef __GNUG__
19 #pragma implementation "settings.h"
20 #endif
21
22 // For compilers that support precompilation, includes "wx.h".
23 #include "wx/wxprec.h"
24
25 #ifdef __BORLANDC__
26 #pragma hdrstop
27 #endif
28
29 #ifndef WX_PRECOMP
30 #include "wx/defs.h"
31 #include "wx/utils.h"
32 #include "wx/settings.h"
33 #endif //WX_PRECOMP
34
35 // ----------------------------------------------------------------------------
36 // static data
37 // ----------------------------------------------------------------------------
38
39 wxSystemScreen wxSystemSettings::ms_screen = wxSYS_SCREEN_NONE;
40
41 // ----------------------------------------------------------------------------
42 // ----------------------------------------------------------------------------
43
44 wxSystemScreen wxSystemSettings::GetScreen()
45 {
46 if (ms_screen == wxSYS_SCREEN_NONE)
47 #ifndef __WXUNIV__
48 {
49 // As a start, all GUI are desktops.
50 ms_screen = wxSYS_SCREEN_DESKTOP;
51 }
52 #else
53 {
54 // wxUniv will be used on small devices, too.
55 int x = 0;
56 int y = 0;
57 wxGetDisplaySize( &x, &y );
58
59 ms_screen = wxSYS_SCREEN_DESKTOP;
60
61 if (x < 800)
62 ms_screen = wxSYS_SCREEN_SMALL;
63
64 if (x < 640)
65 ms_screen = wxSYS_SCREEN_PDA;
66
67 if (x < 200)
68 ms_screen = wxSYS_SCREEN_TINY;
69 }
70 #endif
71
72 return ms_screen;
73 }
74
75 void wxSystemSettings::SetScreen( wxSystemScreen screen )
76 {
77 ms_screen = screen;
78 }
79