Update of /cvsroot/perl-win32-gui/Win32-GUI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30060
Modified Files:
GUI.pm
Log Message:
Rework Tooltip Class
Index: GUI.pm
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** GUI.pm 16 Jul 2006 11:08:09 -0000 1.52
--- GUI.pm 3 Aug 2006 22:19:40 -0000 1.53
***************
*** 927,930 ****
--- 927,935 ----
###########################################################################
+ # (@)METHOD:AddTooltip(%OPTIONS)
+ # See new Win32::GUI::Tooltip().
+ sub AddTooltip { return Win32::GUI::Tooltip->new(@_); }
+
+
###########################################################################
# (@)METHOD:AddMenu()
# See new Win32::GUI::Menu().
***************
*** 2023,2026 ****
--- 2028,2053 ----
# Create and manipulate Tooltip controls
#
+ # Tooltip controls are probably one of the most unintuitave of the Win32
+ # controls when you first come accross them. A Tooltip control is a
+ # single window that supports one or more 'tools'. A tool is a window,
+ # or an area of a window that when the mouse hovers over, the tooltip
+ # window is displayed. The Tooltip is always a top level window (so
+ # don't try adding the WS_CHILD window style), and is typically owned
+ # by the top level window of your application/dialog.
+ #
+ # Create a tooltip window:
+ #
+ # my $tt = Win32::GUI::Tooltip->new(
+ # $main_window,
+ # );
+ #
+ # Add a tool to the tooltip:
+ #
+ # $tt->AddTool(
+ # -window => $main_window,
+ # -text => "Text that pops up",
+ # );
+ #
+ # and hover the mouse over an area of your main window.
package Win32::GUI::Tooltip;
@ISA = qw(
***************
*** 2031,2039 ****
###########################################################################
# (@)METHOD:new Win32::GUI::Tooltip(PARENT, %OPTIONS)
! # Creates a new Tooltip object
#
# Class specific B<%OPTIONS> are:
! # -alwaystip => 0/1
! # -noprefix => 0/1
sub new {
my $parent = $_[1];
--- 2058,2075 ----
###########################################################################
# (@)METHOD:new Win32::GUI::Tooltip(PARENT, %OPTIONS)
! # Creates a new Tooltip object.
! # Can also be called as PARENT->AddTooltip(%OPTIONS).
#
# Class specific B<%OPTIONS> are:
! # -alwaystip => 0/1 (default: 1)
! # Show the tooltip, even if the window is not active.
! # -noprefix => 0/1 (default: 0)
! # Prevent the tooltip control stripping '&' prefixes
! # -noanimate => 0/1 (default: 0)
! # Turn off tooltip window animation
! # -nofade => 0/1 (default: 0)
! # Turn off tooltip window fading effect
! # -balloon => 0/1 (default: 0)
! # Give the tooltip window 'balloon' style
sub new {
my $parent = $_[1];