contents up previous next

wxdisplay

determines the sizes and locations of displays connected to the system.

derived from

none

include files

<wx/display.h>

see also

wxclientdisplayrect, wxdisplaysize, wxdisplaysizemm

members

wxdisplay::wxdisplay
wxdisplay::~wxdisplay
wxdisplay::changemode
wxdisplay::getclientarea
wxdisplay::getcount
wxdisplay::getcurrentmode
wxdisplay::getdepth
wxdisplay::getfrompoint
wxdisplay::getfromwindow
wxdisplay::getgeometry
wxdisplay::getmodes
wxdisplay::getname
wxdisplay::isprimary


wxdisplay::wxdisplay

wxdisplay(unsigned index = 0)

constructor, setting up a wxdisplay instance with the specified display.

parameters

index


wxdisplay::~wxdisplay

void ~wxdisplay()

destructor.


wxdisplay::changemode

bool changemode(const wxvideomode& mode = wxdefaultvideomode)

changes the video mode of this display to the mode specified in the mode parameter.

if wxdefaultvideomode is passed in as the mode parameter, the defined behaviour is that wxdisplay will reset the video mode to the default mode used by the display. on windows, the behavior is normal. however, there are differences on other platforms. on unix variations using x11 extensions it should behave as defined, but some irregularities may occur.

on wxmac passing in wxdefaultvideomode as the mode parameter does nothing. this happens because carbon no longer has access to dmusescreenprefs, an undocumented function that changed the video mode to the system default by using the system's 'scrn' resource.


wxdisplay::getclientarea

wxrect getclientarea() const

returns the client area of the display. the client area is the part of the display available for the normal (non full screen) windows, usually it is the same as getgeometry but it could be less if there is a taskbar (or equivalent) on this display.

see also:

wxclientdisplayrect


wxdisplay::getcount

static unsigned getcount()

returns the number of connected displays.


wxdisplay::getcurrentmode

wxvideomode getcurrentmode() const

returns the current video mode that this display is in.


wxdisplay::getdepth

int getdepth() const

returns the bit depth of the display whose index was passed to the constructor.


wxdisplay::getfrompoint

static int getfrompoint(const wxpoint& pt)

returns the index of the display on which the given point lies. returns wxnot_found if the point is not on any connected display.

parameters

pt


wxdisplay::getfromwindow

static int getfromwindow(wxwindow* win)

returns the index of the display on which the given window lies.

if the window is on more than one display it gets the display that overlaps the window the most.

returns wxnot_found if the window is not on any connected display.

parameters

win


wxdisplay::getgeometry

wxrect getgeometry() const

returns the bounding rectangle of the display whose index was passed to the constructor.

see also:

getclientarea, wxdisplaysize


wxdisplay::getmodes

wxarrayvideomodes getmodes(const wxvideomode& mode = wxdefaultvideomode) const

fills and returns an array with all the video modes that are supported by this display, or video modes that are supported by this display and match the mode parameter (if mode is not wxdefaultvideomode).


wxdisplay::getname

wxstring getname() const

returns the display's name. a name is not available on all platforms.


wxdisplay::isprimary

bool isprimary()

returns true if the display is the primary display. the primary display is the one whose index is 0.