1Padre::Wx::Display(3) User Contributed Perl DocumentationPadre::Wx::Display(3)
2
3
4
6 Padre::Wx::Display - Utility functions for physical display geometry
7
9 This module provides a collection of utility functions relating to the
10 physical display geometry of the host Padre is running on.
11
12 These functions help choose the most visually elegant default sizes and
13 positions for Padre windows, and allow Padre to adapt when the screen
14 geometry of the host changes (which can be fairly common in the case of
15 powerful multi-screen developer computers).
16
18 perfect
19 my $boolean = Padre::Wx::Display->perfect(
20 Padre::Current->main
21 );
22
23 The default Wx implementation of IsShownOnScreen is a bit weird, and
24 while it may be technically correct as far as Wx is concerned it does
25 not necesarily represent what a typical human expects, which is that
26 the application is on an active plugged in monitor and that it is
27 entirely on the monitor.
28
29 The "perfect" method takes a Wx::TopLevelWindow object (which
30 incorporates either a Wx::Dialog or a Wx::Frame) and determines if the
31 window meets the warm and fuzzy human criteria for a usable location.
32
33 Returns true if so, or false otherwise.
34
35 primary
36 Locates and returns the primary display as a Wx::Display object.
37
38 primary_default
39 Generate a Wx::Rect (primarily for the Padre::Wx::Main window) which is
40 a landscape-orientation golden-ratio rectangle on the primary display
41 with a 10% margin.
42
43
44
45perl v5.30.1 2020-01-30 Padre::Wx::Display(3)