Package wx :: Class Display
[frames | no frames]

Type Display

object --+
         |
        Display


Represents a display/monitor attached to the system


Method Summary
  __init__(self, *args, **kwargs)
__init__(self, unsigned int index=0) -> Display
  __del__(self)
  __nonzero__(self)
bool ChangeMode(self, mode)
Changes the video mode of this display to the mode specified in the mode parameter.
Rect GetClientArea(self)
Returns the bounding rectangle the client area of the display, i.e., without taskbars and such.
unsigned int GetCount()
Return the number of available displays. (Static method)
VideoMode GetCurrentMode(self)
Get the current video mode.
int GetFromPoint(pt)
Find the display where the given point lies, return wx.NOT_FOUND if it doesn't belong to any display (Static method)
int GetFromWindow(window)
Find the display where the given window lies, return wx.NOT_FOUND if it is not shown at all. (Static method)
Rect GetGeometry(self)
Returns the bounding rectangle of the display whose index was passed to the constructor.
[videoMode...] GetModes(mode)
Enumerate all video modes supported by this display matching the given one (in the sense of VideoMode.Match()).
String GetName(self)
Returns the display's name.
bool IsOk(self)
Return true if the object was initialized successfully
bool IsPrimary(self)
Returns True if the display is the primary display.
  ResetMode(self)
Restore the default video mode (just a more readable synonym)

Property Summary
  ClientArea: See GetClientArea
  CurrentMode: See GetCurrentMode
  Geometry: See GetGeometry
  Modes: See GetModes
  Name: See GetName
  thisown: The membership flag

Instance Method Details

__init__(self, *args, **kwargs)
(Constructor)

__init__(self, unsigned int index=0) -> Display

Set up a Display instance with the specified display. The displays are numbered from 0 to GetCount() - 1, 0 is always the primary display and the only one which is always supported

Overrides:
__builtin__.object.__init__

ChangeMode(self, mode=DefaultVideoMode)

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

If wx.DefaultVideoMode is passed in as the mode parameter, the defined behaviour is that wx.Display 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 wx.DefaultVideoMode 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.

Returns True if succeeded, False otherwise

Parameters:
mode
           (type=VideoMode)

Returns:
bool

GetClientArea(self)

Returns the bounding rectangle the client area of the display, i.e., without taskbars and such.

Returns:
Rect

GetCurrentMode(self)

Get the current video mode.

Returns:
VideoMode

GetGeometry(self)

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

Returns:
Rect

GetModes(mode=DefaultVideoMode)

Enumerate all video modes supported by this display matching the given one (in the sense of VideoMode.Match()).

As any mode matches the default value of the argument and there is always at least one video mode supported by display, the returned array is only empty for the default value of the argument if this function is not supported at all on this platform.

Parameters:
mode
           (type=VideoMode)

Returns:
[videoMode...]

GetName(self)

Returns the display's name. A name is not available on all platforms.

Returns:
String

IsOk(self)

Return true if the object was initialized successfully

Returns:
bool

IsPrimary(self)

Returns True if the display is the primary display. The primary display is the one whose index is 0.

Returns:
bool

ResetMode(self)

Restore the default video mode (just a more readable synonym)


Static Method Details

GetCount()

Return the number of available displays.

Returns:
unsigned int

GetFromPoint(pt)

Find the display where the given point lies, return wx.NOT_FOUND if it doesn't belong to any display

Parameters:
pt
           (type=Point)

Returns:
int

GetFromWindow(window)

Find the display where the given window lies, return wx.NOT_FOUND if it is not shown at all.

Parameters:
window
           (type=Window)

Returns:
int

Property Details

ClientArea

See GetClientArea

Get Method:
GetClientArea(self)

CurrentMode

See GetCurrentMode

Get Method:
GetCurrentMode(self)

Geometry

See GetGeometry

Get Method:
GetGeometry(self)

Modes

See GetModes

Get Method:
GetModes(mode)

Name

See GetName

Get Method:
GetName(self)

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:51:50 2009 http://epydoc.sf.net