wxDisplay — wx v2.4.2

Search documentation of wx

# View Source wxDisplay (wx v2.4.2)

Functions for wxDisplay class

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

wxWidgets docs: wxDisplay

# Summary

## Types

wxDisplay()

## Functions

destroy(This)

Destructor.

getClientArea(This)

Returns the client area of the display.

getCount()

Returns the number of connected displays.

getFromPoint(Pt)

Returns the index of the display on which the given point lies, or `wxNOT_FOUND` if the point is not on any connected display.

getFromWindow(Win)

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

getGeometry(This)

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

getName(This)

Returns the display's name.

getPPI(This)

Returns display resolution in pixels per inch.

isOk(This)

Returns true if the object was initialized successfully.

isPrimary(This)

Returns true if the display is the primary display.

new()

Default constructor creating `wxDisplay` object representing the primary display.

new/1

Constructor creating the display object associated with the given window.

# Types

Link to this type

# wxDisplay()

View Source

    -type wxDisplay() :: wx:wx_object().

# Functions

Link to this function

# destroy(This)

View Source

    -spec destroy(This :: wxDisplay()) -> ok.

Destructor.

Link to this function

# getClientArea(This)

View Source

    -spec getClientArea(This) -> {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}
                           when This :: wxDisplay().

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/1` but it could be less if there is a taskbar (or equivalent) on this display.

Link to this function

# getCount()

View Source

    -spec getCount() -> integer().

Returns the number of connected displays.

Link to this function

# getFromPoint(Pt)

View Source

    -spec getFromPoint(Pt) -> integer() when Pt :: {X :: integer(), Y :: integer()}.

Returns the index of the display on which the given point lies, or `wxNOT_FOUND` if the point is not on any connected display.

Link to this function

# getFromWindow(Win)

View Source

    -spec getFromWindow(Win) -> integer() when Win :: wxWindow:wxWindow().

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.

Link to this function

# getGeometry(This)

View Source

    -spec getGeometry(This) -> {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}
                         when This :: wxDisplay().

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

See: `getClientArea/1`, `wx_misc:displaySize/0`

Link to this function

# getName(This)

View Source

    -spec getName(This) -> unicode:charlist() when This :: wxDisplay().

Returns the display's name.

The returned value is currently an empty string under all platforms except MSW.

Link to this function

# getPPI(This)

View Source

    -spec getPPI(This) -> {W :: integer(), H :: integer()} when This :: wxDisplay().

Returns display resolution in pixels per inch.

Horizontal and vertical resolution are returned in `x` and `y` components of the {Width,Height} object respectively.

If the resolution information is not available, returns.

Since: 3.1.2

Link to this function

# isOk(This)

View Source

    -spec isOk(This) -> boolean() when This :: wxDisplay().

Returns true if the object was initialized successfully.

Link to this function

# isPrimary(This)

View Source

    -spec isPrimary(This) -> boolean() when This :: wxDisplay().

Returns true if the display is the primary display.

The primary display is the one whose index is 0.

Link to this function

# new()

View Source

    -spec new() -> wxDisplay().

Default constructor creating `wxDisplay` object representing the primary display.

Link to this function

# new/1

View Source

    -spec new(Index) -> wxDisplay() when Index :: integer();
             (Window) -> wxDisplay() when Window :: wxWindow:wxWindow().

Constructor creating the display object associated with the given window.

This is the most convenient way of finding the display on which the given window is shown while falling back to the default display if it is not shown at all or positioned outside of any display.

See: `getFromWindow/1`

Since: 3.1.2