05 Feb 2006 04:06:39 UTC
- Distribution: Tk-StayOnTop
- Module version: 0.12
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (145 / 86 / 0)
- KwaliteeBus factor: 0
- 18.93% Coverage
- License: unknown
- Activity24 month
- Download (4.27KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionGBROCK Gavin Brock
Tk::StayOnTop - Keep your window in the foreground
use Tk::StayOnTop; $toplevel->stayOnTop; $toplevel->dontStayOnTop;
Adds methods to the Tk::Toplevel base class so that a window can stay on top off all other windows.
Keep $toplevel in the foreground.
Return $toplevel to normal behaviour.
The module uses a number of methods for trying to keep the window in the foreground. It will atomatically choose the most suitable available. The methods can be split between Microsoft Windows and X-Windows:
- Microsoft Windows
Perl Tk Version 804.027 and newer support the "-toplevel => 1" attribute. This will be used if possible.
On older Perl Tk versions, the module will search for the Win32::API module and use direct API calls to the OS.
For newer X window managers (Gnome, myabe KDE) it will try to set the NET_WM_STATE_STAYS_ON_TOP property of the window.
If this is not implemented, it will just try to the raise window every time it's covered. This could cause problems if you have two windows competing to stay on top.
I am hoping that the Perl Tk build in "-toplevel => 1" attribute will be implement in the future and this module will no longer be needed. However in the mean time, if you have any other platform dependent solutions, please let me know and I will try to include them.
See limits in X-Windows functionality descibed above.
This module is Copyright (c) 2004 Gavin Brock firstname.lastname@example.org. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Many thanks to Slaven Rezic for his many implemntation suggestions.
Module Install Instructions
To install Tk::StayOnTop, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Tk::StayOnTop
For more information on module installation, please visit the detailed CPAN module installation guide.