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