]> git.saurik.com Git - wxWidgets.git/blame - interface/display.h
remove wxTextAttr::CreateFont(); return wxNullFont from GetFont() if we have no font...
[wxWidgets.git] / interface / display.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: display.h
3// Purpose: documentation for wxDisplay class
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxDisplay
11 @wxheader{display.h}
7c913512 12
23324ae1 13 Determines the sizes and locations of displays connected to the system.
7c913512 14
23324ae1
FM
15 @library{wxcore}
16 @category{FIXME}
7c913512 17
23324ae1
FM
18 @seealso
19 wxClientDisplayRect, wxDisplaySize, wxDisplaySizeMM
20*/
7c913512 21class wxDisplay
23324ae1
FM
22{
23public:
24 /**
25 Constructor, setting up a wxDisplay instance with the specified display.
26
7c913512 27 @param index
4cc4bfaf
FM
28 The index of the display to use. This must be non-negative
29 and lower than the value returned by GetCount().
23324ae1
FM
30 */
31 wxDisplay(unsigned index = 0);
32
33 /**
34 Destructor.
35 */
36 ~wxDisplay();
37
38 /**
39 Changes the video mode of this display to the mode specified
40 in the mode parameter.
23324ae1
FM
41 If wxDefaultVideoMode is passed in as the mode parameter,
42 the defined behaviour is that wxDisplay will reset the video
7c913512 43 mode to the default mode used by the display. On Windows,
23324ae1
FM
44 the behavior is normal. However, there are differences on other
45 platforms. On Unix variations using X11 extensions it should
7c913512 46 behave as defined, but some irregularities may occur.
23324ae1 47 On wxMac passing in wxDefaultVideoMode as the mode
7c913512 48 parameter does nothing. This happens because carbon
23324ae1
FM
49 no longer has access to DMUseScreenPrefs, an undocumented
50 function that changed the video mode to the system
51 default by using the system's 'scrn' resource.
52 */
53 bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
54
55 /**
56 Returns the client area of the display. The client area is the part of the
57 display available for the normal (non full screen) windows, usually it is the
58 same as GetGeometry() but it could be less if
59 there is a taskbar (or equivalent) on this display.
60 */
61 wxRect GetClientArea();
62
63 /**
64 Returns the number of connected displays.
65 */
66 static unsigned GetCount();
67
68 /**
69 Returns the current video mode that this display is in.
70 */
71 wxVideoMode GetCurrentMode();
72
73 /**
74 Returns the bit depth of the display whose index was passed to the constructor.
75 */
76 int GetDepth();
77
78 /**
7c913512 79 Returns the index of the display on which the given point lies. Returns
23324ae1
FM
80 @c wxNOT_FOUND if the point is not on any connected display.
81
7c913512 82 @param pt
4cc4bfaf 83 The point to locate.
23324ae1
FM
84 */
85 static int GetFromPoint(const wxPoint& pt);
86
87 /**
88 Returns the index of the display on which the given window lies.
23324ae1
FM
89 If the window is on more than one display it gets the display that overlaps the
90 window the most.
23324ae1
FM
91 Returns @c wxNOT_FOUND if the window is not on any connected display.
92
7c913512 93 @param win
4cc4bfaf 94 The window to locate.
23324ae1
FM
95 */
96 static int GetFromWindow(const wxWindow* win);
97
98 /**
99 Returns the bounding rectangle of the display whose index was passed to the
100 constructor.
101 */
102 wxRect GetGeometry();
103
104 /**
105 Fills and returns an array with all the video modes that
7c913512 106 are supported by this display, or video modes that are
23324ae1
FM
107 supported by this display and match the mode parameter
108 (if mode is not wxDefaultVideoMode).
109 */
110 wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode);
111
112 /**
113 Returns the display's name. A name is not available on all platforms.
114 */
115 wxString GetName();
116
117 /**
118 Returns @true if the display is the primary display. The primary display is the
119 one whose index is 0.
120 */
121 bool IsPrimary();
122};