You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(31) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
|
Mar
(17) |
Apr
(17) |
May
(27) |
Jun
(67) |
Jul
(26) |
Aug
(15) |
Sep
(2) |
Oct
(24) |
Nov
(6) |
Dec
|
2007 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(28) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(21) |
Feb
(45) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert M. <rob...@us...> - 2006-07-16 11:07:24
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20467 Modified Files: CHANGELOG Log Message: Doc updates and add Win32::GUI::ReleaseNotes Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** CHANGELOG 26 Jun 2006 18:28:35 -0000 1.92 --- CHANGELOG 16 Jul 2006 11:07:21 -0000 1.93 *************** *** 6,12 **** Win32-GUI ChangeLog =================== + [Robert May] : 26 June 2006 - win32-gui-demos.pl ! - added new file scripts\win32-gui-demos.pl ! - Makefile.PL - updated to install new win32-gui-demos script + [Robert May] : 26 June 2006 - Rename ExtCreateRgn and GetRgnData --- 6,20 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 16 July 2006 - Doc updates and add ReleaseNotes + - various documentation updates + - buildtools\doHTMLdocs.pl re-written to find and convert + all POD documentation + - Add Package Win32::GUI::ReleaseNotes and add historic + release information + - Initial version of 1.04 release notes drafted + + [Robert May] : 26 June 2006 - win32-gui-demos.pl ! - added new file scripts\win32-gui-demos.pl ! - Makefile.PL - updated to install new win32-gui-demos script + [Robert May] : 26 June 2006 - Rename ExtCreateRgn and GetRgnData |
From: Robert M. <rob...@us...> - 2006-07-16 11:07:07
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20345 Modified Files: BitmapInline.pm Log Message: Doc updates and add Win32::GUI::ReleaseNotes Index: BitmapInline.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/BitmapInline.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BitmapInline.pm 19 Nov 2003 19:10:42 -0000 1.3 --- BitmapInline.pm 16 Jul 2006 11:07:04 -0000 1.4 *************** *** 6,9 **** --- 6,10 ---- $VERSION = "0.02"; + $VERSION = eval $VERSION; $Counter = 1; *************** *** 206,208 **** Aldo Calpini ( C<da...@pe...> ). ! =cut \ No newline at end of file --- 207,209 ---- Aldo Calpini ( C<da...@pe...> ). ! =cut |
From: Robert M. <rob...@us...> - 2006-07-16 10:57:06
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-ReleaseNotes/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16455/t Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-ReleaseNotes/t added to the repository |
From: Robert M. <rob...@us...> - 2006-07-16 10:56:45
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-ReleaseNotes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16350/Win32-GUI-ReleaseNotes Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-ReleaseNotes added to the repository |
From: Robert M. <rob...@us...> - 2006-06-27 18:32:21
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12752/samples Modified Files: NotifyIcon.pl Log Message: Fix help windows for win32-gui-demos and NotifyIcon.pl sample Index: NotifyIcon.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/NotifyIcon.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NotifyIcon.pl 16 May 2006 18:57:26 -0000 1.3 --- NotifyIcon.pl 27 Jun 2006 18:32:14 -0000 1.4 *************** *** 25,29 **** sub WM_NOTIFYICON() {32768 + 2}; # WM_APP + 2 ! my $VERSION = "1.00"; my %event_lookup = ( --- 25,29 ---- sub WM_NOTIFYICON() {32768 + 2}; # WM_APP + 2 ! my $VERSION = "1.01"; my %event_lookup = ( *************** *** 686,690 **** -pushstyle => WS_CLIPCHILDREN, -onResize => sub { $_[0]->TEXT->Resize($_[0]->ScaleWidth(), $_[0]->ScaleHeight); 1; }, ! -onTerminate => sub { undef $win; 0; }, # Closure prevents $win going out of scope # at end of OnHelp(). Ref count to $win forced # to zero on Terminate event. --- 686,690 ---- -pushstyle => WS_CLIPCHILDREN, -onResize => sub { $_[0]->TEXT->Resize($_[0]->ScaleWidth(), $_[0]->ScaleHeight); 1; }, ! -onTerminate => sub { undef $win; 1; }, # Closure prevents $win going out of scope # at end of OnHelp(). Ref count to $win forced # to zero on Terminate event. *************** *** 698,702 **** -visible => 0, -cancel => 1, ! -onClick => sub { undef $win; 0; }, # See comments above ); --- 698,702 ---- -visible => 0, -cancel => 1, ! -onClick => sub { undef $win; 1; }, # See comments above ); |
From: Robert M. <rob...@us...> - 2006-06-27 18:32:21
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12752/scripts Modified Files: win32-gui-demos.pl Log Message: Fix help windows for win32-gui-demos and NotifyIcon.pl sample Index: win32-gui-demos.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/scripts/win32-gui-demos.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** win32-gui-demos.pl 26 Jun 2006 18:28:35 -0000 1.1 --- win32-gui-demos.pl 27 Jun 2006 18:32:14 -0000 1.2 *************** *** 9,13 **** # TODO: - # help window # mouse feedback on launching events # hide console windows on launch --- 9,12 ---- *************** *** 15,19 **** # (and progress bar?) ! our $VERSION = '0.01'; my $progname = "Win32::GUI Demo Launcher"; --- 14,19 ---- # (and progress bar?) ! our $VERSION = '0.02'; ! $VERSION = eval $VERSION; my $progname = "Win32::GUI Demo Launcher"; *************** *** 412,420 **** ###################################################################### sub showHelp { - my $parent = shift; my $win; $win = Win32::GUI::Window->new( - -parent => $parent, -title => "$progname Help", -left => CW_USEDEFAULT, --- 412,418 ---- *************** *** 422,426 **** -pushstyle => WS_CLIPCHILDREN, -onResize => sub { $_[0]->TEXT->Resize($_[0]->ScaleWidth(), $_[0]->ScaleHeight); 1; }, ! -onTerminate => sub { undef $win; 0; }, # Closure prevents $win going out of scope # at end of showHelp(). Ref count to $win forced # to zero on Terminate event. --- 420,424 ---- -pushstyle => WS_CLIPCHILDREN, -onResize => sub { $_[0]->TEXT->Resize($_[0]->ScaleWidth(), $_[0]->ScaleHeight); 1; }, ! -onTerminate => sub { undef $win; 1; }, # Closure prevents $win going out of scope # at end of showHelp(). Ref count to $win forced # to zero on Terminate event. *************** *** 434,438 **** -visible => 0, -cancel => 1, ! -onClick => sub { undef $win; 0; }, # See comments above ); --- 432,436 ---- -visible => 0, -cancel => 1, ! -onClick => sub { undef $win; 1; }, # See comments above ); |
From: Robert M. <rob...@us...> - 2006-06-26 23:22:06
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23105/samples Modified Files: Tutorial_Part4_NotifyIcon.pl Log Message: Remove unnecessary -id option and bring in line with tutorial docs Index: Tutorial_Part4_NotifyIcon.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part4_NotifyIcon.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Tutorial_Part4_NotifyIcon.pl 23 Jun 2006 18:35:34 -0000 1.2 --- Tutorial_Part4_NotifyIcon.pl 26 Jun 2006 23:21:58 -0000 1.3 *************** *** 6,13 **** my $main = Win32::GUI::Window->new( ! -name => 'Main', ! -text => 'Perl', ! -width => 200, ! -height => 200 ); --- 6,13 ---- my $main = Win32::GUI::Window->new( ! -name => 'Main', ! -text => 'Perl', ! -width => 200, ! -height => 200, ); *************** *** 15,22 **** my $ni = $main->AddNotifyIcon( ! -name => "NI", ! -id => 1, ! -icon => $icon, ! -tip => "Hello" ); --- 15,21 ---- my $ni = $main->AddNotifyIcon( ! -name => "NI", ! -icon => $icon, ! -tip => "Hello", ); *************** *** 26,41 **** sub Main_Terminate { ! return -1; } sub Main_Minimize { ! $main->Disable(); ! $main->Hide(); ! return 1; } sub NI_Click { ! $main->Enable(); ! $main->Show(); ! return 1; } --- 25,40 ---- sub Main_Terminate { ! return -1; } sub Main_Minimize { ! $main->Disable(); ! $main->Hide(); ! return 1; } sub NI_Click { ! $main->Enable(); ! $main->Show(); ! return 1; } |
From: Robert M. <rob...@us...> - 2006-06-26 18:28:40
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5158/scripts Added Files: win32-gui-demos.pl Log Message: Add new win32-gui-demos script --- NEW FILE: win32-gui-demos.pl --- #!perl -w use strict; use warnings; # Display and run the Win32::GUI demonstrations # $Id: win32-gui-demos.pl,v 1.1 2006/06/26 18:28:35 robertemay Exp $ # (c) Robert May, 2006. This software is released # under the same terms as perl itself. # TODO: # help window # mouse feedback on launching events # hide console windows on launch # load_treeview can take a long time, provide re-draw and cursor feedback # (and progress bar?) our $VERSION = '0.01'; my $progname = "Win32::GUI Demo Launcher"; my $copyright = "(c) Robert May, 2006."; use Config(); use File::Find(); use File::Basename(); use Win32::GUI 1.03_03, qw( WS_CLIPCHILDREN WS_EX_CLIENTEDGE WM_MENUSELECT WM_NOTIFY NM_RETURN CW_USEDEFAULT SW_SHOWDEFAULT TVHT_ONITEM IDC_WAIT ); #use Win32::GUI::Console(); use Win32::GUI::Scintilla::Perl(); # We want Win32::Process, but can manage without # Win32::Process may not be installed (although it is standard # with ActiveState perl). #our ($HAS_WIN32_PROCESS); #BEGIN { # eval "use Win32::Process qw(DETACHED_PROCESS)"; # $HAS_WIN32_PROCESS = $@ ? 0 : 1; #} ## Globals: my $options = MyConfig::load_config(); # Hash of option values my %nodes; # mapping of treeview node_id to demo path/file.pl ###################################################################### # Build the UI ###################################################################### ###################################################################### # Main menu ###################################################################### my $menu = Win32::GUI::Menu->new( "&File" => "File", ">&Options" => { -name => "Options", -onClick => \&getOptions }, ">&Source" => { -name => "Source", -onClick => \&showMySource }, ">-" => 0, ">E&xit" => { -name => "Exit", -onClick => sub {-1}, }, "&Help" => "HelpB", ">&Help" => { -name => "Help", -onClick => \&showHelp, }, ">&About" => { -name => "About", -onClick => \&showAboutBox, }, ); my @menu_help = ( undef, # File Button undef, # Help Button "Change program options.", "View the source for this program.", undef, # Seperator "Exit.", undef, # ?? "View help for using this program.", $copyright, ); ###################################################################### # A class that removes the Win32::GUI default CS_HDRAW and CS_VDRAW # styles - helps with reducing flicker when we are not scaling the # content of the windows ###################################################################### my $class = Win32::GUI::Class->new( -name => "Win32_GUI_MyClass", -style => 0, ) or die "Class"; ###################################################################### # Main window ###################################################################### my $mw = Win32::GUI::Window->new( -title => $progname, -left => CW_USEDEFAULT, -size => [750,500], -menu => $menu, -class => $class, -pushstyle => WS_CLIPCHILDREN, # avoid flicker on resize -onResize => \&mwResize, ) or die "MainWindow"; ## Hook for displaying menu help in the status bar $mw->Hook(WM_MENUSELECT, \&showMenuHelp); ###################################################################### # Status bar ###################################################################### $mw->AddStatusBar( -name => 'SB', ) or die "StatusBar"; ###################################################################### # Treeview ###################################################################### $mw->AddTreeView( -name => 'TV', -pos => [0,0], -width => 200, -height => $mw->ScaleHeight() - $mw->SB->Height(), -rootlines => 1, -lines => 1, -buttons => 1, -onNodeClick => \&loadFile, #-onMouseDown => \&tvClick, -onMouseDblClick => \&tvDoubleClick, ) or die "Treeview"; ## Hook for getting notification when <RETURN> key is pressed $mw->TV->Hook(NM_RETURN, \&tvReturnHook); ###################################################################### # Splitter ###################################################################### $mw->AddSplitter( -name => 'SP', -top => 0, -left => $mw->TV->Width(), -height => $mw->ScaleHeight() - $mw->SB->Height(), -width => 3, -onRelease => \&splitterRelease, ) or die "Splitter"; ###################################################################### # Launch Button ###################################################################### $mw->AddButton( -name => 'BUT', -text => "Run demo ...", -disabled => 1, -top => 10, -onClick => \&runCurrent, ) or die "Button"; $mw->BUT->Left($mw->ScaleWidth()-10-$mw->BUT->Width()); ###################################################################### # Code display area ###################################################################### $mw->AddScintillaPerl( -name => 'RE', -left => $mw->SP->Left() + $mw->SP->Width(), -top => $mw->BUT->Top() + $mw->BUT->Height() + 10, -width => $mw->ScaleWidth() - $mw->TV->Width() - $mw->SP->Width(), -height => $mw->ScaleHeight() -$mw->SB->Height()- $mw->BUT->Height() - 20, -readonly => 1, -addexstyle => WS_EX_CLIENTEDGE, ) or die "Editor"; ###################################################################### # load tree view and run application ###################################################################### load_treeview($mw->TV); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); undef $mw; exit(0); ###################################################################### # Callbacks ###################################################################### ###################################################################### # Resize main window ###################################################################### sub mwResize { my $win = shift; my $h = $win->ScaleHeight(); my $w = $win->ScaleWidth(); # Move the Status bar $win->SB->Top($h - $win->SB->Height()); $win->SB->Width($w); # Adjust Height of treeview and splitter $win->TV->Height($h - $win->SB->Height()); $win->SP->Height($h - $win->SB->Height()); # Re-position button my $butleft = $win->ScaleWidth() - 10 - $win->BUT->Width(); my $butleft_min = $win->TV->Width() + $win->SP->Width(); $butleft = $butleft_min if $butleft < $butleft_min; $win->BUT->Left($butleft); # Fill remaining space with code display area $win->RE->Width($w - $win->TV->Width() - $win->SP->Width()); $win->RE->Height($win->TV->Height() - $win->BUT->Height() - 20); # Stop the splitter moving over our button $win->SP->Change(-max => $win->BUT->Left() - 10); return 1; } ###################################################################### # Reposition splitter # Horizontal splitter, so only need to resize the 2 panes ###################################################################### sub splitterRelease { my ($s, $coord) = @_; my $p = $s->GetParent(); $p->TV->Width($coord); $p->RE->Left($coord + $s->Width()); $p->RE->Width($p->ScaleWidth() - $coord - $s->Width()); return 1; } ###################################################################### # Display menu help in the status bar ###################################################################### sub showMenuHelp { my ($win, $wParam, $lParam, $type, $msgcode) = @_; return 1 unless $type == 0; return 1 unless $msgcode == WM_MENUSELECT; if($lParam == 0) { # leaving menu $win->SB->Text($options->{current} || ''); } else { # This technique is distinctly flakey, and depends # on understanding how the internals of Win32::GUI # allocates ids to menu items. This mechanism has # changed since Win32::GUI 1.03, the code below # should work with old and new builds my $item = $wParam & 0xFF; $item -= 100 if $item > 100;; $win->SB->Text($menu_help[$item] || ''); } return 1; } ###################################################################### # Treeview <RETURN> pressed ###################################################################### sub tvReturnHook { my ($win, $wParam, $lParam, $type, $msgcode) = @_; return 1 unless $type == WM_NOTIFY; return 1 unless $msgcode == NM_RETURN; my $node = $win->GetSelection(); loadFile($win, $node); # Force a non-zero return value to stop the beep that results # from default processing $win->Result(1); return 0; } ###################################################################### # Treview node click - if node has associate file, load it ###################################################################### sub loadFile { my ($tv, $node) = @_; return 0 unless exists $nodes{$node}; my $file = $nodes{$node}; if(!defined($options->{current}) or $file ne $options->{current}) { $options->{current} = $file; # Can't use $tv->GetParent(), as GetParent is redefined to get # the parent node ... oops my $p = Win32::GUI::GetWindowObject(Win32::GUI::GetParent($tv)); # If Scintilla is readonly, then LoadFile doesn't work $p->RE->SetReadOnly(0); $p->RE->LoadFile($file); $p->RE->SetReadOnly(1); $p->SB->Text($options->{current}); $p->BUT->Enable(); } return 1; } ###################################################################### # Treview double click - if double click is on a node, load and run # the associated file ###################################################################### sub tvDoubleClick { my ($tv, $x, $y) = @_; my ($node, $flags) = $tv->HitTest($x,$y); if($node && ($flags & TVHT_ONITEM)) { my $loaded = loadFile($tv, $node); runCurrent($tv) if($loaded); } return 1; } ###################################################################### # Scintilla Notify Events # - handle folding events ###################################################################### sub RE_Notify { my (%evt) = @_; if ($evt{-code} == Win32::GUI::Scintilla::SCN_MARGINCLICK) { # Click on folder margin if ($evt{-margin} == 2) { $mw->RE->FolderEvent(%evt); } } } ###################################################################### # Button click (and node double-click) - run current file ###################################################################### sub runCurrent { my $control = shift; return 1 unless -f $options->{current}; # Without putting an extra space on the start of the options # perl appears to miss the first option. I haven't # investigated why, but adding this space makes launching # with both Win32::Process and ShellExecute work my $extra_opts = " "; # Environment variable W32G_OPTS allows passing, for example # '-Mblib' to executed application; PERL5OPTS is no good here # as it is parsed after command line options, so # Win32::GUI::Console is not found. $extra_opts .= $ENV{W32G_OPTS} ? $ENV{W32G_OPTS} : ""; # TODO # Here's the strategy that I'm going to use for dealing with console # windows: # # Every launched process will get its own console, regardless # of whether this script has a console or not - if we share # the console of this process, then output will be # very confusing, with output from different processes # interspersed (and although I doubt any of the demos read # from STDIN, if they did we'd have an unmitigated mess) # # To avoid lots of console flashing we really need working # versions of Win32::Process and Win32::GUI::Console. We assume # Win32::GUI::Console, as it is distributed with Win32::GUI, and # this script use()s it, so we will have failed to start ... # # - If we have Win32::Process # Use Win32::Process to launch with DETACHED_PROCESS. # Use -MWin32::GUI::Console=ondemand to create and # show a console if and when it is needed. # # - If Win32::Process is not available, use ShellExecute. # ShellExecute creates a new console for non-gui apps, # so we use wperl.exe rather than perl.exe, if we have it: # # - If wperl.exe is available, use it and # pass -MWin32::GUI::Console=ondemand to create and # show a console if it is needed. # # - If wperl.exe is not available, use perl.exe and use # -MWin32::GUI::Console=ondemand to hide the console and # show it when needed # ######################### # CURRENT IMPLEMENTATION: # Use ShellExecuteEx with perl (not wperl), and ALWAYS get # a console. In future either the samples should be re-written # to not require a console, or above startegy should be used, # or BOTH. #$extra_opts .= " -MWin32::GUI::Console=ondemand"; #TODO: should really do some error checking! #if ($HAS_WIN32_PROCESS) { # my $result = Win32::Process::Create(my $process_obj, # $options->{perl}, "$extra_opts \"$options->{current}\"", # 0, DETACHED_PROCESS, "."); # warn "Failed to start \"$options->{current}\": $^E" unless $result; #} #else { my $result = $control->ShellExecute("open", #$options->{wperl} ? $options->{perl} : $options->{perl}, $options->{perl}, "$extra_opts \"$options->{current}\"", "", SW_SHOWDEFAULT); #} return 1; } ###################################################################### # Help menu item. Show help text in code area ###################################################################### sub showHelp { my $parent = shift; my $win; $win = Win32::GUI::Window->new( -parent => $parent, -title => "$progname Help", -left => CW_USEDEFAULT, -size => [600, 500], -pushstyle => WS_CLIPCHILDREN, -onResize => sub { $_[0]->TEXT->Resize($_[0]->ScaleWidth(), $_[0]->ScaleHeight); 1; }, -onTerminate => sub { undef $win; 0; }, # Closure prevents $win going out of scope # at end of showHelp(). Ref count to $win forced # to zero on Terminate event. -dialogui => 1, ); # Hidden button that handles ESC char. # Might be better to use an accelerator table # but this is nice and quick $win->AddButton( -visible => 0, -cancel => 1, -onClick => sub { undef $win; 0; }, # See comments above ); $win->AddRichEdit( -name => "TEXT", -readonly => 1, -background => 0xFFFFFF, -width => $win->ScaleWidth(), -height => $win->ScaleHeight(), -vscroll => 1, -autohscroll => 0, ); $win->TEXT->Text(get_help_text()); $win->Show(); return; } sub get_help_text { my $parser; eval "require Pod::Simple::RTF"; if($@) { eval "require Pod::Simple::Text"; if($@) { return "Pod::Simple required to get help.\r\n". "Try: 'perldoc win32-gui-demos' from the command line"; } else { $parser = Pod::Simple::Text->new(); } } else { $parser = Pod::Simple::RTF->new(); } my $string; $parser->output_string(\$string); $parser->parse_file($0); return $string; } ###################################################################### # About menu item. ###################################################################### sub showAboutBox { my $win = shift; my $ab = Win32::GUI::Window->new( -parent => $win, -title => "About ...", -size => [220,180], -maximizebox => 0, -minimizebox => 0, -resizable => 0, -dialogui => 1, ); my $text = "$progname v$VERSION\r\n"; $text .= "Using Win32::GUI v$Win32::GUI::VERSION"; my $text2 = "$copyright This software is released under " . "the same terms as Perl itself."; $ab->AddLabel( -align => 'center', -pos => [10,10], -width => $ab->Width()-20, -height => 50, -text => $text, ); $ab->AddLabel( -pos => [10,60], -width => $ab->Width()-20, -height => 100, -text => $text2, ); $ab->AddButton( -text => 'Ok', -size => [60,25], -left => $ab->ScaleWidth()-70, -top => $ab->ScaleHeight()-35, -ok => 1, -default => 1, -onClick => sub {-1}, ); $ab->Center($win); $ab->DoModal(); return 1; } ###################################################################### # Options Dialog ###################################################################### sub getOptions { my $win = shift; my $ok = 0; my $ab = Win32::GUI::Window->new( -parent => $win, -title => "$progname Options", -size => [400,120], -maximizebox => 0, -minimizebox => 0, -resizable => 0, -dialogui => 1, ); $ab->AddTextfield( -name => 'demo_dir', -pos => [10,10], -prompt => ["&Demo directory :",100], -text => $options->{demo_dir}, -width => $ab->ScaleWidth()-150, -height => 20, -tabstop => 1, ); $ab->AddButton( -text => '...', -top => 11, -height => 18, -left => $ab->ScaleWidth()-38, -onClick => sub { $ab->demo_dir->Text(getDemoDir($ab)); 1;}, -tabstop => 1, ); $ab->AddButton( -text => 'Ok', -size => [60,25], -left => $ab->ScaleWidth()-140, -top => $ab->ScaleHeight()-35, -ok => 1, -default => 1, -onClick => sub { $ok = 1; -1}, -tabstop => 1, ); $ab->AddButton( -text => 'Cancel', -size => [60,25], -left => $ab->ScaleWidth()-70, -top => $ab->ScaleHeight()-35, -cancel => 1, -onClick => sub {-1}, -tabstop => 1, ); $ab->Center($win); $ab->DoModal(); # update options from dialog - but only if ok pressed if($ok) { if($options->{demo_dir} ne $ab->demo_dir->Text()) { $options->{demo_dir} = $ab->demo_dir->Text(); load_treeview($win->TV); #only if directory changed } } return 1; } ###################################################################### # Show this program's source ###################################################################### sub showMySource { my $win = shift; $win->TV->Select(0); # unselect any tree view node $options->{current} = $0; # Set the current file $win->RE->SetReadOnly(0); $win->RE->LoadFile($options->{current}); # and load it $win->RE->SetReadOnly(1); $win->SB->Text($options->{current}); $win->BUT->Disable(); # Don't let us run another instance return 1; } ###################################################################### # Get a directory that contains demonstrations ###################################################################### sub getDemoDir { my $p = shift; # browse for folder doesn't like unix style paths ... my $curdir = $options->{demo_dir}; $curdir =~ s/\//\\/g; my $dir = Win32::GUI::BrowseForFolder( -owner => $p, -title => 'Select Win32::GUI demos directory', -folderonly => 1, -directory => $curdir, ); # and back to Unix path seperators again $dir =~ s/\\/\//g if $dir; return $dir ? $dir : $options->{demo_dir}; } ###################################################################### # Helper: load treeview with nodes representing the directories # and files ###################################################################### my %demos; sub load_treeview { my $tv = shift; $tv->DeleteAllItems(); %nodes = (); # Fix demo dir to be unix directory seperators $options->{demo_dir} =~ s/\\/\//g; File::Find::find(\&wanted, $options->{demo_dir}); sub wanted { my $dir = $File::Find::dir; $dir =~ s/^$options->{demo_dir}//; $dir =~ s/^\///; $dir = '/' unless $dir; my $file = $_; return if $file =~ /^\.$/; return if -d $file; return unless $file =~ /\.pl$/; if (!exists($demos{$dir})) { $demos{$dir} = []; } push @{$demos{$dir}}, { name => $file, fullpath => "$File::Find::dir/$file"}; } #insert the nodes for my $dir (sort keys %demos) { my $dnode = $tv->InsertItem( -text => ($dir eq '/' ? "Misc" : $dir), ); for my $file (@{$demos{$dir}}) { my $cnode = $tv->InsertItem( -parent => $dnode, -text => $file->{name}, ); $nodes{$cnode} = $file->{fullpath}; if($options->{current} and $options->{current} eq $nodes{$cnode}) { $tv->Select($cnode); } } } undef %demos; # release memory return; } ###################################################################### # Global configuration ###################################################################### package MyConfig; ###################################################################### # Load configuration # - populate hash with configuration values ###################################################################### sub load_config { my %config; _load_config_from_registry(\%config); _load_config_from_file(\%config); #defaults, if not provided $config{current} = undef unless exists $config{current}; $config{demo_dir} = File::Basename::dirname($INC{"Win32/GUI.pm"}) ."/GUI/demos" unless exists $config{demo_dir}; $config{perl} = _get_perl_exe() unless exists $config{perl}; $config{wperl} = _get_wperl_exe($config{perl}) unless exists $config{wperl}; return \%config; } ###################################################################### # Load configuration from registry # - populate hash with configuration values # - for now a stub ###################################################################### sub _load_config_from_registry { return; } ###################################################################### # Load configuration from file # - populate hash with configuration values # - for now a stub ###################################################################### sub _load_config_from_file { return; } ###################################################################### # Find a perl executable, suitable for using to launch the scripts ###################################################################### sub _get_perl_exe { # taken from perlvar ($^X). Should we just use $^X? my $perl = $Config::Config{perlpath}; if ($^O ne 'VMS') { $perl .= $Config::Config{_exe} unless $perl =~ m/$Config::Config{_exe}$/i; } return $perl; } ###################################################################### # Find a perl executable, suitable for using to launch the scripts # without a console. In ActiveSate perl we know there'll be wperl.exe # in the same location as perl.exe (for a standard distribution) ###################################################################### sub _get_wperl_exe { my $perl = shift; my $wperl = $perl; if($wperl =~ s/(perl$Config::Config{_exe})$/w$1/i) { return $wperl; } else { return undef; } } __END__ =head1 NAME Perl Win32::GUI Demo Launcher application =head1 SYNOPSIS C<< C:\> win32-gui-demos >> =head1 OVERVIEW See a list of all the demo scripts distributed with the Win32::GUI package, view their source code, and run them. =head1 USING =head2 List of demos After starting this application you should see all the sample code distributed with Win32::GUI and its related modules in the treeview to the left. The demos are grouped by the module they relate to. Generic samples are listed under the 'Misc' heading. =head2 Viewing sample code Select a demo file name in the left treeview to see it's source-code in the right pane. =head2 Running the demos With code loaded in the right pane, click the 'Run demo' button, or double-click the demo file name in the left treeview to run the sample itself. The sample will start, with its own console window, so that you can see any output it may generate there. This behaviour will hopefully changed in the future, to remove the console window when it is not used. =head2 Options If there are no samples shown in the left treeview, then the options dialog will show you where this application is looking for them. It tries to determine this automatically, by looking at where Win32::GUI is installed. If you have performed a non-standard install you may need to edit this value. =head2 Other features To see the source of this program itself, choose the 'Source' item from the File menu. =head1 AUTHOR Robert May (rob...@us...) =head1 COPYRIGHT and LICENCE Copyright Robert May, 2006. This software is released under the same terms as Perl itself. =cut |
From: Robert M. <rob...@us...> - 2006-06-26 18:28:40
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5158 Modified Files: CHANGELOG Makefile.PL Log Message: Add new win32-gui-demos script Index: Makefile.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Makefile.PL,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Makefile.PL 16 May 2006 18:57:25 -0000 1.21 --- Makefile.PL 26 Jun 2006 18:28:35 -0000 1.22 *************** *** 217,220 **** --- 217,221 ---- C => [ @arg_c ], OBJECT => $arg_object, + EXE_FILES => [ 'scripts/win32-gui-demos.pl', ], DL_FUNCS => { 'Win32::GUI' => [ @arg_dl_funcs ] }, dist => { Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** CHANGELOG 26 Jun 2006 18:22:52 -0000 1.91 --- CHANGELOG 26 Jun 2006 18:28:35 -0000 1.92 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 26 June 2006 - win32-gui-demos.pl + - added new file scripts\win32-gui-demos.pl + - Makefile.PL - updated to install new win32-gui-demos script + + [Robert May] : 26 June 2006 - Rename ExtCreateRgn and GetRgnData - DC.xs - rename ExtCreateRgn and GetRgnData to ExtCreateRegion |
From: Robert M. <rob...@us...> - 2006-06-26 18:26:45
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4247/scripts Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/scripts added to the repository |
From: Robert M. <rob...@us...> - 2006-06-26 18:23:01
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2345 Modified Files: CHANGELOG DC.xs Log Message: Rename ExtCreateRgn and GetRgnData to ExtCreateRegion and GetRegionData Index: DC.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/DC.xs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DC.xs 24 Jun 2006 14:53:13 -0000 1.14 --- DC.xs 26 Jun 2006 18:22:52 -0000 1.15 *************** *** 47,51 **** ########################################################################### # (@)METHOD:CreateCompatibleBitmap (WIDTH, HEIGHT) ! # Creates a bitmap compatible with the device that is associated with the specified device context. void CreateCompatibleBitmap(handle,width,height) --- 47,52 ---- ########################################################################### # (@)METHOD:CreateCompatibleBitmap (WIDTH, HEIGHT) ! # Creates a bitmap compatible with the device that is associated with ! # the specified device context. void CreateCompatibleBitmap(handle,width,height) *************** *** 101,105 **** ########################################################################### # (@)METHOD:GetCurrentObject(HANDLE,OBJECTTYPE) ! # Obtains a handle to a device context's currently selected object of a specified type. HGDIOBJ GetCurrentObject(handle, Object) --- 102,107 ---- ########################################################################### # (@)METHOD:GetCurrentObject(HANDLE,OBJECTTYPE) ! # Obtains a handle to a device context's currently selected object of a ! # specified type. HGDIOBJ GetCurrentObject(handle, Object) *************** *** 234,239 **** ########################################################################### # (@)METHOD:Chord(LEFT, TOP, RIGHT, BOTTOM, XF, YF, XS, YS) ! # Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). ! # The chord is outlined by using the current pen and filled by using the current brush. BOOL Chord(handle, left, top, right, bottom, xf, yf, xs, ys) --- 236,242 ---- ########################################################################### # (@)METHOD:Chord(LEFT, TOP, RIGHT, BOTTOM, XF, YF, XS, YS) ! # Draws a chord (a region bounded by the intersection of an ellipse and ! # a line segment, called a "secant"). The chord is outlined by using the ! # current pen and filled by using the current brush. BOOL Chord(handle, left, top, right, bottom, xf, yf, xs, ys) *************** *** 255,260 **** # (@)METHOD:Ellipse(LEFT, TOP, RIGHT, BOTTOM) # Draws an ellipse. ! # The center of the ellipse is the center of the specified bounding rectangle. ! # The ellipse is outlined by using the current pen and is filled by using the current brush. BOOL Ellipse(handle, left, top, right, bottom) --- 258,264 ---- # (@)METHOD:Ellipse(LEFT, TOP, RIGHT, BOTTOM) # Draws an ellipse. ! # The center of the ellipse is the center of the specified bounding ! # rectangle. The ellipse is outlined by using the current pen and is ! # filled by using the current brush. BOOL Ellipse(handle, left, top, right, bottom) *************** *** 295,299 **** # (@)METHOD:FillRect(LEFT, TOP, RIGHT, BOTTOM, BRUSH) # Fills a rectangle by using the specified brush. ! # This includes the left and top borders, but excludes the right and bottom borders of the rectangle. BOOL FillRect(handle, left, top, right, bottom, hbr) --- 299,304 ---- # (@)METHOD:FillRect(LEFT, TOP, RIGHT, BOTTOM, BRUSH) # Fills a rectangle by using the specified brush. ! # This includes the left and top borders, but excludes the right and ! # bottom borders of the rectangle. BOOL FillRect(handle, left, top, right, bottom, hbr) *************** *** 317,322 **** ########################################################################### # (@)METHOD:FrameRect(LEFT, TOP, RIGHT, BOTTOM, BRUSH) ! # Draws a border around the specified rectangle by using the specified brush. ! # The width and height of the border are always one logical unit. BOOL FrameRect(handle, left, top, right, bottom, hbr) --- 322,327 ---- ########################################################################### # (@)METHOD:FrameRect(LEFT, TOP, RIGHT, BOTTOM, BRUSH) ! # Draws a border around the specified rectangle by using the specified ! # brush. The width and height of the border are always one logical unit. BOOL FrameRect(handle, left, top, right, bottom, hbr) *************** *** 340,344 **** ########################################################################### # (@)METHOD:InvertRect(LEFT, TOP, RIGHT, BOTTOM) ! # Inverts a rectangle in a window by performing a logical NOT operation on the color values for each pixel in the rectangle's interior. BOOL InvertRect(handle, left, top, right, bottom) --- 345,350 ---- ########################################################################### # (@)METHOD:InvertRect(LEFT, TOP, RIGHT, BOTTOM) ! # Inverts a rectangle in a window by performing a logical NOT operation ! # on the color values for each pixel in the rectangle's interior. BOOL InvertRect(handle, left, top, right, bottom) *************** *** 361,366 **** ########################################################################### # (@)METHOD:Pie(LEFT, TOP, RIGHT, BOTTOM, XF, YF, XS, YS) ! # Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. ! # The pie is outlined by using the current pen and filled by using the current brush. BOOL Pie(handle, left, top, right, bottom, xf, yf, xs, ys) --- 367,373 ---- ########################################################################### # (@)METHOD:Pie(LEFT, TOP, RIGHT, BOTTOM, XF, YF, XS, YS) ! # Draws a pie-shaped wedge bounded by the intersection of an ellipse ! # and two radials. The pie is outlined by using the current pen and ! # filled by using the current brush. BOOL Pie(handle, left, top, right, bottom, xf, yf, xs, ys) *************** *** 381,385 **** ########################################################################### # (@)METHOD:Polygon([X,Y]+) ! # Draws a polygon consisting of two or more vertices connected by straight lines. BOOL Polygon(handle, ...) --- 388,393 ---- ########################################################################### # (@)METHOD:Polygon([X,Y]+) ! # Draws a polygon consisting of two or more vertices connected by ! # straight lines. BOOL Polygon(handle, ...) *************** *** 410,414 **** # (@)METHOD:Rectangle(LEFT, TOP, RIGHT, BOTTOM) # Draws a rectangle. ! # The rectangle is outlined by using the current pen and filled by using the current brush. BOOL Rectangle(handle, left, top, right, bottom) --- 418,423 ---- # (@)METHOD:Rectangle(LEFT, TOP, RIGHT, BOTTOM) # Draws a rectangle. ! # The rectangle is outlined by using the current pen and filled by ! # using the current brush. BOOL Rectangle(handle, left, top, right, bottom) *************** *** 426,430 **** # (@)METHOD:RoundRect(LEFT, TOP, RIGHT, BOTTOM, WIDTH, HEIGHT) # Draws a rectangle with rounded corners. ! # The rectangle is outlined by using the current pen and filled by using the current brush. BOOL RoundRect(handle, left, top, right, bottom, width, height) --- 435,440 ---- # (@)METHOD:RoundRect(LEFT, TOP, RIGHT, BOTTOM, WIDTH, HEIGHT) # Draws a rectangle with rounded corners. ! # The rectangle is outlined by using the current pen and filled by using ! # the current brush. BOOL RoundRect(handle, left, top, right, bottom, width, height) *************** *** 447,451 **** ########################################################################### # (@)METHOD:DrawText(STRING, LEFT, TOP, RIGHT, BOTTOM, WIDTH, HEIGHT, [FORMAT=DT_LEFT|DT_SINGLELINE|DT_TOP]) ! # Draws formatted text in the specified rectangle. It formats the text according to the specified method. int DrawText(handle, string, left, top, right, bottom, format=DT_LEFT|DT_SINGLELINE|DT_TOP) --- 457,462 ---- ########################################################################### # (@)METHOD:DrawText(STRING, LEFT, TOP, RIGHT, BOTTOM, WIDTH, HEIGHT, [FORMAT=DT_LEFT|DT_SINGLELINE|DT_TOP]) ! # Draws formatted text in the specified rectangle. It formats the text ! # according to the specified method. int DrawText(handle, string, left, top, right, bottom, format=DT_LEFT|DT_SINGLELINE|DT_TOP) *************** *** 539,543 **** ########################################################################### # (@)METHOD:GetTextFace() ! # Retrieves the typeface name of the font that is selected into the specified device context. void GetTextFace(handle) --- 550,555 ---- ########################################################################### # (@)METHOD:GetTextFace() ! # Retrieves the typeface name of the font that is selected into the ! # specified device context. void GetTextFace(handle) *************** *** 553,557 **** ########################################################################### # (@)METHOD:SetTextJustification(BREAKEXTRA, BREAKCOUNT) ! # Specifies the amount of space the system should add to the break characters in a string of text BOOL SetTextJustification(handle, nBreakExtra, nBreakCount) --- 565,570 ---- ########################################################################### # (@)METHOD:SetTextJustification(BREAKEXTRA, BREAKCOUNT) ! # Specifies the amount of space the system should add to the break ! # characters in a string of text BOOL SetTextJustification(handle, nBreakExtra, nBreakCount) *************** *** 586,592 **** # (@)METHOD:Arc(X, Y, RADIUS, START, SWEEP) # Draws a line segment and an arc. ! # The line segment is drawn from the current position to the beginning of the arc. ! # The arc is drawn along the perimeter of a circle with the given radius and center. ! # The length of the arc is defined by the given start and sweep angles. BOOL Arc(handle, x, y, radius, start, sweep) --- 599,606 ---- # (@)METHOD:Arc(X, Y, RADIUS, START, SWEEP) # Draws a line segment and an arc. ! # The line segment is drawn from the current position to the beginning ! # of the arc. The arc is drawn along the perimeter of a circle with the ! # given radius and center. The length of the arc is defined by the given ! # start and sweep angles. BOOL Arc(handle, x, y, radius, start, sweep) *************** *** 604,608 **** ########################################################################### # (@)METHOD:ArcDirection([DIRECTION]) ! # Gets or sets the drawing direction to be used for arc and rectangle functions. int ArcDirection(handle, direction = -1) --- 618,623 ---- ########################################################################### # (@)METHOD:ArcDirection([DIRECTION]) ! # Gets or sets the drawing direction to be used for arc and rectangle ! # functions. int ArcDirection(handle, direction = -1) *************** *** 684,692 **** # (@)METHOD:PolyBezier([X,Y]+) # Draws one or more Bézier curves. ! # The first curve is drawn from the first point to the fourth point by using ! # the second and third points as control points. # Each subsequent curve in the sequence needs exactly three more points: # the ending point of the previous curve is used as the starting point, the ! # next two points in the sequence are control points, and the third is the ending point. BOOL PolyBezier(handle, ...) --- 699,708 ---- # (@)METHOD:PolyBezier([X,Y]+) # Draws one or more Bézier curves. ! # The first curve is drawn from the first point to the fourth point by ! # using the second and third points as control points. # Each subsequent curve in the sequence needs exactly three more points: # the ending point of the previous curve is used as the starting point, the ! # next two points in the sequence are control points, and the third is ! # the ending point. BOOL PolyBezier(handle, ...) *************** *** 717,722 **** # The first curve is drawn from the current position to the third point by # using the first two points as control points. For each subsequent curve, ! # the function needs exactly three more points, and uses the ending point of ! # the previous curve as the starting point for the next. BOOL PolyBezierTo (handle, ...) --- 733,738 ---- # The first curve is drawn from the current position to the third point by # using the first two points as control points. For each subsequent curve, ! # the function needs exactly three more points, and uses the ending point ! # of the previous curve as the starting point for the next. BOOL PolyBezierTo (handle, ...) *************** *** 828,832 **** ########################################################################### # (@)METHOD:DrawFocusRect(LEFT, TOP, RIGHT, BOTTOM) ! # Draws a rectangle in the style used to indicate that the rectangle has the focus. BOOL DrawFocusRect(handle, left, top, right, bottom) --- 844,849 ---- ########################################################################### # (@)METHOD:DrawFocusRect(LEFT, TOP, RIGHT, BOTTOM) ! # Draws a rectangle in the style used to indicate that the rectangle has ! # the focus. BOOL DrawFocusRect(handle, left, top, right, bottom) *************** *** 908,913 **** # (@)METHOD:ROP2([MODE]) # Gets or sets the foreground mix mode of the specified device context. ! # The mix mode specifies how the pen or interior color and the color already ! # on the screen are combined to yield a new color. long ROP2(handle, mode=-1) --- 925,930 ---- # (@)METHOD:ROP2([MODE]) # Gets or sets the foreground mix mode of the specified device context. ! # The mix mode specifies how the pen or interior color and the color ! # already on the screen are combined to yield a new color. long ROP2(handle, mode=-1) *************** *** 1106,1110 **** ########################################################################### # (@)METHOD:PathToRegion() ! # Creates a region from the path that is selected into the specified device context. HRGN PathToRegion(handle) --- 1123,1128 ---- ########################################################################### # (@)METHOD:PathToRegion() ! # Creates a region from the path that is selected into the specified ! # device context. HRGN PathToRegion(handle) *************** *** 1153,1157 **** # (@)METHOD:WidenPath() # Redefines the current path as the area that would be painted if the path ! # were stroked using the pen currently selected into the given device context. BOOL WidenPath(handle) --- 1171,1176 ---- # (@)METHOD:WidenPath() # Redefines the current path as the area that would be painted if the path ! # were stroked using the pen currently selected into the given device ! # context. BOOL WidenPath(handle) *************** *** 1271,1275 **** ########################################################################### # (@)METHOD:DrawIcon(Icon,X, Y) ! # The DrawIcon method draws an icon or cursor into the specified device context. int DrawIcon(handle, Icon, x, y) --- 1290,1295 ---- ########################################################################### # (@)METHOD:DrawIcon(Icon,X, Y) ! # The DrawIcon method draws an icon or cursor into the specified ! # device context. int DrawIcon(handle, Icon, x, y) *************** *** 1285,1290 **** ########################################################################### # (@)METHOD:SetBrushOrgEx(X, Y) ! # The SetBrushOrgEx method sets the brush origin that GDI assigns to the next ! # brush an application selects into the specified device context. # Returns the (x,y) of the previous brush origin. void --- 1305,1310 ---- ########################################################################### # (@)METHOD:SetBrushOrgEx(X, Y) ! # The SetBrushOrgEx method sets the brush origin that GDI assigns to ! # the next brush an application selects into the specified device context. # Returns the (x,y) of the previous brush origin. void *************** *** 1304,1308 **** ########################################################################### # (@)METHOD:GetBrushOrgEx ! # The GetBrushOrgEx method retrieves the current brush origin (x,y) for the specified device context. void GetBrushOrgEx(handle) --- 1324,1329 ---- ########################################################################### # (@)METHOD:GetBrushOrgEx ! # The GetBrushOrgEx method retrieves the current brush origin (x,y) ! # for the specified device context. void GetBrushOrgEx(handle) *************** *** 1404,1408 **** ########################################################################### # (@)METHOD:PaintRgn (Region) ! # The PaintRgn function paints the specified region by using the brush currently selected into the device context. BOOL PaintRgn(handle,hrgn) --- 1425,1430 ---- ########################################################################### # (@)METHOD:PaintRgn (Region) ! # The PaintRgn function paints the specified region by using the brush ! # currently selected into the device context. BOOL PaintRgn(handle,hrgn) *************** *** 1416,1420 **** ########################################################################### # (@)METHOD:FrameRgn (Region,Brush,Width,Height) ! # The FrameRgn function draws a border around the specified region by using the specified brush. # # The Width Specifies the width of vertical brush strokes. --- 1438,1443 ---- ########################################################################### # (@)METHOD:FrameRgn (Region,Brush,Width,Height) ! # The FrameRgn function draws a border around the specified region ! # by using the specified brush. # # The Width Specifies the width of vertical brush strokes. *************** *** 1434,1440 **** ########################################################################### # (@)METHOD:SelectClipRgn (Region) ! # This method selects a region as the current clipping region for the specified device context. # ! # If no region is passed, then this method will remove a device-context's clipping region. BOOL SelectClipRgn(handle,hrgn=NULL) --- 1457,1465 ---- ########################################################################### # (@)METHOD:SelectClipRgn (Region) ! # This method selects a region as the current clipping region for ! # the specified device context. # ! # If no region is passed, then this method will remove a ! # device-context's clipping region. BOOL SelectClipRgn(handle,hrgn=NULL) *************** *** 1637,1641 **** ########################################################################### # (@)METHOD:CreateRectRgn (LEFT, TOP, RIGHT, BOTTOM) ! # The CreateRectRgn function creates a rectangular region, returning a region object. void CreateRectRgn(Class="Win32::GUI::Region",left, top, right, bottom) --- 1662,1667 ---- ########################################################################### # (@)METHOD:CreateRectRgn (LEFT, TOP, RIGHT, BOTTOM) ! # The CreateRectRgn function creates a rectangular region, returning a ! # region object. void CreateRectRgn(Class="Win32::GUI::Region",left, top, right, bottom) *************** *** 1655,1663 **** ########################################################################### # (@)METHOD:CreateEllipticRgn (LEFT, TOP, RIGHT, BOTTOM) ! # The CreateEllipticRgn function creates an elliptical region, returning a region object. # ! # The bounding rectangle defines the size, shape, and orientation of the region: The long ! # sides of the rectangle define the length of the ellipse's major axis; the short sides ! # define the length of the ellipse's minor axis; and the center of the rectangle defines # the intersection of the major and minor axes. void --- 1681,1691 ---- ########################################################################### # (@)METHOD:CreateEllipticRgn (LEFT, TOP, RIGHT, BOTTOM) ! # The CreateEllipticRgn function creates an elliptical region, ! # returning a region object. # ! # The bounding rectangle defines the size, shape, and orientation of ! # the region: The long sides of the rectangle define the length of the ! # ellipse's major axis; the short sides define the length of the ! # ellipse's minor axis; and the center of the rectangle defines # the intersection of the major and minor axes. void *************** *** 1677,1683 **** ########################################################################### # (@)METHOD:CreateRoundRectRgn (LEFT, TOP, RIGHT, BOTTOM , WIDTH, HEIGHT) ! # The CreateRoundRectRgn function creates a rectangular region with rounded corners, returning a region object. # ! # The width and height is of the ellipse used to create the rounded corners. void CreateRoundRectRgn(Class="Win32::GUI::Region",left, top, right, bottom, width, height) --- 1705,1713 ---- ########################################################################### # (@)METHOD:CreateRoundRectRgn (LEFT, TOP, RIGHT, BOTTOM , WIDTH, HEIGHT) ! # The CreateRoundRectRgn function creates a rectangular region with ! # rounded corners, returning a region object. # ! # The width and height is of the ellipse used to create the rounded ! # corners. void CreateRoundRectRgn(Class="Win32::GUI::Region",left, top, right, bottom, width, height) *************** *** 1697,1714 **** ########################################################################### ! # (@)METHOD:ExtCreateRgn (RGNDATA) # ! # The ExtCreateRgn function creates a region from data held in memory. The ! # data is a win32 RGNDATA structure (See MSDN) that can be created by packing ! # the bytes by hand, or more easily by using the L<GetRgnData()|GetRgnData> ! # method. # # my $rgn = Win32::GUI::Region->CreateRoundRectRgn(0,0,100,100,50,50); ! # my $rgndata = $rgn->GetRgnData(); ! # my $newrgn = Win32::GUI::Region->ExtCreateRgn($rgndata); # # Returns a Win32::GUI::Region object on success or undef on failure void ! ExtCreateRgn(Class="Win32::GUI::Region", svrgndata) char *Class SV *svrgndata --- 1727,1744 ---- ########################################################################### ! # (@)METHOD:ExtCreateRegion (RGNDATA) # ! # The ExtCreateRgn function creates a region from data held in memory. ! # The data is a win32 RGNDATA structure (See MSDN) that can be created by ! # packing the appropriate structure, or more easily by using the ! # L<GetRgnData()|Win32::GUI::Region/GetRegionData> method. # # my $rgn = Win32::GUI::Region->CreateRoundRectRgn(0,0,100,100,50,50); ! # my $rgndata = $rgn->GetRegionData(); ! # my $newrgn = Win32::GUI::Region->ExtCreateRegion($rgndata); # # Returns a Win32::GUI::Region object on success or undef on failure void ! ExtCreateRegion(Class="Win32::GUI::Region", svrgndata) char *Class SV *svrgndata *************** *** 1725,1737 **** ########################################################################### ! # (@)METHOD:GetRgnData () # ! # The GetRgnData functions returns a representation of the region as a string ! # of bytes that can be used to re-create an identical region using the ! # L<ExtCreateRgn()|ExtCreateRgn> method. # # Returns a string of bytes on success or undef on failure void ! GetRgnData(handle) HRGN handle PREINIT: --- 1755,1767 ---- ########################################################################### ! # (@)METHOD:GetRegionData () # ! # The GetRegionData functions returns a representation of the region as a ! # string of bytes that can be used to re-create an identical region using ! # the L<ExtCreateRgn()|Win32::GUI::Region/ExtCreateRegion> method. # # Returns a string of bytes on success or undef on failure void ! GetRegionData(handle) HRGN handle PREINIT: *************** *** 1756,1775 **** ########################################################################### # (@)METHOD:CombineRgn (source1,source2,CombineMode) ! # The CombineRgn method combines two regions. The two regions are combined according to the ! # specified mode. # # CombineMode: ! # RGN_AND (1) Creates the intersection of the two combined regions. ! # RGN_COPY (5) Creates a copy of the region identified by source1. # RGN_DIFF (4) Combines the parts of source1 that are not part of source2. ! # RGN_OR (2) Creates the union of two combined regions. ! # RGN_XOR (3) Creates the union of two combined regions except for any overlapping areas. ! # ! # Return Values # ! # NULLREGION (1) The region is empty. ! # SIMPLEREGION (2) The region is a single rectangle. # COMPLEXREGION (3) The region is more than a single rectangle. ! # ERROR No (0) region is created. int CombineRgn(destination,source1,source2,CombineMode) HRGN destination --- 1786,1805 ---- ########################################################################### # (@)METHOD:CombineRgn (source1,source2,CombineMode) ! # The CombineRgn method combines two regions. The two regions are ! # combined according to the specified mode. # # CombineMode: ! # RGN_AND (1) Creates the intersection of the two combined regions. ! # RGN_COPY (5) Creates a copy of the region identified by source1. # RGN_DIFF (4) Combines the parts of source1 that are not part of source2. ! # RGN_OR (2) Creates the union of two combined regions. ! # RGN_XOR (3) Creates the union of two combined regions except for any ! # overlapping areas. # ! # Return Values: ! # NULLREGION (1) The region is empty. ! # SIMPLEREGION (2) The region is a single rectangle. # COMPLEXREGION (3) The region is more than a single rectangle. ! # ERROR (0) No region is created. int CombineRgn(destination,source1,source2,CombineMode) HRGN destination *************** *** 1784,1791 **** ########################################################################### # (@)METHOD:PtInRegion (X,Y) ! # The PtInRegion method determines whether the specified point is inside the specified region. # # If the specified point is in the region, the return value is nonzero. - # # If the specified point is not in the region, the return value is zero. BOOL --- 1814,1821 ---- ########################################################################### # (@)METHOD:PtInRegion (X,Y) ! # The PtInRegion method determines whether the specified point is inside ! # the specified region. # # If the specified point is in the region, the return value is nonzero. # If the specified point is not in the region, the return value is zero. BOOL *************** *** 1801,1809 **** ########################################################################### # (@)METHOD:RectInRegion (left, top, right, bottom) ! # The RectInRegion method determines whether any part of the specified rectangle is within the boundaries of a region. # ! # If any part of the specified rectangle lies within the boundaries of the region, the return value is nonzero. # ! # If no part of the specified rectangle lies within the boundaries of the region, the return value is zero. BOOL RectInRegion(handle,left, top, right, bottom) --- 1831,1842 ---- ########################################################################### # (@)METHOD:RectInRegion (left, top, right, bottom) ! # The RectInRegion method determines whether any part of the specified ! # rectangle is within the boundaries of a region. # ! # If any part of the specified rectangle lies within the boundaries of ! # the region, the return value is nonzero. # ! # If no part of the specified rectangle lies within the boundaries of ! # the region, the return value is zero. BOOL RectInRegion(handle,left, top, right, bottom) *************** *** 1826,1830 **** ########################################################################### # (@)METHOD:GetRgnBox () ! # The GetRgnBox function retrieves the bounding rectangle of the specified region. # Returns the rectangle (as a four-element array containing left, top, # right, bottom coordinates) --- 1859,1864 ---- ########################################################################### # (@)METHOD:GetRgnBox () ! # The GetRgnBox function retrieves the bounding rectangle of the specified ! # region. # Returns the rectangle (as a four-element array containing left, top, # right, bottom coordinates) *************** *** 1845,1849 **** ########################################################################### # (@)METHOD:EqualRgn (Region) ! # The EqualRgn function checks the two specified regions to determine whether they are identical. The method considers two regions identical if they are equal in size and shape. BOOL EqualRgn(handle,other) --- 1879,1885 ---- ########################################################################### # (@)METHOD:EqualRgn (Region) ! # The EqualRgn function checks the two specified regions to determine ! # whether they are identical. The method considers two regions identical ! # if they are equal in size and shape. BOOL EqualRgn(handle,other) *************** *** 1857,1861 **** ########################################################################### # (@)METHOD:SetRectRgn (left, top, right, bottom) ! # The SetRectRgn function converts a region into a rectangular region with the specified coordinates. # BOOL --- 1893,1898 ---- ########################################################################### # (@)METHOD:SetRectRgn (left, top, right, bottom) ! # The SetRectRgn function converts a region into a rectangular region ! # with the specified coordinates. # BOOL *************** *** 1875,1879 **** # The OffsetRgn function moves a region by the specified offsets. # ! # The return value specifies the new region's complexity. It can be one of the following values. # # 1 (NULLREGION) Region is empty. --- 1912,1917 ---- # The OffsetRgn function moves a region by the specified offsets. # ! # The return value specifies the new region's complexity. It can be ! # one of the following values. # # 1 (NULLREGION) Region is empty. Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** CHANGELOG 24 Jun 2006 14:53:12 -0000 1.90 --- CHANGELOG 26 Jun 2006 18:22:52 -0000 1.91 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 26 June 2006 - Rename ExtCreateRgn and GetRgnData + - DC.xs - rename ExtCreateRgn and GetRgnData to ExtCreateRegion + and GetRegionData to match win32 API names + + [Robert May] : 24 June 2006 - ExtCreateRgn and GetRgnData - DC.xs - added new region construction ExtCreateRgn and |
From: Robert M. <rob...@us...> - 2006-06-24 14:53:28
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30145 Modified Files: CHANGELOG DC.xs Log Message: ExtCreateRgn and GetRgnData Index: DC.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/DC.xs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DC.xs 13 Apr 2006 22:17:07 -0000 1.13 --- DC.xs 24 Jun 2006 14:53:13 -0000 1.14 *************** *** 1697,1700 **** --- 1697,1758 ---- ########################################################################### + # (@)METHOD:ExtCreateRgn (RGNDATA) + # + # The ExtCreateRgn function creates a region from data held in memory. The + # data is a win32 RGNDATA structure (See MSDN) that can be created by packing + # the bytes by hand, or more easily by using the L<GetRgnData()|GetRgnData> + # method. + # + # my $rgn = Win32::GUI::Region->CreateRoundRectRgn(0,0,100,100,50,50); + # my $rgndata = $rgn->GetRgnData(); + # my $newrgn = Win32::GUI::Region->ExtCreateRgn($rgndata); + # + # Returns a Win32::GUI::Region object on success or undef on failure + void + ExtCreateRgn(Class="Win32::GUI::Region", svrgndata) + char *Class + SV *svrgndata + PREINIT: + HRGN hrgn; + LPRGNDATA rgndata; + STRLEN len; + PPCODE: + rgndata = (LPRGNDATA)SvPV(svrgndata, len); + /* TODO: XFORM transformation as first param? */ + hrgn = ExtCreateRegion(NULL, (DWORD)len, rgndata); + if (hrgn== NULL) XSRETURN_UNDEF; + XPUSHs(CreateObjectWithHandle(NOTXSCALL "Win32::GUI::Region", (HWND) hrgn)); + + ########################################################################### + # (@)METHOD:GetRgnData () + # + # The GetRgnData functions returns a representation of the region as a string + # of bytes that can be used to re-create an identical region using the + # L<ExtCreateRgn()|ExtCreateRgn> method. + # + # Returns a string of bytes on success or undef on failure + void + GetRgnData(handle) + HRGN handle + PREINIT: + SV *svrgndata; + STRLEN len1, len2; + PPCODE: + len1 = (STRLEN)GetRegionData(handle, 0, NULL); + svrgndata = sv_2mortal(newSV(len1)); + SvPOK_on(svrgndata); + SvCUR_set(svrgndata,len1); + len2 = (STRLEN)GetRegionData(handle, (DWORD)len1, (LPRGNDATA)SvPV_nolen(svrgndata)); + + if(len1 == len2) { /* success */ + XPUSHs(svrgndata); + XSRETURN(1); + } + else { /* failure */ + XSRETURN_UNDEF; + } + + + ########################################################################### # (@)METHOD:CombineRgn (source1,source2,CombineMode) # The CombineRgn method combines two regions. The two regions are combined according to the *************** *** 1714,1718 **** # COMPLEXREGION (3) The region is more than a single rectangle. # ERROR No (0) region is created. - int CombineRgn(destination,source1,source2,CombineMode) HRGN destination --- 1772,1775 ---- Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** CHANGELOG 23 Jun 2006 23:08:07 -0000 1.89 --- CHANGELOG 24 Jun 2006 14:53:12 -0000 1.90 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 24 June 2006 - ExtCreateRgn and GetRgnData + - DC.xs - added new region construction ExtCreateRgn and + new region method GetRgnData (Tracker: 1469648) + + [Robert May] : 23 June 2006 - -wantreturn and AnimateWindow - GUI.pm, Textfield.xs - add -wantreturn option to constructor |
From: Robert M. <rob...@us...> - 2006-06-24 13:33:33
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27159 Modified Files: GUI.h Log Message: Add WINVER definition (need for MinGW) Index: GUI.h =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** GUI.h 14 Apr 2006 01:52:25 -0000 1.28 --- GUI.h 24 Jun 2006 13:33:30 -0000 1.29 *************** *** 10,13 **** --- 10,16 ---- #define _WIN32_IE 0x0501 // #define _WIN32_WINNT 0x0400 + /* If WINVER is not defined, the latest MS headers define it as 0x501, + * but MinGW headers don't, so set it here */ + #define WINVER 0x501 #undef NOTRACKMOUSEEVENT #include <stdarg.h> |
From: Robert M. <rob...@us...> - 2006-06-24 10:37:32
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14347 Added Files: AnimateWindow.pl Log Message: Add missing AnimateWindow sample --- NEW FILE: AnimateWindow.pl --- #!perl -w use strict; use warnings; # Show off window animation use Win32::GUI qw(CW_USEDEFAULT); use Win32::GUI::BitmapInline(); my @directions = qw(tlbr tb trbl rl brtl bt bltr lr); my $ico = arrow_icon(); my $mw = Win32::GUI::Window->new( -title => "Animation Demo", -left => CW_USEDEFAULT, -size => [180,280], ); my $aw = Win32::GUI::Window->new( -title => "Animated Window", -left => CW_USEDEFAULT, -size => [400,300], -toolwindow => 1, -onTerminate => sub { do_animation(); 0; }, ); $mw->AddTextfield( -name => 'time', -text => 200, -prompt => [ "Animation time:", 80 ], -pos => [10,10], -size => [45,20], -align => 'right', -number => 1, ); $mw->AddLabel( -text => "ms", -left => $mw->time->Left() + $mw->time->Width() + 5, -top => $mw->time_Prompt->Top(), ); $mw->AddCombobox( -name => 'animation', -dropdownlist => 1, -left => $mw->time->Left(), -top => $mw->time->Top() + $mw->time->Height() + 10, -width => 60, -height => 100, ); $mw->animation->Add('roll', 'slide', 'blend', 'center'); $mw->animation->Select(0); $mw->AddLabel( -text => "Animation Type:", -left => $mw->time_Prompt->Left(), -top => $mw->animation->Top() + 3, ); my $size = 15; my $dim = 100; my $left = 25; my $top = $mw->animation->Top() + $mw->animation->Height() + 20; $mw->AddLabel( -pos => [$left+$size+3, $top+$size+3], -size => [80,80], -icon => $ico, ); $mw->AddRadioButton( -name => $directions[0], -pos => [$left, $top], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[1], -pos => [$left+($dim/2), $top], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[2], -pos => [$left+$dim, $top], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[3], -pos => [$left+$dim, $top+($dim/2)], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[4], -pos => [$left+$dim, $top+$dim], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[5], -pos => [$left+($dim/2), $top+$dim], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[6], -pos => [$left, $top+$dim], -size => [$size,$size], ); $mw->AddRadioButton( -name => $directions[7], -pos => [$left, $top+($dim/2)], -size => [$size,$size], ); $mw->{$directions[7]}->Checked(1); $mw->AddButton( -text => "Show/Hide", -left => $mw->Width() - 90, -top => $mw->Height() - 60, -onClick => \&do_animation, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); undef $mw; exit(0); sub do_animation { my $d; for (@directions) { $d = $_,last if $mw->{$_}->Checked(); } $aw->Animate( -show => !$aw->IsVisible(), -activate => 1, -animation => $mw->animation->Text(), -direction => $d, -time => $mw->time->Text(), ); } sub arrow_icon { newIcon Win32::GUI::BitmapInline( q( AAABAAEAUFAQAAEABACoEAAAFgAAACgAAABQAAAAoAAAAAEABAAAAAAAAAAAAEgAAABIAAAAEAAA AAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA /wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB//+AAAAAAAAAAAAD///AAAAAAAAAAAAH///gAAAAAAAA AAAP///wAAAAAAAAAAAf///4AAAAAAAAAAA////8AAAAAAAAAAB////+AAAAAAAAAAA////8AAAA AAAAAAAf///4AAAAAAAAAAAP///wAAAAAAAAAAAH///gAAAAAAAAAAAD///AAAAAAAAAAAAB//+A AAAAAAAAAAAA//8AAAAAAAAAAAAAf/8AAAAAAAAAAAAAf/4AAAAAAAAAAAAAP/wAAAAAAAAAAAAA H/gAAAAAAAAAAAAAD/AAAAAAAAAAAAAAB+AAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAYAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAGAAAADwAAAAAAAAAPAAAAH4AAAAAAAAAfg AAAP8AAAAAAAAA/wAAAP+AAAAAAAAB/wAAAf/AAAAAAAAD/4AAA//gAAAAAAAH/8AAB//wAAAAAA AH/+AAD//wAAAAAAAP//AAD//4AAAAAAAf//AAD//8AAAAAAA///AAD//+AAAAAAB///AAD///AA AAAAD///AAD///gAAAAAH///AAD///wAAAAAP///AAD///4AAAAAf///AAD///wAAAAAP///AAD/ //gAAAAAH///AAD///AAAAAAD///AAD//+AAAAAAB///AAD//8AAAAAAA///AAD//4AAAAAAAf// AAD//wAAAAAAAP//AAB//gAAAAAAAH/+AAA//AAAAAAAAD/8AAAf+AAAAAAAAB/4AAAP8AAAAAAA AA/wAAAH4AAAAAAAAAfgAAADwAAAAAAAAAPAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAB+AAAAAAAAAA AAAAD/AAAAAAAAAAAAAAH/gAAAAAAAAAAAAAP/wAAAAAAAAAAAAAf/4AAAAAAAAAAAAA//8AAAAA AAAAAAAB//+AAAAAAAAAAAAD///AAAAAAAAAAAAH///gAAAAAAAAAAAP///wAAAAAAAAAAAf///4 AAAAAAAAAAA////8AAAAAAAAAAB////+AAAAAAAAAAA////8AAAAAAAAAAAf///4AAAAAAAAAAAP ///wAAAAAAAAAAAH///gAAAAAAAAAAAD///AAAAAAAAAAAAB//+AAAAAAAAAAAAA//8AAAAAAAAA AAAAf/4AAAAAAAA= ) ); } |
From: Robert M. <rob...@us...> - 2006-06-23 23:08:11
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8132/Win32-GUI-Constants Modified Files: Constants.PL Log Message: Add -wantreturn option for Textfields and RichEdit; Add Animate() window method Index: Constants.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/Constants.PL,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Constants.PL 11 Jun 2006 21:00:15 -0000 1.4 --- Constants.PL 23 Jun 2006 23:08:07 -0000 1.5 *************** *** 348,351 **** --- 348,362 ---- ACS_TIMER 0x0008 + # AnimateWindow constants + AW_HOR_POSITIVE 0x00000001 + AW_HOR_NEGATIVE 0x00000002 + AW_VER_POSITIVE 0x00000004 + AW_VER_NEGATIVE 0x00000008 + AW_CENTER 0x00000010 + AW_HIDE 0x00010000 + AW_ACTIVATE 0x00020000 + AW_SLIDE 0x00040000 + AW_BLEND 0x00080000 + # 3D border styles and flags BDR_RAISEDOUTER 0x0001 |
From: Robert M. <rob...@us...> - 2006-06-23 23:08:10
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8132 Modified Files: CHANGELOG GUI.pm GUI.xs Textfield.xs Log Message: Add -wantreturn option for Textfields and RichEdit; Add Animate() window method Index: Textfield.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Textfield.xs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Textfield.xs 3 Aug 2005 21:45:57 -0000 1.7 --- Textfield.xs 23 Jun 2006 23:08:07 -0000 1.8 *************** *** 55,58 **** --- 55,59 ---- } else if BitmaskOptionValue("-autovscroll", perlcs->cs.style, ES_AUTOVSCROLL) } else if BitmaskOptionValue("-number", perlcs->cs.style, ES_NUMBER) + } else if BitmaskOptionValue("-wantreturn", perlcs->cs.style, ES_WANTRETURN) } else retval = FALSE; Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** GUI.xs 23 Jun 2006 18:35:33 -0000 1.60 --- GUI.xs 23 Jun 2006 23:08:07 -0000 1.61 *************** *** 1949,1952 **** --- 1949,1967 ---- ########################################################################### + # (@)INTERNAL:_Animate(HANDLE, TIME, FLAGS) + # Wrapper for Win32 AnimateWindow call. See Win32::GUI::Animate in GUI.pm + # for more details. + BOOL + _Animate(handle, time, flags) + HWND handle + DWORD time + DWORD flags + CODE: + RETVAL = AnimateWindow(handle, time, flags); + OUTPUT: + RETVAL + + + ########################################################################### # (@)METHOD:Hide() # Hides a window or control. Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** GUI.pm 23 Jun 2006 18:35:33 -0000 1.50 --- GUI.pm 23 Jun 2006 23:08:07 -0000 1.51 *************** *** 379,382 **** --- 379,477 ---- } + ########################################################################### + # (@)METHOD:Animate(%OPTIONS) + # Apply special effects when showing or hiding a window. Used instead of + # L<Show()|Show> or L<Hide()|Hide>. + # + # OPTIONS can take the following values: + # -show => (0|1) default: 1 + # Hide(0) or Show(1) the window + # + # -activate => (0|1) default: 0 + # Activate the window. Ignored if hiding the + # window + # + # -animation => (roll|slide|blend|center) default: 'roll' + # Animation type: + # roll: use roll animation + # slide: use slide animation + # blend: use a fade effect. Top-level + # windows only + # center: expand out if showing, collapse + # in when hiding + # + # -time => time default: 200 + # Animation time in milli-seconds + # + # -direction => (lr|tlbr|tb|trbl|rl|brtl|bt|blrt) default: 'lr' + # Animation direction (l=left, r=right, t=top, b=bottom). + # Ignored for animation types blend and center + # + # Returns a true value on success or a false value on failure + # + # NOTE: blend animation does not work on Win98. It is recomended + # that you always check the return value from this function and + # issue a suitable Show() or Hide() on failure. + sub Animate { + my $win = shift; + + my %options = @_; + my $show = delete $options{-show}; + my $activate = delete $options{-activate}; + my $animation = delete $options{-animation}; + my $time = delete $options{-time}; + my $direction = delete $options{-direction}; + + if(keys(%options) != 0) { + require Carp; + Carp::carp "Animate: Unrecognised options ".join(", ", keys(%options)); + return undef + } + + $show = 1 unless defined $show; + $activate = 0 unless defined $activate; + $animation = 'roll' unless defined $animation; + $time = 200 unless defined $time; + $direction = 'lr' unless defined $direction; + + if($animation !~ /roll|slide|blend|center/) { + require Carp; + Carp::carp "Animate: Unrecognised animation type: $animation"; + return undef; + } + + if($direction !~ /lr|tlbr|tb|trbl|rl|brtl|bt|blrt/) { + require Carp; + Carp::carp "Animate: Unrecognised direction: $direction"; + return undef; + } + + # create the flags: + my $flags = 0; + $flags |= 65536 unless $show; # AW_HIDE = 65536 + $flags |= 131072 if ($activate && $show); # AW_ACTIVATE = 131072 + + $flags |= 262144 if $animation eq 'slide'; # AW_SLIDE = 262144 + $flags |= 16 if $animation eq 'center'; # AW_CENTER = 16 + $flags |= 524288 if $animation eq 'blend'; # AW_BLEND = 524288 + + # horizontal direction + $direction =~ /([lr])/; + $flags |= 1 if defined $1 and $1 eq 'l'; # AW_HOR_POSITIVE = 1 + $flags |= 2 if defined $1 and $1 eq 'r'; # AW_HOR_NEGATIVE = 2 + + # vertical direction + $direction =~ /([tb])/; + $flags |= 4 if defined $1 and $1 eq 't'; # AW_VER_POSITIVE = 4 + $flags |= 8 if defined $1 and $1 eq 'b'; # AW_VER_NEGATIVE = 8 + + # Do the animation + # TODO: AW_BLEND doesn't work under Win98. There are other failure + # modes too (e.g. AW_BLEND on non-top-level window. Should we detect + # failure and use Show() in that case? Or is that just confusing? + return $win->_Animate($time, $flags); + } + + ############################################################################### # SUB-PACKAGES *************** *** 1277,1280 **** --- 1372,1379 ---- # -readonly => 0/1 (default 0) # text can't be changed. + # -wantreturn => 0/1 (default 0) + # when C<< dialogui => 1 >> is in effect, stops the <ENTER> key + # behaving as a click on the default button, and allows the + # key to be entered in a multi-line Textfield # # The C<-prompt> option is very special; if a string is passed, a Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** CHANGELOG 23 Jun 2006 18:36:10 -0000 1.88 --- CHANGELOG 23 Jun 2006 23:08:07 -0000 1.89 *************** *** 6,9 **** --- 6,17 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 23 June 2006 - -wantreturn and AnimateWindow + - GUI.pm, Textfield.xs - add -wantreturn option to constructor + for Textfield (and RichEdit), along with documentation + - GUI.pm, GUI.xs, samples/AnimateWindow.pl - add Animate() window + method. + --- Win32::GUI::Constants --- + - add AnimateWindow AW_* constants + + [Robert May] : 23 June 2006 - ClassData method and memory leak fixes - GUI.pm, GUI.xs, GUI_Helpers.cpp - change implementation of |
From: Robert M. <rob...@us...> - 2006-06-23 18:36:13
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10452 Modified Files: CHANGELOG Log Message: Add ClassData() method and fix memory leaks Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** CHANGELOG 14 Jun 2006 22:26:31 -0000 1.87 --- CHANGELOG 23 Jun 2006 18:36:10 -0000 1.88 *************** *** 6,9 **** --- 6,16 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 23 June 2006 - ClassData method and memory leak fixes + - GUI.pm, GUI.xs, GUI_Helpers.cpp - change implementation of + UserData() method, and add ClassData() method. + - GUI_Helpers.cpp, GUI.xs, GUI_Options.cpp, MonthCal.xs - change av_undef + and hv_undef calls to SvREFCNT_dec to correct memory leaks + - samples\Tutorial* - change to use Win32::GUI(); to eliminate warning + + [Robert May] : 14 June 2006 - Fix Cygwin build - GUI.pm - fix docs; fix NotifyIcon->new to not modify parent if |
From: Robert M. <rob...@us...> - 2006-06-23 18:35:40
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10102 Modified Files: GUI.pm GUI.xs GUI_Helpers.cpp GUI_Options.cpp MonthCal.xs Log Message: Add ClassData() method and fix memory leaks Index: GUI_Options.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Options.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GUI_Options.cpp 13 Apr 2006 22:17:07 -0000 1.14 --- GUI_Options.cpp 23 Jun 2006 18:35:33 -0000 1.15 *************** *** 1014,1017 **** // Free if not use. if (hvEvents != NULL) ! hv_undef(hvEvents); } --- 1014,1017 ---- // Free if not use. if (hvEvents != NULL) ! SvREFCNT_dec(hvEvents); } Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** GUI.xs 11 Jun 2006 21:00:15 -0000 1.59 --- GUI.xs 23 Jun 2006 18:35:33 -0000 1.60 *************** *** 1779,1820 **** ########################################################################### ! # (@)METHOD:UserData([value]) ! # Sets or reads user data associated with the window or control. ! # ! # my $data=$win->UserData();#retrieve any data associated with the window ! # $win->UserData('some string');#associate user data to the window ! # ! # User data can be any perl scalar or reference. ! void ! UserData(handle,...) HWND handle PREINIT: LPPERLWIN32GUI_USERDATA perlud; ! PPCODE: ! if(items > 2) { ! CROAK("Usage: UserData(handle, [value]);\n"); ! } perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(handle, GWL_USERDATA); if( ! ValidUserData(perlud) ) { XSRETURN_UNDEF; - } else { - if(items==1){//reading the user data - if (perlud->userData!=NULL) { - //Just return the SV - XPUSHs(perlud->userData); - } else { - XSRETURN_UNDEF; - } - } - else {//setting user data - //need to free previous! - if (perlud->userData!=NULL) { - SvREFCNT_dec(perlud->userData); - } - perlud->userData=ST(1); - SvREFCNT_inc(perlud->userData); - } } ########################################################################### # (@)METHOD:FindWindow(CLASSNAME, WINDOWNAME) --- 1779,1803 ---- ########################################################################### ! # (@)INTERNAL:_UserData() ! # Return a reference to an HV, stored in the perlud.UserData member ! # of the PERLWIN32GUI_USERDATA struct ! HV * ! _UserData(handle) HWND handle PREINIT: LPPERLWIN32GUI_USERDATA perlud; ! CODE: perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(handle, GWL_USERDATA); if( ! ValidUserData(perlud) ) { XSRETURN_UNDEF; } + if(perlud->userData == NULL) + perlud->userData = (SV*)newHV(); + + RETVAL = (HV*)perlud->userData; + OUTPUT: + RETVAL + ########################################################################### # (@)METHOD:FindWindow(CLASSNAME, WINDOWNAME) *************** *** 3596,3603 **** newarray = newAV(); av_push(newarray, coderef); ! SvREFCNT_inc(coderef); // needed so that av_undef results in unchanged ref count. if(av_store(perlud->avHooks, WM_TRACKPOPUP_MSGHOOK, newRV_noinc((SV*) newarray)) == NULL) { // Failed to store new array ! av_undef(newarray); W32G_WARN("TrackPopupMenu failed to store 'coderef' - callback not applied"); coderef = NULL; // don't set up the hook --- 3579,3586 ---- newarray = newAV(); av_push(newarray, coderef); ! SvREFCNT_inc(coderef); // needed so that the ref count remains the same after we free if(av_store(perlud->avHooks, WM_TRACKPOPUP_MSGHOOK, newRV_noinc((SV*) newarray)) == NULL) { // Failed to store new array ! SvREFCNT_dec((SV*) newarray); W32G_WARN("TrackPopupMenu failed to store 'coderef' - callback not applied"); coderef = NULL; // don't set up the hook *************** *** 3631,3636 **** } // remove the temporary value stored in the hooks array ! av_undef(newarray); ! av_delete(perlud->avHooks, WM_TRACKPOPUP_MSGHOOK, 0); } OUTPUT: --- 3614,3618 ---- } // remove the temporary value stored in the hooks array ! av_delete(perlud->avHooks, WM_TRACKPOPUP_MSGHOOK, G_DISCARD); } OUTPUT: Index: MonthCal.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/MonthCal.xs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MonthCal.xs 8 May 2004 17:31:21 -0000 1.1 --- MonthCal.xs 23 Jun 2006 18:35:33 -0000 1.2 *************** *** 136,140 **** lpnmDS->prgDayState[i] = SvIV(*sv); } ! av_undef(av); } break; --- 136,140 ---- lpnmDS->prgDayState[i] = SvIV(*sv); } ! SvREFCNT_dec(av); } break; Index: GUI_Helpers.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Helpers.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** GUI_Helpers.cpp 16 May 2006 18:36:11 -0000 1.19 --- GUI_Helpers.cpp 23 Jun 2006 18:35:33 -0000 1.20 *************** *** 67,80 **** if (perlud != NULL) { - // printf ("Free Perlud = %s\n", perlud->szWindowName); // Free event hash if (perlud->hvEvents != NULL) { ! hv_undef(perlud->hvEvents); perlud->hvEvents = NULL; } // Free hook hash if (perlud->avHooks != NULL) { ! av_undef (perlud->avHooks); ! perlud->avHooks = NULL; } // Free self --- 67,87 ---- if (perlud != NULL) { // Free event hash if (perlud->hvEvents != NULL) { ! // Test ref-count - warn if not one ! if(SvREFCNT(perlud->hvEvents) != 1) ! W32G_WARN("hvEvents ref count not 1 during destruction - please report this"); ! ! SvREFCNT_dec(perlud->hvEvents); perlud->hvEvents = NULL; } // Free hook hash if (perlud->avHooks != NULL) { ! // Test ref-count - warn if not one ! if(SvREFCNT(perlud->avHooks) != 1) ! W32G_WARN("avHooks ref count not 1 during destruction - please report this"); ! ! SvREFCNT_dec(perlud->avHooks); ! perlud->avHooks = NULL; } // Free self *************** *** 93,100 **** perlud->svSelf = NULL; } ! // Drop the ref counter on user data ! if (perlud->userData != NULL && SvREFCNT(perlud->userData) > 0) { ! SvREFCNT_dec(perlud->userData); ! } // Free perlpud safefree (perlud); --- 100,115 ---- perlud->svSelf = NULL; } ! ! // If we stored a hash in userData, drop it's ! // ref count to free it (and it's members) ! if (perlud->userData != NULL) { ! // Test ref-count - warn if not one ! if(SvREFCNT(perlud->userData) != 1) ! W32G_WARN("userData ref count not 1 during destruction - please report this"); ! ! SvREFCNT_dec(perlud->userData); ! perlud->userData = NULL; ! } ! // Free perlpud safefree (perlud); Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** GUI.pm 15 Jun 2006 23:38:48 -0000 1.49 --- GUI.pm 23 Jun 2006 18:35:33 -0000 1.50 *************** *** 305,308 **** --- 305,382 ---- } + ########################################################################### + # (@)METHOD:UserData([value]) + # Sets or reads user data associated with the window or control. + # + # my $data=$win->UserData();#retrieve any data associated with the window + # $win->UserData('some string');#associate user data to the window + # + # User data can be any perl scalar or reference. + # + # When reading returns the stored user data, or undef if nothing is stored. + # When setting returns a true value if the user data is stored correctly, or + # a false value on error + # + # If you are writing a class that you expect others to use, then this + # method should B<NOT> be used to store class instance data. See + # L<ClassData()|ClassData> instead. + sub UserData { + my $win = shift; + my $data = shift; + + if(@_) { # more items than expected passed: someone probably tried + # passsing and array or hash + warn("UserData: too many arguments"); + return 0; + } + + if(defined $data) { # Setting user data + $win->_UserData()->{UserData} = $data; + return 1; + } + else { # reading user data + return $win->_UserData()->{UserData}; + } + } + + ########################################################################### + # (@)METHOD:ClassData([value]) + # Sets or reads class instance data associated with the window or control. + # + # my $data=$win->ClassData();#retrieve any data associated with the window + # $win->ClassData('some string');#associate data to the window + # + # Class instance data can be any perl scalar or reference. + # + # When reading returns the stored instance data, or undef if nothing is + # stored. + # When setting returns a true value if the instance data is stored + # correctly, or a false value on error + # + # Class instance data is private to the package that sets the data. I.e. it + # is only accessable as a method call from within the package that sets the + # data, not from a sub-class. So, if you wish to make data stored this way + # accessible to sub-classes you must proved assessor methods in your package. + sub ClassData { + my $win = shift; + my $data = shift; + + if(@_) { # more items than expected passed: someone probably tried + # passsing and array or hash + warn("ClassData: too many arguments"); + return 0; + } + + my $callpkg = (caller())[0]; + + if(defined $data) { # Setting user data + $win->_UserData()->{$callpkg} = $data; + return 1; + } + else { # reading user data + return $win->_UserData()->{$callpkg}; + } + } + ############################################################################### # SUB-PACKAGES |
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10102/samples Modified Files: Tutorial_Part1_hello1.pl Tutorial_Part1_hello2.pl Tutorial_Part1_hello3.pl Tutorial_Part1_hello4.pl Tutorial_Part1_hello5.pl Tutorial_Part1_hello6.pl Tutorial_Part2_framework.pl Tutorial_Part3_DialogBox.pl Tutorial_Part4_NotifyIcon.pl Tutorial_Part4_StatusBar.pl Tutorial_Part4_timer.pl Tutorial_Part5_modalWindow.pl Tutorial_Part5_popupWindow1.pl Tutorial_Part5_popupWindow2.pl Tutorial_Part5_twoWindows.pl Tutorial_Part9_noDosWindow.pl Log Message: Add ClassData() method and fix memory leaks Index: Tutorial_Part4_timer.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part4_timer.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part4_timer.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part4_timer.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $main = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $main = Win32::GUI::Window->new( Index: Tutorial_Part5_popupWindow1.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part5_popupWindow1.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part5_popupWindow1.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part5_popupWindow1.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $W1 = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $W1 = Win32::GUI::Window->new( Index: Tutorial_Part3_DialogBox.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part3_DialogBox.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part3_DialogBox.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part3_DialogBox.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $main = Win32::GUI::DialogBox->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $main = Win32::GUI::DialogBox->new( Index: Tutorial_Part1_hello6.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part1_hello6.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part1_hello6.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part1_hello6.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; # Get text to diaply from the command line --- 3,7 ---- use warnings; ! use Win32::GUI(); # Get text to diaply from the command line Index: Tutorial_Part4_NotifyIcon.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part4_NotifyIcon.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part4_NotifyIcon.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part4_NotifyIcon.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $main = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $main = Win32::GUI::Window->new( Index: Tutorial_Part1_hello4.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part1_hello4.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part1_hello4.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part1_hello4.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $text = defined($ARGV[0]) ? $ARGV[0] : "Hello, world"; --- 3,7 ---- use warnings; ! use Win32::GUI(); my $text = defined($ARGV[0]) ? $ARGV[0] : "Hello, world"; Index: Tutorial_Part2_framework.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part2_framework.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part2_framework.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part2_framework.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,13 **** use warnings; ! use Win32::GUI; my $main = Win32::GUI::Window->new( ! -name => 'Main', ! -text => 'Perl', ! -width => 200, ! -height => 200 ); --- 3,13 ---- use warnings; ! use Win32::GUI(); my $main = Win32::GUI::Window->new( ! -name => 'Main', ! -text => 'Perl', ! -width => 200, ! -height => 200 ); *************** *** 17,20 **** sub Main_Terminate { ! return -1; } --- 17,20 ---- sub Main_Terminate { ! return -1; } Index: Tutorial_Part1_hello5.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part1_hello5.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part1_hello5.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part1_hello5.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $text = defined($ARGV[0]) ? $ARGV[0] : "Hello, world"; --- 3,7 ---- use warnings; ! use Win32::GUI(); my $text = defined($ARGV[0]) ? $ARGV[0] : "Hello, world"; Index: Tutorial_Part4_StatusBar.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part4_StatusBar.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part4_StatusBar.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part4_StatusBar.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $main = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $main = Win32::GUI::Window->new( Index: Tutorial_Part5_modalWindow.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part5_modalWindow.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part5_modalWindow.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part5_modalWindow.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $W1 = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $W1 = Win32::GUI::Window->new( Index: Tutorial_Part1_hello3.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part1_hello3.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part1_hello3.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part1_hello3.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $text = defined($ARGV[0]) ? $ARGV[0] : "Hello, world"; --- 3,7 ---- use warnings; ! use Win32::GUI(); my $text = defined($ARGV[0]) ? $ARGV[0] : "Hello, world"; Index: Tutorial_Part5_popupWindow2.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part5_popupWindow2.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part5_popupWindow2.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part5_popupWindow2.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $W1 = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $W1 = Win32::GUI::Window->new( Index: Tutorial_Part5_twoWindows.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part5_twoWindows.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part5_twoWindows.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part5_twoWindows.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $W1 = Win32::GUI::Window->new( --- 3,7 ---- use warnings; ! use Win32::GUI(); my $W1 = Win32::GUI::Window->new( Index: Tutorial_Part1_hello1.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part1_hello1.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part1_hello1.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part1_hello1.pl 23 Jun 2006 18:35:33 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; # Create a window, saving it in variable $main --- 3,7 ---- use warnings; ! use Win32::GUI(); # Create a window, saving it in variable $main Index: Tutorial_Part1_hello2.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part1_hello2.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part1_hello2.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part1_hello2.pl 23 Jun 2006 18:35:33 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; # Get the text to put in the label from the command line, --- 3,7 ---- use warnings; ! use Win32::GUI(); # Get the text to put in the label from the command line, Index: Tutorial_Part9_noDosWindow.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Tutorial_Part9_noDosWindow.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tutorial_Part9_noDosWindow.pl 5 Oct 2005 22:20:49 -0000 1.1 --- Tutorial_Part9_noDosWindow.pl 23 Jun 2006 18:35:34 -0000 1.2 *************** *** 3,7 **** use warnings; ! use Win32::GUI; my $DOS = Win32::GUI::GetPerlWindow(); --- 3,7 ---- use warnings; ! use Win32::GUI(); my $DOS = Win32::GUI::GetPerlWindow(); |
From: Robert M. <rob...@us...> - 2006-06-15 23:38:53
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13845 Modified Files: GUI.pm Log Message: Correct references in docs from shell.dll to shell32.dll Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** GUI.pm 14 Jun 2006 22:26:31 -0000 1.48 --- GUI.pm 15 Jun 2006 23:38:48 -0000 1.49 *************** *** 2481,2487 **** # # The functionality of Win32::GUI::NotifyIcon is affected by the version ! # of shell.dll installed with the windows system running your script. You # can find this version from $Win32::GUI::NotifyIcon::SHELLDLL_VERSION, ! # which contains the major version number of the shell.dll library that # has been loaded. package Win32::GUI::NotifyIcon; --- 2481,2487 ---- # # The functionality of Win32::GUI::NotifyIcon is affected by the version ! # of shell32.dll installed with the windows system running your script. You # can find this version from $Win32::GUI::NotifyIcon::SHELLDLL_VERSION, ! # which contains the major version number of the shell32.dll library that # has been loaded. package Win32::GUI::NotifyIcon; *************** *** 2500,2504 **** # -tip => STRING # the text that will appear as a tooltip when the mouse is ! # hovering over the NotifyIcon. For shell.dll versions prior # to 5.0 the text length is limited to 63 characters; For # later versions it is limited to 127 characters. The string --- 2500,2504 ---- # -tip => STRING # the text that will appear as a tooltip when the mouse is ! # hovering over the NotifyIcon. For shell32.dll versions prior # to 5.0 the text length is limited to 63 characters; For # later versions it is limited to 127 characters. The string *************** *** 2507,2513 **** # Set NEM event handler (you can also use -on Event Option). # ! # For shell.dll version 5.0 and later balloon tooltips can be used, # the following options control balloon tooltips. If your version ! # of shell.dll does not support balloon tooltips, then these options # are silently ignored: # -balloon => 0/1 --- 2507,2513 ---- # Set NEM event handler (you can also use -on Event Option). # ! # For shell32.dll version 5.0 and later balloon tooltips can be used, # the following options control balloon tooltips. If your version ! # of shell32.dll does not support balloon tooltips, then these options # are silently ignored: # -balloon => 0/1 |
From: Robert M. <rob...@us...> - 2006-06-15 23:38:16
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13802/samples Added Files: standard_images.pl Log Message: Missing demo script --- NEW FILE: standard_images.pl --- #!perl -w # Show all the standard images that can be loaded using # Win32::GUI::Icon->new(ID) # Win32::GUI::Cursor->new(ID) and # Win32::GUI::Bitmap->new(ID) # # Robert May, May 2006 # use strict; use warnings; use Win32::GUI 1.03_03, qw(CW_USEDEFAULT :icon :cursor :bitmap); my ($icon, $cursor, $bitmap); my @icons = sort grep /^IDI_|^OIC_/, @{Win32::GUI::Constants::_export_ok()}; my @cursors = sort grep /^IDC_|^OCR_/, @{Win32::GUI::Constants::_export_ok()}; my @bitmaps = sort grep /^OBM_/, @{Win32::GUI::Constants::_export_ok()}; my @menu_defn = ( "File" => "File", ">Exit" => { -name => "Exit", -onClick => sub{-1}, }, ); push @menu_defn, "Icons", "Icon"; for my $i (@icons) { push @menu_defn, ">$i", { -name => $i, -onClick => eval "sub {showIcon(\"$i\")}", }; } push @menu_defn, "Cursors", "Cursor"; for my $i (@cursors) { push @menu_defn, ">$i", { -name => $i, -onClick => eval "sub {showCursor(\"$i\")}", }; } push @menu_defn, "Bitmaps", "Bitmap"; for my $i (@bitmaps) { push @menu_defn, ">$i", { -name => $i, -onClick => eval "sub {showBitmap(\"$i\")}", }; } my $menu = Win32::GUI::Menu->new(@menu_defn); my $mw = Win32::GUI::Window->new( -title => "Standard Win32 Icons, Cursors and Bitmaps", -size => [400,300], -left => CW_USEDEFAULT, -menu => $menu, ); $mw->AddLabel( -name => 'ICO', -pos => [30,10], -size => [32, 32], -icon => 0, ); $mw->AddLabel( -name => 'CUR', -pos => [80,10], -size => [32, 32], -icon => 0, ); $mw->AddLabel( -name => 'BMP', -pos => [130,10], -size => [100, 100], -bitmap => 0, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); undef $mw; exit(0); sub showIcon { $menu->{$icon->{_current}}->Checked(0) if($icon); my $new = shift; $menu->{$new}->Checked(1); $icon = Win32::GUI::Icon->new(eval $new) or die "No icon: $new"; $icon->{_current} = $new; $mw->ICO->Change(-icon => $icon); $mw->SetIcon($icon); return 0; } sub showCursor { $menu->{$cursor->{_current}}->Checked(0) if($cursor); my $new = shift; $menu->{$new}->Checked(1); $cursor = Win32::GUI::Cursor->new(eval $new) or die "No icon: $new"; $cursor->{_current} = $new; $mw->CUR->Change(-icon => $cursor); $mw->ChangeCursor($cursor); return 0; } sub showBitmap { $menu->{$bitmap->{_current}}->Checked(0) if($bitmap); my $new = shift; $menu->{$new}->Checked(1); $bitmap = Win32::GUI::Bitmap->new(eval $new) or die "No icon: $new"; $bitmap->{_current} = $new; $mw->BMP->Change(-bitmap => $bitmap); return 0; } |
From: Robert M. <rob...@us...> - 2006-06-14 22:26:44
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3665/Win32-GUI-Constants Added Files: Changes TODO Log Message: Fixes: typos and Scintilla::Perl default styles --- NEW FILE: Changes --- Revision history for Perl extension Win32::GUI::Constants. 0.01 22/05/2006 - original version --- NEW FILE: TODO --- - document constants usage in Win32::GUI - look at using PERL_HASH as the hash function |
From: Robert M. <rob...@us...> - 2006-06-14 22:26:43
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3665 Modified Files: CHANGELOG GUI.pm GUI_MessageLoops.cpp MANIFEST Log Message: Fixes: typos and Scintilla::Perl default styles Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** CHANGELOG 11 Jun 2006 21:00:15 -0000 1.86 --- CHANGELOG 14 Jun 2006 22:26:31 -0000 1.87 *************** *** 6,9 **** --- 6,20 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 14 June 2006 - Fix Cygwin build + - GUI.pm - fix docs; fix NotifyIcon->new to not modify parent if + failure on creation + - GUI_MessageLoops.cpp - fix documentation + - MANIFEST - corrected + --- Win32::GUI::Scintilla --- + - Perl.pm - fixed default styles + - Scintilla.pod - typos + --- Win32::GUI::Constants --- + - add Changes and TODO + + [Robert May] : 11 June 2006 - Fix Cygwin build - All Makefile.PL: add MY::special_targets to add .rc and .res to Index: GUI_MessageLoops.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_MessageLoops.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GUI_MessageLoops.cpp 12 Apr 2006 20:00:06 -0000 1.20 --- GUI_MessageLoops.cpp 14 Jun 2006 22:26:31 -0000 1.21 *************** *** 632,637 **** * window's L<-acceptfiles|Win32::GUI::Reference::Options\-acceptfiles> * option or call C<< $win->AcceptFiles(1) >> on the window (See ! * L<Win32::GUI::AcceptFiles|AccepFiles()>). The DROP parameter is either ! * a Win32 drop handle (see MSDN) or a * L<Win32::GUI::DropFiles|Win32::GUI::DropFiles> object if you have done * C<use Win32::GUI::DropFiles;> somewhere in your code. --- 632,637 ---- * window's L<-acceptfiles|Win32::GUI::Reference::Options\-acceptfiles> * option or call C<< $win->AcceptFiles(1) >> on the window (See ! * L<AcceptFiles()|Win32::Reference::Methods/AcceptFiles>). The ! * DROP parameter is either * a Win32 drop handle (see MSDN) or a * L<Win32::GUI::DropFiles|Win32::GUI::DropFiles> object if you have done * C<use Win32::GUI::DropFiles;> somewhere in your code. Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** GUI.pm 11 Jun 2006 21:00:15 -0000 1.47 --- GUI.pm 14 Jun 2006 22:26:31 -0000 1.48 *************** *** 288,292 **** ########################################################################### # (@)METHOD:AcceptFiles([FLAG]) ! # Gets/sets the L<Win32::GUI::Reference::Options\-acceptfiles|-acceptfiles> # options on a window. If C<FLAG> is not provided, returns the current # state. If FLAG is provided it sets or unsets the state, returning the --- 288,292 ---- ########################################################################### # (@)METHOD:AcceptFiles([FLAG]) ! # Gets/sets the L<-acceptfiles|Win32::GUI::Reference::Options/acceptfiles> # options on a window. If C<FLAG> is not provided, returns the current # state. If FLAG is provided it sets or unsets the state, returning the *************** *** 2572,2575 **** --- 2572,2580 ---- $self->{-balloon_icon} = $args{-balloon_icon}; + my $result = Win32::GUI::NotifyIcon::_Add($self->{-handle}, %args); + + return undef unless $result; + + # Only modify parent if we were created successfully # Store name in parent's notifyicons hash $window->{-notifyicons}->{$args{-id}} = $args{-name}; *************** *** 2577,2583 **** $window->{$args{-name}} = $self; - my $result = Win32::GUI::NotifyIcon::_Add($self->{-handle}, %args); - - return undef unless $result; return $self; } --- 2582,2585 ---- Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/MANIFEST,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MANIFEST 11 Jun 2006 21:00:15 -0000 1.17 --- MANIFEST 14 Jun 2006 22:26:31 -0000 1.18 *************** *** 206,210 **** Win32-GUI-Constants/Tags.pm Win32-GUI-Constants/TODO - win32-gui-demos.pl Win32-GUI-DIBitmap/Changes Win32-GUI-DIBitmap/demos/1.bmp --- 206,209 ---- |
From: Robert M. <rob...@us...> - 2006-06-14 22:26:42
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3665/docs Modified Files: GUI.pod Log Message: Fixes: typos and Scintilla::Perl default styles Index: GUI.pod =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/docs/GUI.pod,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GUI.pod 3 Aug 2005 21:45:59 -0000 1.4 --- GUI.pod 14 Jun 2006 22:26:31 -0000 1.5 *************** *** 47,49 **** --- 47,59 ---- =back + =head1 Sample Code + + There is a set of sample applications installed with + Win32::GUI, that should be found in the + F<.../Win32/GUI/demos/> directory under your library + installtion root (by default for ActiveState perl this + is at F<C:/Perl/site/lib/Win32/GUI/demos>). There is + a launcher application installed as well. Type + C<win32-gui-demos> at a command prompt. + __W32G_POSTAMBLE__ |
From: Robert M. <rob...@us...> - 2006-06-14 22:26:37
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3665/Win32-GUI-Scintilla Modified Files: Changes Perl.pm Scintilla.pod TODO Log Message: Fixes: typos and Scintilla::Perl default styles Index: Scintilla.pod =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Scintilla.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Scintilla.pod 11 Jun 2006 16:51:48 -0000 1.1 --- Scintilla.pod 14 Jun 2006 22:26:31 -0000 1.2 *************** *** 66,70 **** Scintilla is a free source code editing component. ! See : L<http:/www.scintilla.org/> =head2 Scintilla creation --- 66,70 ---- Scintilla is a free source code editing component. ! See : L<http://www.scintilla.org/> =head2 Scintilla creation *************** *** 285,289 **** =head2 Scintilla standard method ! For full documentation off Scintilla control see L<http:\\www.scintilla.org\> =over --- 285,289 ---- =head2 Scintilla standard method ! For full documentation of Scintilla control see L<http://www.scintilla.org/> =over *************** *** 2364,2368 **** Win32::GUI - L<http://perl-win32-gui.sourceforge.net/> ! Scintilla - L<http:/www.scintilla.org/> =head1 SEE ALSO --- 2364,2368 ---- Win32::GUI - L<http://perl-win32-gui.sourceforge.net/> ! Scintilla - L<http://www.scintilla.org/> =head1 SEE ALSO Index: TODO =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO 11 Jun 2006 21:00:16 -0000 1.2 --- TODO 14 Jun 2006 22:26:31 -0000 1.3 *************** *** 4,5 **** --- 4,6 ---- - More subclasses for syntax high-lighting other languages - find a way to make Scintilla (SciLexer.dll) play nicely with PAR + - NEM event support Index: Perl.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Perl.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Perl.pm 11 Jun 2006 16:51:44 -0000 1.2 --- Perl.pm 14 Jun 2006 22:26:31 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- use Win32::GUI::Scintilla(); + our $VERSION = "0.01"; + =head1 NAME *************** *** 160,174 **** # Define Style - $sci->StyleClearAll(); # Global default styles for all languages $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_DEFAULT, "face:$hFontFace{'mono'},size:$hFontFace{'size'}"); ! $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_LINENUMBER, "back:#C0C0C0,face:$hFontFace{mono}"); ! $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_CONTROLCHAR, "face:$hFontFace{mono}"); $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_BRACELIGHT, "fore:#FFFFFF,back:#0000FF,bold"); $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_BRACEBAD, "fore:#000000,back:#FF0000,bold"); # White space ! $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_DEFAULT, "fore:#808080,face:$hFontFace{'mono'}"); # Error $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_ERROR , "fore:#0000FF"); --- 162,176 ---- # Define Style # Global default styles for all languages $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_DEFAULT, "face:$hFontFace{'mono'},size:$hFontFace{'size'}"); ! $sci->StyleClearAll(); # Apply STYLE_DEFAULT to all styles ! $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_LINENUMBER, "back:#C0C0C0"); ! $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_CONTROLCHAR, ""); $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_BRACELIGHT, "fore:#FFFFFF,back:#0000FF,bold"); $sci->StyleSetSpec(Win32::GUI::Scintilla::STYLE_BRACEBAD, "fore:#000000,back:#FF0000,bold"); # White space ! $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_DEFAULT, "fore:#808080"); # Error $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_ERROR , "fore:#0000FF"); *************** *** 182,188 **** $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_WORD , "fore:#00007F,bold"); # Double quoted string ! $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_STRING, "fore:#7F007F,face:$hFontFace{'mono'},italic"); # Single quoted string ! $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_CHARACTER, "fore:#7F0000,face:$hFontFace{'mono'},italic"); # Symbols / Punctuation. Currently not used by LexPerl. $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_PUNCTUATION, "fore:#00007F,bold"); --- 184,190 ---- $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_WORD , "fore:#00007F,bold"); # Double quoted string ! $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_STRING, "fore:#7F007F"); # Single quoted string ! $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_CHARACTER, "fore:#7F0000"); # Symbols / Punctuation. Currently not used by LexPerl. $sci->StyleSetSpec (Win32::GUI::Scintilla::SCE_PL_PUNCTUATION, "fore:#00007F,bold"); Index: Changes =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Changes,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Changes 11 Jun 2006 16:51:44 -0000 1.3 --- Changes 14 Jun 2006 22:26:31 -0000 1.4 *************** *** 9,12 **** --- 9,13 ---- - stop using deprecated -style option for window creation - split pod into seperate Scintilla.pod file + - fix styles for Win32::GUI::Scintilla::Perl 1.8 05/12/2005 |