Padre::Wx::Display - Utility functions for physical display geometry
This module provides a collection of utility functions relating to the physical display geometry of the host Padre is running on.
These functions help choose the most visually elegant default sizes and positions for Padre windows, and allow Padre to adapt when the screen geometry of the host changes (which can be fairly common in the case of powerful multi-screen developer computers).
my $boolean = Padre::Wx::Display->perfect( Padre::Current->main );
The default Wx implementation of IsShownOnScreen is a bit weird, and while it may be technically correct as far as Wx is concerned it does not necesarily represent what a typical human expects, which is that the application is on an active plugged in monitor and that it is entirely on the monitor.
The perfect method takes a Wx::TopLevelWindow object (which incorporates either a Wx::Dialog or a Wx::Frame) and determines if the window meets the warm and fuzzy human criteria for a usable location.
perfect
Returns true if so, or false otherwise.
Locates and returns the primary display as a Wx::Display object.
Generate a Wx::Rect (primarily for the Padre::Wx::Main window) which is a landscape-orientation golden-ratio rectangle on the primary display with a 10% margin.
To install Padre, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre
CPAN shell
perl -MCPAN -e shell install Padre
For more information on module installation, please visit the detailed CPAN module installation guide.